JafarAkhondali / acer-predator-turbo-and-rgb-keyboard-linux-module

Linux kernel module to support Turbo mode and RGB Keyboard for Acer Predator notebook series
GNU General Public License v3.0
358 stars 66 forks source link

Support for Predator PH315-54 (also issues when reinstall) #22

Closed SuperSecureHuman closed 2 years ago

SuperSecureHuman commented 2 years ago
venom@Predator:~$ sudo dmidecode | grep "Product Name" -B 2 -A 4
System Information
    Manufacturer: Acer
    Product Name: Predator PH315-54
    Version: V1.07
    Serial Number: NHQC2SI0041330235A3400
    UUID: 9cc6d91d-3bfb-eb11-80e1-088fc3116d85
    Wake-up Type: Power Switch
--
Base Board Information
    Manufacturer: TGL
    Product Name: QX60_TLS
    Version: V1.07
    Serial Number: NBQC211002132571BB3400
    Asset Tag: Type2 - Board Asset Tag
    Features:

dsdt.zip

Zipped because github did not accept the file format

file /sys/bus/wmi/devices/7A4DDFE7-5B5D-40B4-8595-4408E0CC7F56/

It exists

I get this error when I try install it again (first install went without any issues. I uninstalled it then.)

venom@Predator:~/repo/acer-helios-300-rgb-keyboard-linux-module$ sudo ./install.sh 
make -C /lib/modules/5.11.0-38-generic/build M=/home/venom/repo/acer-helios-300-rgb-keyboard-linux-module modules
make[1]: Entering directory '/usr/src/linux-headers-5.11.0-38-generic'
make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-38-generic'
[ 1349.065876] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d c3 f5 0c 00 f7 d8 64 89 01 48
[ 1349.065878] RSP: 002b:00007ffdd7f266c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[ 1349.065883] RAX: ffffffffffffffda RBX: 000055f72d9da7d0 RCX: 00007fedd6e3989d
[ 1349.065885] RDX: 0000000000000000 RSI: 000055f72c4d7358 RDI: 0000000000000003
[ 1349.065887] RBP: 0000000000000000 R08: 0000000000000000 R09: 00007fedd6f0d260
[ 1349.065888] R10: 0000000000000003 R11: 0000000000000246 R12: 000055f72c4d7358
[ 1349.065890] R13: 0000000000000000 R14: 000055f72d9da780 R15: 0000000000000000
[ 1349.065893] kobject_add_internal failed for acer-gkbbl with -EEXIST, don't try to register things with the same name in the same directory.
[ 1349.081605] input: Acer WMI hotkeys as /devices/virtual/input/input42
[ 1349.126974] snd_hda_intel 0000:00:1f.3: Unstable LPIB (351920 >= 176400); disabling LPIB delay counting
[*] Done

The program did not work with my laptop even when it installed properly. Secure boot is disabled. I rebooted after install, still no luck.Both turbo mode and keyboard did not work.

I am happy to help you with this. If I have to do something (like finding WMI ID) I can help (need some help, because I am not good at these kernel stuff)

Support exists for PH315-53, which worked really well, kudos to it!

SuperSecureHuman commented 2 years ago

Different error after restarting (during ./install)

make -C /lib/modules/5.11.0-38-generic/build M=/home/venom/repo/acer-helios-300-rgb-keyboard-linux-module modules
make[1]: Entering directory '/usr/src/linux-headers-5.11.0-38-generic'
make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-38-generic'
rmmod: ERROR: Module acer_wmi is not currently loaded
insmod: ERROR: could not insert module src/facer.ko: File exists
[   20.922716] audit: type=1107 audit(1635007748.704:57): pid=952 uid=103 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/PolicyKit1/Authority" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.10" pid=2329 label="snap.snap-store.ubuntu-software" peer_pid=970 peer_label="unconfined"
                exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
[   27.255323] kauditd_printk_skb: 2 callbacks suppressed
[   27.255342] audit: type=1400 audit(1635007755.036:60): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/gdm/greeter/applications/gnome-initial-setup.desktop" pid=2329 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[   27.267569] audit: type=1400 audit(1635007755.048:61): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/gdm/greeter/applications/gnome-initial-setup.desktop" pid=2329 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[   27.612306] audit: type=1326 audit(1635007755.392:62): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.snap-store.ubuntu-software pid=2329 comm="pool-org.gnome." exe="/snap/snap-store/547/usr/bin/snap-store" sig=0 arch=c000003e syscall=93 compat=0 ip=0x7f4f995144e7 code=0x50000
[  454.355056] acer_wmi: Acer Laptop WMI Extras unloaded
[  454.386313] facer: Acer Laptop ACPI-WMI Extras
[  454.386372] facer: Function bitmap for Communication Button: 0x801
[  454.399926] input: Acer WMI hotkeys as /devices/virtual/input/input38
[*] Done

I am running as root

RuiGuilherme commented 2 years ago

Acer default driver in the kernel needs to be loaded.

Try run this command: $ lsmod | grep acer_wmi

The output will be something like this:

➜  ~ lsmod | grep acer_wmi
acer_wmi               28672  0
sparse_keymap          16384  1 acer_wmi
rfkill                 32768  9 acer_wmi,bluetooth,cfg80211
wmi                    36864  3 intel_wmi_thunderbolt,acer_wmi,wmi_bmof
video                  57344  2 acer_wmi,i915
i8042                  32768  1 acer_wmi

If nothing shows up, it is' cause the driver is not being loaded. Maybe driver is listed on blacklist, try it: $ cat /etc/modprobe.d/* | grep acer_wmi

If print something, you need found the file where driver is listed and remove it.

SuperSecureHuman commented 2 years ago

image

That driver is present Trying again now. I updated kernel recently and have to test it now

SuperSecureHuman commented 2 years ago

Yes, it works now. I have to reinstall the the repo every time I reboot, but I can make it a startup script, and forget about it.

Sadly, the turbo button dosent work in my case. For controlling the fan, I use NBFC and it works like a charm (when ever it dosent work, I have to boot into windows, play with predator sense a bit, change it to default profile, and reboot to linux, and not shutdown. But it happens only sometimes, when I boot into windows, then into linux

Here the shortcut for keyboard brightness is fn + f10. For some reason, when using it for the first time after reboot, it dims the screen to 0%.

RuiGuilherme commented 2 years ago

Ok. Try it:

# ./uninstall.sh
# rm /dev/acer-gkbbl-0
# ./install.sh
RuiGuilherme commented 2 years ago

I made the comment before reading your last comment, can disregard my last comment haha. : D

SuperSecureHuman commented 2 years ago

No issues.

First, I need to see difference in performance for default mode vs turbo mode before I start actually caring about it not being available to me on Linux.

Put some worthy benchmarks to test it.

According to acer, it puts overclock on GPU and CPU. My doubt is, how will u overclock a 11800H? It's a locked variant 🤔

RuiGuilherme commented 2 years ago

Overclock should be done only in the GPU. You can confirm going on Windows and test offical driver.

JafarAkhondali commented 2 years ago

Thanks to https://github.com/JafarAkhondali/acer-predator-turbo-and-rgb-keyboard-linux-module/pull/23, you can now install repo as a service, so you don't have to reinstall it after reboot. I Also think CPU overclocking is doesn't work (OS-independent), but overclocking GPU worked with some benchmarks.


GpuTest 0.7.0
http://www.geeks3d.com

Module: FurMark
Normal mode Score: 7289 points (FPS: 121)
Turbo mode Score: 7675 points (FPS: 127)
Settings:
- 1920x1080 fullscreen
- antialiasing: Off
- duration: 60000 ms

Renderer:
- GeForce RTX 2060/PCIe/SSE2
- OpenGL: 4.6.0 NVIDIA 460.32.03
JafarAkhondali commented 2 years ago

Feel free to re-open if your issue is not solved