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

How does WMID_gaming_set_fan_mode() work

Open Wer-Wolf opened this issue 10 months ago • 11 comments
trafficstars

Hello,

i am currently try to add support for manual fan control to the acer-wmi driver. Setting the fan speed already works, but i need to find a way to switch the fans back to automatic mode.

Because of this i want to ask how WMID_gaming_set_fan_mode() works internally.

Thanks, Armin Wolf

Wer-Wolf avatar Jan 06 '25 16:01 Wer-Wolf

Hello, What happens when you use this?

		/* Turn off turbo led */
		WMID_gaming_set_u64(0x1, ACER_CAP_TURBO_LED);

		/* Set FAN mode to auto */
		WMID_gaming_set_fan_mode(0x1);

		/* Set OC to normal */
		WMID_gaming_set_u64(0x5, ACER_CAP_TURBO_OC);
		WMID_gaming_set_u64(0x7, ACER_CAP_TURBO_OC);

JafarAkhondali avatar Jan 07 '25 14:01 JafarAkhondali

This works, but i want to control the fan mode for each fan separately.

Wer-Wolf avatar Jan 07 '25 16:01 Wer-Wolf

@Wer-Wolf - you should check out this repo: https://github.com/snowyoneill/Linux-PredatorSense

snowyoneill avatar Jan 21 '25 16:01 snowyoneill

Interesting, but i i am using the WMI interface.

Anyway i will try to perform some tests myself.

Wer-Wolf avatar Jan 21 '25 23:01 Wer-Wolf

@Wer-Wolf Take a look at this one: https://github.com/0x7375646F/Linuwu-Sense/blob/447258a1274c8a2996fc8994f4e8e689be83904f/src/linuwu_sense.c#L2887

@0x7375646F recently created it, but I believe it's not tested for all models

JafarAkhondali avatar Feb 03 '25 15:02 JafarAkhondali

Thank you very much, this is exactly what i need.

Wer-Wolf avatar Feb 03 '25 15:02 Wer-Wolf

@Wer-Wolf Thanks to @0x7375646F :)

By any chance @Wer-Wolf, I see you also work on Dell Alienware, It looks like the M16 R2 model is using USB for RGB control & other things (not WMI), but I couldn't find any code implemented in the Linux kernel. Do you know if it's implemented or if there has been some progress on it? If not, I might be able to help.

JafarAkhondali avatar Feb 03 '25 18:02 JafarAkhondali

I do not directly work on alienware devices, but there is another developer working on it right now.

If you want i can give him your contact info.

Wer-Wolf avatar Feb 03 '25 18:02 Wer-Wolf

That would be great!

JafarAkhondali avatar Feb 03 '25 19:02 JafarAkhondali

Hi Jafar,

By any chance @Wer-Wolf, I see you also work on Dell Alienware, It looks like the M16 R2 model is using USB for RGB control & other things (not WMI), but I couldn't find any code implemented in the Linux kernel. Do you know if it's implemented or if there has been some progress on it? If not, I might be able to help.

I am currently working on the alienware-wmi upstream linux driver.

As you mentioned, RGB control is not done through a WMI interface, so unfortunately it lies out of my knowledge. Also this USB device is present on most newer (maybe >2016? I could be wrong) Alienware and Dell gaming laptops. This is the device present on my laptop Alienware x15 R1:

Bus 003 Device 002: ID 187c:0550 Alienware Corporation LED controller

Thankfully no kernel drivers are required, because these devices are already exposed through the HIDRAW interface, but as I said, I don't have experience with this so I don't know for sure.

It would be amazing to have a tool for RGB control and probably contributing to OpenRGB is the way to go.

This project could also be of great help alienfx-tools. It supports A LOT of models, has some documentation and the developer is very helpful and active.

If you end up working on this let me know, I'd love to help in some way!

kuu-rt avatar Feb 04 '25 03:02 kuu-rt

Hi @kuu-rt I can confirm that the model I'm working with (90H8X54 - M16 R2) uses USB. I've seen some WMI requests for thermal control, but I have not yet checked that part carefully. Interestingly, the USB device ID is similar but not the same (notice that last digit): Bus 003 Device 005: ID 187c:0551 Alienware Corporation AW-ELC.

I was able to change the touchpad color in Linux using USB. If I can have some better progress I'll create a repo for it later. Contributing to OpenRGB would be nice, however, I still prefer some features to be available in the Linux kernel by default, without 3rd party software. I've also tried using alien fx-tools but it didn't work for this laptop on Windows. The only issue is that there are TONS of features for this laptop:

  1. Per key RGB
  2. Touchpad RGB
  3. Alien head logo in front
  4. Alien head logo back
  5. quiet mode, high-performance mode, etc

Then for each coloring mode, there are many different modes as well(static coloring, dynamic coloring ...)

JafarAkhondali avatar Feb 04 '25 17:02 JafarAkhondali