dominiksalvet / asus-fan-control

Fan control for ASUS devices running Linux
MIT License
320 stars 37 forks source link

Fan speed never goes over 4800 RPM in GL553VE #124

Closed hfc2x closed 1 year ago

hfc2x commented 2 years ago

Environment AFC 2831af8, Manjaro Linux 5.15.71-1 kernel.

Description The maximum fan speed of this laptop is 5400 RPM, which can be reached in Windows, but this tool never maxes out the speed in Linux, only staying at 4800 as reported by sensors.

Replication Just run any graphically-demanding application, and let the fan accelerate. Even nearing 90ºC, typing sensors on the console will report 4800 RPM.

Additional context Installed with GitPack.

dominiksalvet commented 2 years ago

I recommend having a look at #114 and other issues. Maybe @arruor (the first tester of GL553VE) will have some info...?

arruor commented 2 years ago

You will need lm-sensors and fancotrol packages installed. Please note: On Manjaro package names may differ.

Start by sudo sensors-detect and answer yes to all questions. If you feel unsure, read the comments and try to search a web and get some high-level overview before answering yes to all questions. At the end of the detection you will get a list of modules that need to be loaded.

Then continue to configuring fancontrol by executing sudo pwmconfig. Please note: Specifying which sensor to use could be a bit tricky. Make sure to use a temperature sensor for your core to base the fancontrol speed on. You could use this man page to get some useful info on the settings and what they really do.

You could check if you have a control over the fan by:

# echo 255 > /sys/devices/platform/asus-nb-wmi/hwmon/hwmon[[:print:]]*/pwm1           # Full fan speed (Value: 255)
# echo 0 > /sys/devices/platform/asus-nb-wmi/hwmon/hwmon[[:print:]]*/pwm1             # Fan is stopped (Value: 0)
# echo 2 > /sys/devices/platform/asus-nb-wmi/hwmon/hwmon[[:print:]]*/pwm1_enable      # Change fan mode to automatic
# echo 1 > /sys/devices/platform/asus-nb-wmi/hwmon/hwmon[[:print:]]*/pwm1_enable      # Change fan mode to manual
# echo 0 > /sys/devices/platform/asus-nb-wmi/hwmon/hwmon[[:print:]]*/pwm1_enable      # Change fan mode to full speed

You have to use /sys/devices/platform/asus-nb-wmi/hwmon/hwmon[[:print:]]*/pwm1 because hwmon1 could change after reboot.

Unfortunately I am not able to help you with concrete values or instructions because I've recently switched to Dell XPS 15.

Last but not least, please note that there is a risk to burn your CPU when playing with mainboard's fan control. I'll leave here the fancontrol warning too.

Please be careful when using the fan control features of your mainboard, in addition to the risk of burning your CPU, at higher temperatures there will be a higher wearout of your other hardware components, too. So if you plan to use these components in 50 years, maybe you shouldn't use fancontrol at all. Also please keep in mind most fans aren't designed to be powered by a PWMed voltage.

In practice it doesn't seem to be a major issue, the fans will get slightly warmer, just be sure to have a temperature alarm and/or shutdown call, in case some fan fails, because you probably won't hear it anymore ;)

hfc2x commented 2 years ago

Those are the instructions in the Arch wiki, which don't work for this particular model. It doesn't work for a lot of Asus laptops, actually.

I made a far more detailed post in the Manjaro forums asking for help like 2 weeks ago because pwmconfig doesn't detect any fans, but no one has responded so far, so it's a dead end on that front.

Last but not least, please note that there is a risk to burn your CPU when playing with mainboard's fan control. I'll leave here the fancontrol warning too.

Please be careful when using the fan control features of your mainboard, in addition to the risk of burning your CPU, at higher temperatures there will be a higher wearout of your other hardware components, too. So if you plan to use these components in 50 years, maybe you shouldn't use fancontrol at all. Also please keep in mind most fans aren't designed to be powered by a PWMed voltage.

Thanks for the warning, by the way. I'm more concerned by the fact that the fan doesn't spin as fast in Linux as it did in Windows precisely because of the extremely high temperatures it reaches because of that, which will ironically lead to hardware damage due to temperature. Right now, whenever I'm playing a graphically-demanding game, my GPU goes up to 90ºC and higher, when in Windows it never went past 85, due to the fan spinning at 5400 RPM. I know it has to be possible to replicate it in Linux, but I haven't had any success. Damaging the fan isn't really a huge concern, considering it's a relatively cheap piece to replace.

I've been running kernel 5.19 for a while because I read it's possible to define custom fan curves (since 5.17, IIRC), but I haven't found any documentation on how to achieve it, nor have I gotten any answer with regards to achieving speeds up to what's possible in Windows out of the box. And no, I don't want to switch back to Windows lol.

dominiksalvet commented 1 year ago

@hfc2x Any updates?

hfc2x commented 1 year ago

No, nothing sadly. Seems like this laptop's fan is impossible to control using Linux, because the Windows driver uses some obscure proprietary code to control the fan through the UEFI, and the UEFI of these laptops is locked down for those functions unless you go out of your way to unlock it (which I'm not willing to do).

Oh well, I guess it's time to get a desktop computer lol.

hfc2x commented 1 year ago

By the way, as a side note, I think the problem is that the reported 100% speed (or voltage, idk) for this fan model is indeed 4800 RPM, Linux assumes if it goes above that, it could cause damage.

Thing is, the Asus driver for Windows actually "knows" the true top speed is 112.5% of the reported maximum RPM, so the UEFI allows it to spin that much faster when Windows requests it.

I don't think it's within the scope of this app to solve this problem (that the reported 100% speed of the fan is not the "true" 100%), so I don't think anything can be done here. Someone would have to reverse engineer the Windows driver's behavior and create a pull request to the Linux Kernel upstream, which I don't think is likely to happen.