2

I am trying to change my WiFi driver, per suggestions here. I found this repository that claims to have what I want. Upon running the install script, everything goes well, except for the last step, where it uses modinfo to check if the new drivers are being used. It says that the old driver is still being used.

After some investigation, I found that modinfo is the source of the script's report. I found that I now have two drivers with the same name, only one of which I want to use. They are located at:

The old one:

/lib/modules/4.13.0-16-generic/kernel/drivers/net/wireless/realtek/rtlwifi/rtlwifi.ko

and the new one:

/lib/modules/4.13.0-16-generic/kernel/drivers/net/wireless/rtlwifi/rtlwifi.ko

modinfo is reporting the old one, and I am trying to use the new one instead. The man page for modinfo just says that it searches for the file name in /lib/modules/4.13.0-16-generic. If I pass the more specific location, it can be made to find either driver.

I imagine that this means that the new driver is not being used, and I would like to change that. I have looked up some solutions, but they tend to include phrases like "you could end up with an unbootable system," so I have not fiddled too much. I am far from an expert on drivers...

So my question is: how do I get the new driver working in a situation like this?


In response to comments:

sudo modprobe -rv rtl8192ce

yields

rmmod rtl8192ce
rmmod rtl8192c_common
rmmod rtl_pci
rmmod rtlwifi
rmmod mac80211
rmmod cfg80211

and

sudo modprobe -v rtl8192ce

yields

insmod /lib/modules/4.13.0-16-generic/kernel/net/wireless/cfg80211.ko
insmod /lib/modules/4.13.0-16-generic/kernel/net/mac80211/mac80211.ko
insmod /lib/modules/4.13.0-16-generic/kernel/drivers/net/wireless/realtek/rtlwifi/rtlwifi.ko
insmod /lib/modules/4.13.0-16-generic/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8192c/rtl8192c-common.ko
insmod /lib/modules/4.13.0-16-generic/kernel/drivers/net/wireless/realtek/rtlwifi/rtl_pci.ko
insmod /lib/modules/4.13.0-16-generic/kernel/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/rtl8192ce.ko ips=0 fwlps=0 swenc=1

Incidentally, running those commands killed the wifi, necessitating a reboot (this is probably a manifestation of the issue I was trying to solve by changing drivers?).

Zach Boyd
  • 245

1 Answers1

2

To load the kernel modules installed from the git repo:

unload the modules :

sudo modprobe -rv rtl8192ce

Load the modules from

/lib/modules/4.13.0-16-generic/kernel/drivers/net/wireless/rtlwifi/:

sudo insmod /lib/modules/4.13.0-16-generic/kernel/net/wireless/cfg80211.ko
sudo insmod /lib/modules/4.13.0-16-generic/kernel/net/mac80211/mac80211.ko
sudo insmod /lib/modules/4.13.0-16-generic/kernel/drivers/net/wireless/rtlwifi/rtlwifi.ko
sudo insmod /lib/modules/4.13.0-16-generic/kernel/drivers/net/wireless/rtlwifi/rtl8192c/rtl8192c-common.ko
sudo insmod /lib/modules/4.13.0-16-generic/kernel/drivers/net/wireless/rtlwifi/rtl_pci.ko
sudo insmod /lib/modules/4.13.0-16-generic/kernel/drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192ce.ko ips=0 fwlps=0 swenc=1
GAD3R
  • 66,769
  • I followed this advice, and it might have worked, but I am not sure. Bumps: - changed to _ in rtl8192c-common.ko and rtl_pci.ko did not exist. The internet turned on and off when I did this and is working. Modinfo still reports the old driver. I'll try restarting to see if that changes anything. Should the changes you suggested be persistent across reboots? – Zach Boyd Nov 18 '17 at 22:33
  • Same thing happened after a reboot. I'm assuming that this means that modinfo is not the correct way to tell what driver is being used in this case? – Zach Boyd Nov 18 '17 at 22:46
  • 1
    @ZachBoyd and modinfo /lib/modules/4.13.0-16-generic/kernel/drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192ce.ko it will show you the required info about the new kernel module. – GAD3R Nov 18 '17 at 22:48
  • That gives the new driver, as expected. When I do modinfo rtl8192ce, if gives the old one. – Zach Boyd Nov 18 '17 at 22:56
  • How do I know if the new driver is being used versus the old one? – Zach Boyd Nov 18 '17 at 23:00
  • The new driver is currently used , to avoid any confusion we are using the command insmod to load the driver recently compiled , the modinfo (maybe , i am not sure) use the default and the old path to give the module kernel info. – GAD3R Nov 19 '17 at 08:25
  • 1
    I agree. Eventually I decided to make the old driver a sym link to the new one and put your answer in a startup script, which fixed most of the issues. Modinfo is still not working but this is not a big deal. Thanks for your help! – Zach Boyd Nov 19 '17 at 21:13