0

I've already solved my initial wifi problem here: Wifi drops after ~ 5 minutes with RTL8821AE | Ask Ubuntu but I've tried to optimize it (because anytime there was a kernel update I have to execute all the commands of the solution again) and I've messed up something.

To solve the kernel update problem I tried

sudo dkms add ./rtlwifi_new-master

just before an update. I ran the command in the Desktop folder but I got this output:

Error! Could not find module source directory.
Directory: /usr/src/.-rtlwifi_new-master does not exist.

So I thought that I should have run the given command while in /usr/src/ folder, so I did so, but after doing that my wifi problem got worse and now every time I reboot the PC I need to execute the whole solution again, whereas before this process was necessary only after a kernel update.

Also, on the main screen I see something like

there is an error! rtlwifi_new-master is an external package. Please remove it

In summary:

  1. I got a notification of a system update

  2. I executed sudo dkms add ./rtlwifi_new-master in src folder

  3. I didn't reboot

  4. I executed the update

  5. I rebooted

  6. Worse problem than before

I thought of running

rm -R  rtlwifi-new-0.10

in the /src folder but I don't have the permission and I've already messed up with that one time. You can see it here:

Ubuntu 16.04 lts lost administrator rights bash: /etc/profile: Permission denied | Ask Ubuntu

Suggestions??

Zanna
  • 70,465
Zeno Raiser
  • 485
  • 1
  • 6
  • 18
  • What is the result for ls | grep rtlwifi You likely have it in your /home – Jeremy31 Aug 07 '17 at 20:11
  • I tried the command in Desktop, home and / folders and i've got nothing as a result. I tried ls | grep rtlwifi in /usr/src and i've got this: rtlwifi-new-0.10 rtlwifi-new-0.6 Both of the 2 lines have a red color(guess for the permissions) – Zeno Raiser Aug 07 '17 at 20:32
  • Any result from ls /var/lib/dkms | grep rtlwifi Were you compiling the new driver every time in /usr/src/ before? – Jeremy31 Aug 07 '17 at 21:16
  • no i was compiling it every time from here: /home/zenoraiser/Scrivania/RisoluzioneProbPC/Mega-svarione-wifi-risolto/rtlwifi_new-master which are some folders that i've created in desktop to track the pc issues that i've solved. With last command requested i've got this output: rtlwifi-new (rtlwifi again red) – Zeno Raiser Aug 07 '17 at 21:40

1 Answers1

0

First, in terminal, do a man dkms to read/learn about dkms.

Second, assure that any dkms kernel module doesn't already exist in the system, or is older that the source that you're working with.

To install a dkms module, you copy the source code to /usr/src with a folder name in the format of module-version (ie:rtlwifi-0.10). (Adjust the following examples as necessary).

sudo cp -r rtlwifi-new-0.10 /usr/src/rtlwifi-0.10

Then you issue a series of dkms commands like so:

dkms status # to show the current dkms status

Due to your previous attempts, you may have to clean up dkms first, with:

dkms remove module/version -k "$(uname -r)/$(uname -p)"

Then you can start fresh:

sudo dkms add rtlwifi/0.10 -k "$(uname -r)/$(uname -p)"

sudo dkms build rtlwifi/0.10 -k "$(uname -r)/$(uname -p)"

sudo dkms install rtlwifi/0.10 -k "$(uname -r)/$(uname -p)"

dkms status # to show the final dkms status
heynnema
  • 70,711