Hello there,
Tuxedo Computers has released tuxedo-fan-control, a program that introduces fan control on Linux-based systems for Clevo barebones.
Project: https://github.com/tuxedocomputers/tuxedo-fan-control
Relatively straight-forward to build and deploy on many Linux variants, from Debian based systems all the way to the SUSE family.
For back-light control, take a look at this: https://github.com/tuxedocomputers/tuxedo-keyboard
I'll test this on the P751DM2-G later on in the day and report back with results.
Limitations and usage:
See the user guide: https://github.com/tuxedocomputers/tuxedo-fan-control/blob/master/docs/user/user_manual.md
Dev manual, see: https://github.com/tuxedocomputers/tuxedo-fan-control/blob/master/docs/dev/dev_manual.md
The notes in the second document point out the first known limitation concerning dual-fan GPUs found on some models, such as the P955ER: Only one GPU fan in such a setup can be controlled.
On future goals for the projects:
Tuxedo intends to upstream this work , separating the older WMI driver into multiple submodules and clean-up work needed to merge this to the Linux kernel. We can expect multiple WMI drivers for Clevo based barebones that can be configured in the kernel in the future.
FYI: The fastest way to track changes in the Linux kernel without subscribing to the LKML is through the kernel newbies changelog. It has a good summary of what to expect in the current stable kernel.
-
-
Excellent news! Thanks for sharing!
I plan on dual booting Linux and Windows. -
My hands have been pretty tied up this week (embedded systems dev work is time consuming), haven't had the time to test the fan controls on Linux (yet).
What system are you on at the present? -
I run Ubuntu 18.04 on my current HP laptop. All of my servers are Linux based as well.
I have approximately 3 dozen different VM's that I run on my laptop based on the work I need to do at the time. (No, I don't run them all at the same time!) -
@ Dennismungai,
Finally got around to checking out your software. The keyboard software works great!
Having issues trying to build the fan control and I was wondering if the referenced deb file was available for download and if there is a cost involved? I'm running Ubuntu 18.04. There appear to be some missing script files and the build fails.
Thanks
John -
autoconf, automake and build-essential packages?
They can be installed via:
apt install autoconf automake build-essential nodejs
-
@rommer you're correct.
The build instructions are lacking.
These instructions should provide you with a working build: https://gist.github.com/Brainiarc7/f7da590bee1ed35ac5ed258ff9335fd6#file-14-fan-control-md
I'll open a pull request on the project to have this documentation included. -
I was able to work on this today and it worked great with one minor issue.
The final instruction fails with no file found and needs to be changed:
Original: sudo apt install output/build/*.deb
Fix: sudo dpkg -i output/build/*.deb
After that, it's working great. -
Update: Done.Last edited: Dec 22, 2018 -
Thank you (and Tuxedo) for this you disgustingly beautiful m*********! I have an old Clevo (2014) and it only has a CPU fan that up until now has been running at 100% whenever I breathed near my laptop. My room sounded like the inside of a cargo plane on Skype calls, and I could never access the BIOS fan controls for lack of new drivers. Now, I modified the daemon code a bit and the CPU fan speed follows the table whether it's my CPU or GPU starting to heat up. Much, much.. much quieter. I was considering ending it all, but this saved my life.
Whoever it was at Clevo or XMG/Schenker that set the fan speeds on my laptop deserves to live in a server farm.Dennismungai likes this. -
-
Thank you and props to Tuxedo for this wonderful piece of software. I made some minor changes in the source code and managed to build and run it on a Clevo P651SE bought from CEG-Hardcorecustom running the premamod BIOS. Basically, I had to bypass the check for vendor name and board / BIOS model before compiling the source code. I never had such a silent Clevo before.
Thanks again! -
-
See these 3 functions: isTuxedoDevice(), getDmiModelVendor() and getDmiModelName() in src/common/system.ts ( https://github.com/tuxedocomputers/tuxedo-fan-control/blob/master/src/common/system.ts) -
-
hmscott likes this.
-
Can someone please tell me how this software technically works? I mean, what would I have to do to control the fan manually?
For reference, in Thinkpads (e.g. T430) there is /proc/acpi/ibm/fan and I can manually set fan speeds according to [1]. What would I have to do to do the same thing on a Clevo laptop?
I have no Clevo laptop yet, so I only skimmed the source code, but I didn't find any obvious hints like a path in /proc.
Do I need a special kernel module to expose such an interface? The binary Ubuntu package doesn't seem to contain one.
[1] http://www.thinkwiki.org/wiki/How_to_control_fan_speed -
Technically, the fan is controlled by writing to io ports of the EC chip.
This is what the tuxedo utility does ( https://github.com/tuxedocomputers/tuxedo-fan-control). No special kernel module is required for that (besides the standard ec_sys).
Tuxedo has a special kernel module for controlling keyboard led: https://github.com/tuxedocomputers/tuxedo-keyboard.
There is also a deprecated old kernel module by tuxedo (tuxedo-wmi), which has been complemented by several people over the time, but tuxedo does no longer maintain it.
Some version also offer access to the fan control via hwmon / sysfs interface. You can check my fork here: https://github.com/davidrohr/clevo-xsm-wmi
Another tool is https://github.com/davidrohr/clevo-indicator (check also the other forks). Some people reverse engineered a clevo windows tool that was around in the wild.
It basically does the same as the tuxedo-tool, or the modified kernel module: writing to the ec io ports.
Probably, sticking to the tuxedo tools for fan control and the kernel module for the keyboard is simplest.
If you want to play around more with it, you can also check the the forks I pointed to in my github.
Of course, everything is without any warranty.
The most dangerous thing is: all these tools do fan control in software. They fix a certain fan speed. If you set the speed to low and run some compute intense stuff, the laptop will simply overhead. There is no safety feature for the fan speed. There is only a hard shut down once the laptop reaches a certain temperature, but that is certainly not so healthy. -
Thanks for the info!
I'm currently sitting on a Dell E6230 running Debian, where I can monitor (but not set) the fan speed via /sys/class/hwmon/hwmon1/fan_input. I believe I see something resembling this in your code under [1], but I'm not sure. (My C is very rusty.)
no kernel modules or dkms-related stuff, instead I see multimedia-related libs (ffmpeg, gles), a mostly empty dependency list in the control file and a "huge" binary that likely does a lot of other stuff besides reading temperatures and setting fan speeds.
Don't get me wrong, I'm not implying anything here, but out of curiosity I like to understand what a software does - especially when it comes from a 3rd party.
[1] https://github.com/davidrohr/clevo-xsm-wmi/blob/master/module/clevo-xsm-wmi.c
[2] https://deb.tuxedocomputers.com/ubuntu/pool/main/t/tuxedofancontrol/ -
Technically, it is an io port to which you can write in a C program when you are root. Probably, you can also do that with python or so, but I have no experience.
This is also what the tuxedo-tool does. I think the tool is pretty large because it uses electron for the GUI. If you want something that works out of the box, this is probably still the easiest way to go.
However, I never used it and I have no idea if you can control it with a script. Don't think it provides a file-based interface.
If you want a file-based sysfs interface, you can only use one of the customized clevo-xsm-wmi kernel modules. (Not that this is not maintained anymore). For me it works in a clevo P775 laptop. It should also do for other models, but I never tried that.
With the clevo-xsm-wmi module, you can monitor and set fan speeds via /sys/class/hwmon/... -
-
Ive tried building and installing but it wont apt install, have a Clevo PA70ES, and can get UI working without installing and without any fan controls :
$ sudo dpkg -i output/build/*.deb
(Reading database ... 314693 files and directories currently installed.)
Preparing to unpack .../tuxedofancontrol_0.1.8_amd64.deb ...
Failed to get unit file state for tuxedofancontrol.service: No such file or directory
Unpacking tuxedofancontrol (0.1.8) over (0.1.8) ...
Setting up tuxedofancontrol (0.1.8) ...
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE)
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)
No TUXEDO device found
Failed to enable unit: Unit file tuxedofancontrol.service does not exist.
Warning: The unit file, source configuration file or drop-ins of tuxedofancontrol.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Job for tuxedofancontrol.service failed because the control process exited with error code.
See "systemctl status tuxedofancontrol.service" and "journalctl -xe" for details.
dpkg: error processing package tuxedofancontrol (--install):
installed tuxedofancontrol package post-installation script subprocess returned error exit status 1
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Errors were encountered while processing:
tuxedofancontrol
$ uname -a
Linux <host> 4.19.19-041919-generic #201901310331 SMP Thu Jan 31 08:33:47 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
-
That program won't run (by default) on a non-Tuxedo notebook.
Your best bet is to build it from source then copy the AppImage binary to a location of choice (/usr/local/bin is a good start), then write a systemd unit for the app with the launch argument --novendorcheck.
Take a look at https://github.com/tuxedocomputers/tuxedo-fan-control/blob/master/docs/dev/dev_manual.md -
Building default source myself then manually running with --novendorcheck as in my previous post works, but is a 'view only' of your system fans and temp. You cannot control anything. Attempting to run as a service just does nothing / daemon runs but fans stay running high.
The dev manual does not help but the hack and rebuild hint by banskt and then install works. Very pleased with my now mildly slightly hotter but significantly quieter Clevo PA70ES running Ubuntu 18.04:
1. Edit ../src/common/system.ts
2. Line 94 just change return false to return true on function no matter what.
/**
* Check if the device a TUXEDO device
*
* @returns A boolean that indicat is a TUXEDO or not
*/
public static isTuxedoDevice(): boolean
{
if(this.getDmiModelVendor().toLocaleLowerCase() === "tuxedo")
{
return true;
}
return true;
}
Makes the check void, and risky for any laptop, so beware.
3. Build and package and install as instructions / README.md. Daemon should be running and automatically throttling fans. I did not change any default FAN Duty settings or anything, they seem fine.
4. Watch temperature carefully and slowly stress CPU and GPU separately and make sure fans speed up appropriately.
So goodDaemon is running below:
Attached Files:
-
Clevo Fan Control for Linux
Discussion in 'Sager and Clevo' started by Dennismungai, Oct 31, 2018.