acer-predator-turbo-and-rgb-keyboard-linux-module
acer-predator-turbo-and-rgb-keyboard-linux-module copied to clipboard
Building on Ubuntu 22.04 / kernel 6.2.0-26-generic
Tried to build on Ubuntu 22.04, and ran into some problems:
Skipping BTF generation for /home/raju/acer-predator-turbo/src/facer.ko due to unavailability of vmlinux
Resolved by copying vmlinux into folder usr/lib/modules/$(uname -r)/build/:
cp /sys/kernel/btf/vmlinux /usr/lib/modules/$(uname -r)/build/
Had to install the dwarves package:
sudo apt install dwarves
This is what the build output looked like:
raju@predator:~/acer-predator-turbo$ sudo ./install.sh
make -C /lib/modules/6.2.0-26-generic/build M=/home/raju/acer-predator-turbo modules
make[1]: Entering directory '/usr/src/linux-headers-6.2.0-26-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-11 (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
You are using: gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
CC [M] /home/raju/acer-predator-turbo/src/facer.o
MODPOST /home/raju/acer-predator-turbo/Module.symvers
CC [M] /home/raju/acer-predator-turbo/src/facer.mod.o
LD [M] /home/raju/acer-predator-turbo/src/facer.ko
BTF [M] /home/raju/acer-predator-turbo/src/facer.ko
make[1]: Leaving directory '/usr/src/linux-headers-6.2.0-26-generic'
if [ -f "/var/lib/shim-signed/mok/MOK.priv" ] && [ -f "/var/lib/shim-signed/mok/MOK.der" ]; then \
sudo kmodsign sha512 /var/lib/shim-signed/mok/MOK.priv /var/lib/shim-signed/mok/MOK.der src/facer.ko; \
fi
The documentation might need to be updated for building on Ubuntu 22.04. Assuming that other people have the same experience on that system.
My system:
System Information
Manufacturer: Acer
Product Name: NG-PT515-52-71GL
Version: V1.10
Serial Number: NHQ6YED00102401E256600
UUID: 0054a810-b83f-4240-9571-6d28eb080673
Wake-up Type: Power Switch
--
Base Board Information
Manufacturer: CML
Product Name: Spyder_CMS
Version: V1.10
Serial Number: NBQ6Y110021110000B6601
Asset Tag: No Asset Tag
Features:
In case you wonder why the "Product Name" field is not Predator PT515-52, but NG-PT515-52-71GL - that seems to happen when Acer service centers replace the motherboards in these notebooks, and forget to manually set "Product Name" field to the correct value. Other people reported having the same problem, and it kept the Predator Sense tool on Windows from installing on those systems.
I only could get the Turbo Button to work on my machine, keyboard backlight cannot be controlled. But since the "Product Name" field was reporting a different value, I had to modify the src/facer.c code file to reflect that:
src/facer.c, lines 848 - 856
{
.callback = dmi_matched,
.ident = "Acer Predator PT515-52",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
DMI_MATCH(DMI_PRODUCT_NAME, "NG-PT515-52-71GL"),
},
.driver_data = &quirk_acer_predator_pt515_52,
},