daringer / asus-fan

Kernel module to get/set (both) fan speed(s) on ASUS Zenbooks
GNU General Public License v2.0
95 stars 26 forks source link

ArchLinux LTS kernel upgrade fails to autoinstall #38

Closed hexadecagram closed 7 years ago

hexadecagram commented 7 years ago

This kernel module isn't being rebuilt with every LTS kernel upgrade. I have to manually run dkms autoinstall every time. I've included a successful zfs-dkms in the pacman output, to demonstrate that it seems to be a problem specifically with asus-fan-dkms-git:

:: Running post-transaction hooks...
(1/1) Install DKMS modules
==> dkms install -m asus_fan -v git -k 4.4.30-1-lts
Error! Bad return status for module build on kernel: 4.4.30-1-lts (x86_64)
Consult /var/lib/dkms/asus_fan/git/build/make.log for more information.
==> dkms install -m spl -v 0.6.5.8 -k 4.4.30-1-lts
==> dkms install -m zfs -v 0.6.5.8 -k 4.4.30-1-lts

Here's some additional stuff:

% sudo dkms autoinstall -k 4.4.30-1-lts

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...(bad exit status: 2)
make KERNELRELEASE=4.4.30-1-lts KVERSION=4.4.30-1-lts...(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.4.30-1-lts (x86_64)
Consult /var/lib/dkms/asus_fan/git/build/make.log for more information.
% tail /var/lib/dkms/asus_fan/git/build/make.log 
DKMS make.log for asus_fan-git for kernel 4.4.30-1-lts (x86_64)
Sun Nov  6 11:46:30 PST 2016
make -C /lib/modules/4.4.27-1-lts/build M=$PWD modules
make[1]: *** /lib/modules/4.4.27-1-lts/build: No such file or directory.  Stop.
make: *** [Makefile:6: all] Error 2
% ls /lib/modules/
4.4.30-1-lts  extramodules-4.4-lts
% uname -rs
Linux 4.4.27-1-lts

So it appears that make is trying to build with the old linux-headers-lts installation, which it should not be doing.

If I reboot after upgrading the kernel and run dkms manually, I succeed:

% sudo dkms autoinstall

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make KERNELRELEASE=4.4.30-1-lts KVERSION=4.4.30-1-lts...
cleaning build area...
Kernel cleanup unnecessary for this kernel.  Skipping...

DKMS: build completed.

asus_fan.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /usr/lib/modules/4.4.30-1-lts/kernel/drivers/acpi/

depmod...

DKMS: install completed.

Something to look out for: I haven't tested this hypothesis yet (no easy way of doing so as I only run linux-lts on all of my machines), but it would seem to me that this is an issue specifically related to the LTS kernel. A solution will need to be found that doesn't affect any successful builds with the non-LTS kernel.

daringer commented 7 years ago

mmmh, ok looks like this could solve it.... could you confirm maybe?

hexadecagram commented 7 years ago

Yep, that seems to have done the trick.