Open skobkin opened 4 years ago
Hi @skobkin ,
I think that's out of scope of atrofac. Why? atrofac does not really control the fans itself, it just sends a command to the asus-driver (ATKACPI
) ... this driver does the rest. ... and this driver is not available on linux. I decompiled the driver and it seems to use WMI (Windows Management Instrumentation). Writing such a driver is beyond my skills.
I found some information on the web:
https://github.com/electrified/asus-wmi-sensors
"No, fan control is not part of the Asus sensors WMI interface. It may be possible via an undocumented method, but that would require reverse engineering effort."
https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.3-Platform-x86-Updates https://github.com/torvalds/linux/blob/v5.4/drivers/platform/x86/asus-wmi.c#L2690
and this driver is not available on linux
As far as I understood there is ASUS_WMI driver in Linux kernel. Sorry, didn't see that you've mentioned it in the end.
Looks like it's for desktop motherboards, but still can be useful. Thanks.
I've found the project which is probably doing the same as yours (or more) on Linux: flukejones/rog-core.
So let this issue be here for anyone else who seeking for such software. Or maybe add small link to the README.md
?
Anyway thanks for your work :) ASUS software looks and behaves like crap and such minimalistic alternative like yours is very good to have.
This was recently linked in our discord channel. @cronosun do you know if the G14/G15 use a different format to the other Intel based laptops? I sort of assume so unless ASUS uses their own controller?
do you know if the G14/G15 use a different format
I have no idea - since I only own the asus G14 (AMD). It could work if it's an Intel-based notebook built by Asus (if they also use their ATKACPI driver for Intel notebooks - but I don't know for sure).
The fan curve seems to get passed to the EC in the same format you're working with. The 0x24 and 0x25 values don't get passed to the EC. I'm fairly sure they correspond to values in the DSDT. It's entirely possible they are consistent across different laptops but could just as easily be different.
This is probably the EC (on an AMD G14). Seems to be asus specific, no datasheet that I've been able to find. I couldn't get it any cleaner, I'm pretty sure it's IT8299.
I just posted a linux patch for GA401 at https://lab.retarded.farm/zappel/asus-rog-zephyrus-g14/-/issues/12.
You can use rog-core
with patched kernel: https://github.com/flukejones/rog-core
@cronosun the driver is using WMI for communication (as evident by the Linux kernal source code). (On Windows) Whenever power source changed, or on suspend/resume, ATKACPI sends an event to the WMI class AsusAtkWmiEvent
under root\WMI
. WMI is also used for initializing the ATKACPI interface ((Get-WmiObject -Namespace root/WMI -Class AsusAtkWmi_WMNB).INIT(0)
). Primary method of controlling is via DeviceIoControl.
I would prefer if folks used:
hid-asus
driver as a dkms module until the patch is upstreamed at least (proper driver for keyboard)(for linux)
Thanks for the pointers, I'm currently running gentoo-g14-next from zGentoo overlay which pulls in rog-core and a patched gentoo kernel. On the other hand as far as I know, they all support only switching predefined fan profiles (normal / turbo / "silent") and not the custom fan curves like atrofac and my patches can do.
If u are using dual boot,then simply run windows,turn off fans and switch to linux,it will work
Are you planning to support Linux?
Looks like currently there's no control software for ASUS Armoury Crate on Linux so it would be good to have one.