frederik-h / acer-wmi-battery

A linux kernel driver for the Acer WMI battery health control interface
GNU General Public License v2.0
113 stars 15 forks source link

add installation with dkms #31

Open Diman119 opened 1 year ago

Diman119 commented 1 year ago

Added a persistent installation script, that does 2 things - installs the module into the kernel with DKMS (and makes it survive kernel upgrades) and sets it to load at boot. Added an uninstallation script, that reverts these actions. Tested on Ubuntu 23.04

anzigo commented 1 year ago

Tested this on an Acer Swift XSFX14-41G running Fedora 38. Module continued to work and was persistent through a kernel update.

For Fedora, you'd need to install the following at a minimum: sudo dnf group install "C Development Tools and Libraries" "Development Tools" sudo dnf install kernel-devel dkms

albertovito commented 12 months ago

Tested on Acer Aspire 7 A715-42G and Ubuntu 23.04. It seems work flawless.

brenobaptista commented 8 months ago

Working on Acer Nitro AN515-57, thank you for this PR!

brenobaptista commented 8 months ago

@Diman119

The PR repo doesn't accept issues, so putting it here. Somehow the module didn't work 4 days after I installed it in DKMS. Using lsmod it seems to be loaded:

image

I tried uninstalling and installing it again and got this (in Pop!_OS):

image

brenobaptista commented 8 months ago

The value went back to 0 after 2 days for no apparent reason.

image

No problem with DKMS:

image

Also no problem in lsmod:

image

I don't think this problem comes from the PR, maybe the base repository has some bug that reverts this value back to 0.

brenobaptista commented 7 months ago

Just remembered to update on comments above. I fixed it by adding a systemd service to force health_mode to be 1 on startup. I have no experience with building drivers but maybe to fix this it would be needed to persist this value in a file and get that file on reboot/kernel updates.

Diman119 commented 6 months ago

@Diman119

The PR repo doesn't accept issues, so putting it here. Somehow the module didn't work 4 days after I installed it in DKMS. Using lsmod it seems to be loaded:

image

I tried uninstalling and installing it again and got this (in Pop!_OS):

image

I do not know how the driver actually works, so I can't help you there, but there indeed was a problem with the uninstall script. The script is now fixed, pull the changes and use the new one if you want a cleaner uninstallation.