Plippo / asus-wmi-screenpad

Variation of the asus-wmi kernel module with screenpad brightness support
Other
159 stars 20 forks source link

Doesn't seem to work on Ubuntu 20.04 #11

Closed ualich closed 3 years ago

ualich commented 4 years ago

I use ASUS Zenbook Duo UX481FL-BM067R with Ubuntu 20.04 and Linux kernel version 5.4.0-42-generic.

I went through the installation process, but a problem similar to #10 emerges after installing the module to kernel. The directory /sys/class/leds/asus::screenpad is not generated on boot, but the keyboard leds cease to work - the reason being that the directory /sys/class/leds/asus::kbd_backlight also fails to be generated on boot.

I recovered keyboard led function by removing the module as stated in README.md:

sudo dkms remove -m asus-wmi -v 1.0 --all
sudo rm -r /usr/src/asus-wmi-1.0
Totone commented 4 years ago

Sorry for the long time without answer, I was on holiday, far far from my Zenbook. So, the best I can suggest is to reinstall the module with some reboots between steps as I did. I don't really know how in my case it worked to be honest, but maybe it'll be the same for you

ualich commented 3 years ago

I have now figured that most likely the problem was in generating the machine owner key (MOK) during reboot. As the key was not properly configured the module did not build correctly on startup.

Closing this issue now.

ghost commented 3 years ago

I have now figured that most likely the problem was in generating the machine owner key (MOK) during reboot. As the key was not properly configured the module did not build correctly on startup.

Closing this issue now.

@ualich How do we generate a MOK properly then? How to fix this issue?

Plippo commented 3 years ago

@ilivss Maybe this solution helps? https://github.com/Plippo/asus-wmi-screenpad/issues/27#issuecomment-886238029

ualich commented 3 years ago

@ilivss I also had issues when the Linux kernel version changed - the directory /sys/class/leds/asus::screenpad wasn't generated although the command dkms status listed asus-wmi is as installed for the running version. Reinstalling the module did not help.

There is a command that I found that solved the issue (at least for current running version 5.11.0-27-generic). After step 5 of the install procedure (before reboot) I ran the command sudo update-initramfs -u && sudo update-grub and this resulted in functional kernel module after reboot. One strange thing I noticed while trying to reproduce the solution was that the directory /sys/class/leds/asus::screenpad was still present and functional even when executing the unistall command sequence:

sudo dkms remove -m asus-wmi -v 1.0 --all
sudo rm -r /usr/src/asus-wmi-1.0

I am not sure what is going on here, but it works.

Plippo commented 3 years ago

@ualich About your problem: The initramfs is a special file that contains modules that are already loaded during boot. If the asus-wmi module is contained therein (normally this should not be the case), that could explain why it didn't work for you until you updated this file. The reason why the kernel module still works after you uninstall it is probably that it is still loaded in the kernel, although it no longer exists on your hard drive. Once you unload it or reboot the machine, except if it is included in your initramfs (as suggested above), then it would still work until you update the initramfs.

ualich commented 3 years ago

@Plippo I can reproduce the solution now. The command sudo update-initramfs -u needs to be executed after the install (or uninstall) procedure for changes to take effect in my case.

I checked the contents of initramfs by running the command

lsinitramfs /boot/initrd.img-5.11.0-27-generic | grep asus-wmi

and the file matched was usr/lib/modules/5.11.0-27-generic/updates/dkms/asus-wmi.ko after successful installation, and interestingly usr/lib/modules/5.11.0-27-generic/kernel/drivers/platform/x86/asus-wmi.ko matched after successful uninstallation.

Thanks for the explaination and I hope this information helps.