-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tool for linux #434
Comments
All you need to port my SDKs (Fan and FX). Now it uses Windows APIs, you need to alter it to Linux one. CLI will work after without any changes. |
I'm not a coder in any way so how do we go about doing any of this? |
I'm sorry, bro. Find a coder. |
I'm interested in doing this. I think the first steps would be to switch build systems to CMake and then port all the USB HID code to a cross-platform library like hidapi. The WMI calls are tricky. Some stuff is implemented in dell_wmi but it's really barebones. I'd probably have to write a bunch of stuff to get everything working. The ACPI calls should work. I might have to use the old For now I've been using Dell-G15-Controller but it's mostly GUI-only |
Right. ACPI have issue - main method name is quite stable (WMAX), but it's position into device tree and device name vary from system to system. |
That's nice, thanks. I've been messing around with bmfdec but it seems to be missing the first 12 WMI methods from AWCC. Hopefully your tool can find them. |
NB: it's using .rw dump format, from RWEverything. |
I use linux but never developed something specific for linux (devices, drivers, etc). But Im embedded developer and have some skills to help this. Of course, I have one M16 R1 (i9 13900HX + 4060) and can help with tests and so on. |
This port doesn't need to develop any drivers, you just need to be familiar with USB HID (using some lib or directly) and some skill working with Linux ACPI device. |
I think the best way for me to work on this is to dual-boot both Windows and Linux. Wine and QEMU device pass-through don't work super well with this. ACPI calls on Linux are somewhat hard to do well. You either need a specific driver to abstract the calls to something more user friendly or you can use In my experience |
I have some friends that work with advanced embedded linux devices. I will ask about this theme and if can help us. I really want this features to control fan and kayboard rgb on ubuntu. Lets try to do this. |
Ok, guys, i wish you good luck and feel free to ask me about details. |
I get acpidump from my alienware m16 r1 (i9 13900Hx + rtx 4060) but I cant find any path do test some fan commands. Im really lost about everything, but will try with some help |
I have a small tool here - rwdec. |
Hello! Support for switching the AWCC thermal profiles on Linux has already been merged upstream and will be available on Linux v6.13. To test it before it hits stable, pass force_platform_profile=1 parameter to the alienware_wmi module. Your model supports the WMI interface, so I will submit a patch adding your model to the allowlist, so you won't need the module parameter. You can switch thermal profiles using the power slider on KDE and Gnome or by using the platform profile interface, which has more profile choices [1]. If you manage to successfully test it, I can add a Tested-by tag when submitting the patch. [1] https://docs.kernel.org/admin-guide/abi-testing.html#abi-sys-firmware-acpi-platform-profile |
Wow! Hope they configured out it just need to check AWCC WMI function exist to be sure it's Alienware/G-Series. And also how to control fans. |
Unfortunately there is not a way of decoding bmof data in kernel-space, so every supported supported model has to be added to an allowlist for now. That's why I implemented force_platform_profile and force_gmode kernel parameters to let users bypass this allowlist and tests this new features. I will submit patches for manual fan control with the custom profile (0x00) through the HWMON interface soon. Another feature which was recently merged was needed before that. I am the author of these new Linux features so if anyone has questions of suggestions, let me know! |
@kuu-rt Amazing! Sorry for my lack of in-depth knowledge about Linux. How can I test this on Ubuntu before waiting for canonical releases a new version with this kernel? Or I will need to wait? I really want this features and will use daily. |
Oh, I installed v6.13-rc1 sucessfully on my ubuntu 24.04! I trying to use this force_platform_profile=1 and finding where/how to change profiles. Any help is good. --Edit 1-- @kuu-rt Ok, this is working at m16 r1. How can I set fan threshold like AWCC, for example to stay fan at least 30% (offset)? |
@urbanze I'm glad it worked :) Is it ok if I use your name and email when submitting the patch adding your model to the allowlist?
Manually controlling fans is not supported yet, but I'm already working on it! |
@kuu-rt I wouldn't see any problems, but since someone might get in touch claiming bugs or problems, thinking that I can solve them, it's better for me to stay out of it, since I won't be able to help at all LOL Please let me know when you implement this feature and I will test it the same day! This will help me a lot in keeping my laptop cool so I can use it on my lap from time to time. |
Oh, i glad to hear someone start to do real stuff!
It's not so hard, check mine rwdec tool - you need to find mapping for AWCCWmiMethodFunction. You don't need to do it in kernel, by the way, but just map once into settings. Also, check mine Fan SDK v1 (direct ACPI) - it have some hints about how to detect and use DPTP/KRDT temperature sensors present into hardware. Quite easy too. Also, i attach mine working notes here - it's about call mappings for ACPI main function (it's always the same for any notebook, but different for desktops - shifted by -4). And some rwdec result for different models - it have a hint for function codes. |
@urbanze Oh don't worry. It's just a way to give credit to testers on the commit message, you are not expected to solve anything :)
For sure! It will be finished and submitted upstream in the following weeks. |
In Linux there is no easy way to call WMI (or any ACPI method for that matter) in userspace without custom drivers. That's why the alienware-wmi Linux driver needs to know AWCCWmiMethodFunction mapping ahead of time, which means I have to manually specify each model's quirks. Of course that's very tedious, but unfortunately there is no other way for now.
I'll check it out!
This and Fan SDK v2 are helping me a lot in understanding some of WMAX's methods. Thank you so much @T-Troll. I'll be sure to credit you once I submit the manual fan control and sensor monitoring features upstream :) |
You don't need WMI, in fact. You just need to find all ACPI devices with _HID = PNP0C14 and then decode WQMO buffer to configure out is WMAX on this device mapped to AWCCWmiMethodFunction or not. |
This tool works nicelly with Alienware m16 r1 (i9 13900HX + RTX 4060) in W11, but I use Ubuntu (24.04) most of time to to develop and work. Someone can give me any ideia to use this tool in linux?
I really want to control fans speed in linux (most important) and after this, of course, control some RGB LEDs to get more FPS on vscode xD. So, how fans are controled (BIOS, pwm, etc)? How LEDs are controled (bus, protocol, etc)?
The text was updated successfully, but these errors were encountered: