acer-predator-turbo-and-rgb-keyboard-linux-module icon indicating copy to clipboard operation
acer-predator-turbo-and-rgb-keyboard-linux-module copied to clipboard

Allow fan control via character device (e.g. "echo 1 > /dev/acer-max-fan-0")

Open TheFeshy opened this issue 1 year ago • 6 comments

Creates a fan control device for any of the listed laptops with a fan quirk. This device can accept ascii or binary input (e.g. can be written to with echo, or via a program like python writing 0x00 and 0x01.)

echo 1 > /dev/acer-max-fan-0 to turn on, echo 0 > /dev/acer-max-fan-0 to turn off again.

I split the capabilities so that we can distinguish between laptops that have a turbo button, and laptops that don't but still have the fans controlled via the EC. I put my own laptop (the PH517-61) in this category, and also the PH517-51 (as it's the same laptop but with Intel/Nvidia.)

TheFeshy avatar May 11 '23 23:05 TheFeshy

Thanks @TheFeshy Can you please add sample usage to readme? Can someone test this functionality on your device please?

JafarAkhondali avatar May 12 '23 09:05 JafarAkhondali

@JafarAkhondali I'll try to test this in the next few days.

hornc avatar May 21 '23 22:05 hornc

Ok, I have checked out the PR and re-installed on my AN515-57. It took a reboot to have the device show up under

/dev/acer-fan-max-0

After a bit of messing around I realized the test commands above are wrong, it has max-fan instead of the correct device fan-max

it should be:

echo 1 > /dev/acer-fan-max-0 to turn on, echo 0 > /dev/acer-fan-max-0 to turn off again.

I was able to run both commands without sudo, but didn't notice any obvious change in fan speed or behavior however.

When I run sensors I don't see any fan info normally. I have not set up any other fan monitoring sw.

hornc avatar May 25 '23 00:05 hornc

I'm doing this. See my profile.

DetuxTR avatar Jul 27 '24 19:07 DetuxTR

@DetuxTR Cool, did it work? Do you plan to keep it in your project or merge it with the Linux kernel as well? Unfortunately, it's not possible to use the same GUID with different drivers, so we can't use your work with this repo at the same time. It would be nice to push the changes to the kernel and\or this repo as well. We also plan to use the latest changes from the kernel. I don't know how many more years we can keep this project or other projects but at some point, the best option is to push them to Linux as it's maintained properly.

@hornc maybe you can help as well? It's a good feature and many users requested it.

JafarAkhondali avatar Jul 30 '24 15:07 JafarAkhondali

@DetuxTR Cool, did it work? Do you plan to keep it in your project or merge it with the Linux kernel as well? Unfortunately, it's not possible to use the same GUID with different drivers, so we can't use your work with this repo at the same time. It would be nice to push the changes to the kernel and\or this repo as well. We also plan to use the latest changes from the kernel. I don't know how many more years we can keep this project or other projects but at some point, the best option is to push them to Linux as it's maintained properly.

@hornc maybe you can help as well? It's a good feature and many users requested it.

Yeah, its working very well if you know what do you are doing. I will maintain project and im thinking merge to linux kernel. But there is A problem. First problem is i cant get fan behaviors, its important for last user beacuse of setting fan mode to manual on starting kernel if mode is on automatic. When i try to get behavior on linux output is every time 0. But on windows, with same inputs value is 768(manual),256(auto) for cpu. If i can fix this i will optimize the code and i will make a gui app and systemd and openrc services.

DetuxTR avatar Jul 30 '24 19:07 DetuxTR