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

PH315-52 Kernel panic #52

Closed ramonssouza closed 1 year ago

ramonssouza commented 2 years ago

What Linux distribution do you use? I can't use it on Manjaro and Fedora 36

ramonssouza commented 2 years ago

IMG_20220708_235532

ramonssouza commented 2 years ago

opensuse tumbleweed working perfectly fine

dhruv8sh commented 2 years ago

Working fine on pure Arch and EndeavourOS... Panics on Manjaro, Garuda even after background service stopped! Hardware: Acer Nitro AN515-56.

JafarAkhondali commented 2 years ago

@ramonssouza I'm using Pop-os as it works out of the box with Nvidia graphic cards.

JafarAkhondali commented 2 years ago

@dhruv8sh if background service is stopped, the kernel module won't load so it should not interfere with kernel at all. Try removing everything related to this project and debug it. Maybe you forgot to disable the service ?

ramonssouza commented 2 years ago

Happens with pop-os 22.04 too, when I turn off the notebook this problem appears

wagyourtail commented 2 years ago

I've had this as well on Arch (I also have a ph315-52) didn't realize it was caused by this... doesn't really inconvenience me too much, I just hard power off when it comes up because it only happens when I'm shutting down the system anyway.

JafarAkhondali commented 2 years ago

I can't debug it as I don't own my Acer Predator anymore(physical damage). Hope someone else can work on this

ramonssouza commented 1 year ago

Is there any news regarding this bug?

x211321 commented 1 year ago

I’m running the module on a Nitro AN515-45 (4 RGB zones / no turbo). The module worked well with my previous Linux Mint setup (besides the static RGB mode not working).

A couple of days ago I switched to fedora 36 and now I’m experiencing what I assume to be this exact issue: sporadic kernel panic during shutdown (though on the bright side the static mode is now working).

uname -r 5.19.16-200.fc36.x86_64

Since I know nothing about the development and debugging of kernel modules I poked around the script files and started to wonder whether the unloading of the facer module during ExecStop and the subsequent reload of the acer_wmi module could be the cause of this problem.

So I removed the ExecStop key from the service configuration and now the issue seems to be gone. Before the change I had kernel panics roughly every second or third reboot. Now after roughly 20 reboots not a single panic occurred.

Of course this could just be coincidence but maybe its a clue to what is happening. Maybe someone else could try those steps and check if the behavior is reproducible for them.

Steps I took: 1) check out the repo 2) If the module/service is already installed run: uninstall_service.sh 3) Remove the line ExecStop=/bin/bash ./uninstall.sh from install_service.sh 4) Run install_service.sh 5) If SELinux protection is active (fedora default) run:

semanage fcontext -a -t modules_object_t /opt/turbo-fan/src/facer.ko chcon -t modules_object_t /opt/turbo-fan/src/facer.ko

Otherwise the install script run by systemd cannot access the module.

Alternatively if everything is already set up and working: Removing the ExecStop key from /etc/systemd/system/turbo-fan.service should have the same effect.

Of course once those modifications have been made systemctl stop turbo-fan.service will no longer have any effect. To restore the stock acer_wmi module you could either run /opt/turbo-fan/uninstall.sh or rmmod facer and modprobe acer_wmi manually.

Again I have no idea if this is actually the cause of this issue but to me it appears as if the kernel is simply unhappy to have those two modules switched during shutdown.

JafarAkhondali commented 1 year ago

Can someone verify @x211321 solution?

ramonssouza commented 1 year ago

I'll test it on my notebook, thanks in advance for the help

ramonssouza commented 1 year ago

It seems to work fine now. Thanks!

pratyush3757 commented 1 year ago

The fix mentioned by @x211321 works for me too. I tried it on PH315-52, Manjaro, one month ago. And didn't have any panics during shutdown/reboot since.