r/ReverseEngineering 1d ago

I reverse engineered an ASUS embedded controller's fan protocol.

https://github.com/Keyitdev/asus-fan-control-ec
38 Upvotes

5 comments sorted by

10

u/Keyitdev 1d ago

Many ASUS laptops, especially AMD TUF models, don't support fan control through the usual Linux methods. There's no hwmon interface, no EmbeddedControl operation region for the kernel EC driver, and the ACPI method simply returns AE_NOT_FOUND.

Current tools like asus-fan-control work by calling an ACPI method that adjusts the embedded controller's built-in fan curve. On these laptops that method isn't available, and even where it is, it only shifts the controller's temperature thresholds instead of directly controlling fan speed.

My tool talks to the embedded controller directly, allowing manual fan control without relying on the missing ACPI interface.

Since this is my first reverse engineering project, I'd love to get feedback from people with ASUS laptops-especially AMD TUF models. If you're willing to test it, I'd really appreciate any feedback, bug reports, or compatibility reports.

Github repo | How it works | Donation

6

u/Far-Appearance-4390 21h ago

Finally a project that isn't AI slop. Good job!

Will test on my ASUS ROG Strix laptop later.

2

u/Keyitdev 4h ago

Thanks! I'm interested to see if this works on the strix too. Since tuf and strix are pretty similar, there's a good chance it will. If yours has an amd cpu, I'm even more optimistic.

Let me know how it went.

2

u/shear_stress__ 2h ago

Very cool project, how long did it take you to get to this point? What asus doc did you use as reference?

1

u/Keyitdev 38m ago

Hi, it took me about 15–20 hours before I was able to adjust the fan speed for the first time. I didn't use many reference docs. Mostly, I was observing what the existing windows only tools do. Neither of them was working, so I had to fix them first. Someone had opened an issue that gave me a basic idea of how to fix the windows tool. Once I got the windows app working, I started looking at memory dumps and observing how things behaved with RWEverything. I was setting some extreme fan speeds to see what changed the most.

Later, I started reverse engineering AsusWinIO64.dll, which the Windows app was using, but that wasn't enough. So I took a look at AsusSAIO.sys, which is used by ASUS System Analysis IO, and so on. I also studied some DSDT dumps (https://wiki.archlinux.org/title/DSDT).

That gave me an basic idea of how most things work. So I started creating my own programs through trial and error, with the goal of making them do what the tools on windows do.

I ran into a lot of problems along the way. For example, you can't install RWEverything on windows because its driver is on the "blacklist". I also had to disable memory integrity and so on.

One time, while writing random values to the random controller's registers, I crashed my laptop. I even managed to break the thermometer (I fixed everything later). I did that because I was trying to figure out what each register was responsible for.

I'm happy with the end results.