Jump to content

[SOFTWARE MOD] Linux Fan Control for Clevo (P775DM3)


qon

Recommended Posts

I am proud owner of a new Clevo P775DM3 laptop with 1080 gpu and 6700K processor. As I am using the system mostly as workstation (besides some gaming), I am a bit annoyed by the noisy fans and for several projects I need Linux so I set up a dual boot configuration. It took some time to aggregate some information of the hardware behavior, mostly from this forum, nodebookreview, and some other, so I hope it might help sum people to summarize my findings here. In particular, I am still not satisfied with the fan noise, so I am glad for any advise.

 

First of all: I like the system very much and also Linux runs pretty smoothly. It is an excellent compromise as a desktop replacement and the powerful hardware can easily handle workstation load. I player around with the clocks only shortly, and can operate the CPU at 4.2 or 4.4 with all cores in prime avx staying somewhat below 90 deg, so the cooling seems to work pretty well. My main concern however, is to operate it in a silent mode when idle, and from that perspective it totally failed. Obviously this is not relevant for overclocking, but I assume everyone is not constantly running games with headspeakers, so noisy fans are a major design flaw in my opinion. I made some progress so far, but I am not fine with the result yet.

 

I tried to reverse engineer the fan behavior as far as I could. My conclusions are:

- The settings Quiet / Multimedia / Performance in the ClevoControlCenter have little influence. They mostly apply different default settings. The main difference is between the fan modes (Full, Overclock, Automatic, Custom).

- The modes overclock and automatic seem to apply a fan curve that is defined in the embedded controller (EC), which is exactly the way I would it like to be. The difference between overclock and automatic is mainly a slower hysteresis (high pass filter) in the control logic, so it does not spin up fast at load spikes. In addition, the fan settings of the automatic mode at a given temperature are somewhat lower than in overclock mode, in particular at low temperatures. At high temperatures, both get very loud.

- The system has two fans, the CPU temperature regulates the left one, the GPU regulates the right one. In both cases (automatic and overclock), the systems gets really loud starting from around 50 deg.

- The custom mode lets me define a start and stop temperature for the fan, but essentially it is not working as intended. It does indeed stop the fan completely at low temperatures, but start and stop temperature are related (but not identical) to what I set. When I define a fan stop below 60deg and fan active at 70deg (centigrade), the fan starts to spin at around 55 deg, cools down the hardware to around 48, then it turns off again until the hardware has reached 55 again.

Because in a fanless mode the hardware reaches 55 in little time, this is no reasonable modus operandi, in particular because the fan seems to spin up fully for a short time when it sets in.

- After a reboot or suspend/resume, the fans revert back to overclock mode, even if I set them to automatic before. I would consider that a bug of the ControlCenter.

- When the system runs on battery, it seems to use yet another fan curve which is really silent and it dramatically cuts the clocks to around 2.4 GHz for the CPU. (In particular, it seems to me it does not cut the CPU clocks itself, but lowers the power limit.) Anyway, that fan curve might actually work well (system is silent even at 50 deg GPU temperature, fans spin up at really high temperatures), but I have no idea how how to activate it with PSU.

 

I also observed some throttling that was reported by PREMA before. When the GPU is used, CPU clocks are throttled. Somehow, this only happens on Windows. On linux, the CPUs will constantly stay at full clocks if both CPU and GPU are under load. I don't know how the throttling is implemented. Perhaps the linux pstate kernel driver is interfering with it. There is also some throttling when the GPU gets warmer (starting way before 90 deg). Perhaps that is why the standard fan curve tries to keep the card below 50 deg (see below).

 

Running idle, my system settles at around 35-40 deg CPU temperature and 50 deg GPU temperature (at 20 deg environment). I am actually wondering why the GPU gets so hot. Pascal is very efficient and in idle mode I would not expect it to drain much power. I would actually be interested in other people's idle temperature. I'll probably repaste the GPU when I find some time, but currently the warm GPU is actually convenient for tuning the system.

Anyway, this 50 deg GPU makes the fan always spin fast (at around 3k RPM), so the system is constantly loud. (For reading the fan RPMs: the hwinfo64 tool can read it for some clevo models (https://www.hwinfo.com/forum/Thread-Solved-Monitor-CPU-and-GPU-fan-RPM-on-Clevo-laptops?page=9).

 

So the fans are controlled via the EC, there seems no direct control of the fans the software. One has to speak with the EC. The common tools (msi afterburner, fanspeed, hwinfo, etc.) fail for this clevo Model. If I get it right, the PREMA BIOS contains also an updated EC firmware with an improved (slower at low temp?) fan curve, but that is not available yet, and anyway I will have to wait for a public version without a premium partner. So I am wondering what to do now. I couldn't find much info on the actual firmware content, or how to modify the fan curves. Ideal would be the possibility to set the fan curve via software, but I don't know if this is possible at all.

 

There is a ClevoECView application which was leaked from Clevo some years ago that gives some insight, and some gui build a linux tool to manipulate the EC (https://github.com/SkyLandTW/clevo-indicator). I have extended that tool for my model, such that I can now set hardcoded fan speeds for GPU and CPU and read both fan's RPM and the CPU temperature (https://github.com/davidrohr/clevo-indicator - Naturally I will not take any responsibility if this breaks a system!). What I am missing yet is where in the EC memory I could get the GPU fan duty cycle or the GPU temperature. Checking the EC dumps at different fan settings makes me think it is simply not available.

What is a bit weird: under Windows it seems to me the EC exposes the GPU Fan duty cycle at 0xCF, while under Linux the value is constant. I'd appreciate if anyone has an idea.

 

Setting the fans to 15% - 30% duty cycle makes the system silent to completely silent, increasing the temperatures to 55-65 deg at idle, which I consider fair. I have not yet found out how to activate one of the fan profiles via speaking to the EC. In particular, I would be interested in activating the automatic or the on-battery profile. At least, there is a way to go back to the overclock profile: pressing fn-1 once after fixing the clocks reverts it. I am assuming that fn-1 actually fixed the clocks in the same way I am doing, so the EC assumes I am already in full fan mode, thus it goes back to overclock mode.

 

So my current setup is that I pin the fans to a slow speed for normal operation, and I revert to the overclock mode for computing / gaming. But I don't really like this setup. It is both dangerous and inconvenient. I was thinking of implementing a background daemon or a kernel driver to maintain the fan curve manually, (the utility at github which I started from actually already provides such a mode) but that is not the ideal solution. It would be a problem when the background daemon exits / crashes, and I am also not sure about the stability of how I set the fan speed. I would really prefer a proper fan curve in the EC. That is the silver bullet. It is an absolute pity that such great hardware is deteriorated by a useless EC firmware.

 

Finally some info on running Linux for those who are interested:

Most of the hardware runs out of the box. The special keys on the keyboard are a bit of a problem, but there is a linux-laptop company called tuxedo computers which offer linux-based clevo laptops and they have implemented a kernel module for it, which is easy to compile (can be found in their forum: www.linux-onlineshop.de - it is called tuxedo-wmi).

What annoys me a bit is that I can query very little hardware info. lm-sensors only detects the simple intel coretemp driver for CPU temperatures, and it gets the temperature of the wifi module. I would love any advise on how to query e.g. the CPU voltage, but it seems there is no linux kernel module yet for the monitoring chip used in the clevo system (at least there is one unsupported SuperIO chip).

  • Thumbs Up 5
Link to comment
Share on other sites

  • 2 weeks later...

Some follow-up:

- CPU-voltage on Linux can be querried vie dmidecode, which gets it directly from CPU MSR registers, but apparently it only shows the voltage for the highest P-State.

- Alternatively, the CPU-X application https://github.com/X0rg/CPU-X can show the current voltage.

- What concerns the fan-speed: I have implemented an automatic fan control as a simple linux service, that fetches GPU temperatures from nvidia-smi (the EC is not reliably reporting GPU fan RPMs and GPU temperature for me.)

A bit worse than using the EC for that autonomically, but anyway, the system is silend when not fully loaded now.

- Next, I'll repaste the GPU (and also the CPU) to get the GPU temperatures down hopefully.

  • Thumbs Up 3
Link to comment
Share on other sites

Second follow-up:

I delidded the CPU and repasted CPU and GPU with grizzly conductonaut.

Unfortunately, it doesn't help a lot with idle temperatures, but temperatures under load decreased tremendously. CPU went down from 80 to 60 deg running prime95 AVX.

  • Thumbs Up 3
Link to comment
Share on other sites

  • Guest changed the title to [SOFTWARE MOD] Linux Fan Control for Clevo (P775DM3)

Some more info on the automatic linux fan control:

There is some strange thing with the EC about querying GPU data. CPU temperature is always stored in 0x07 and CPU fan duty in 0xCE.

0xCF stores the GPU fan duty cycle, but only after starting the Hotkey utility under Windows, which seems to bring the EC in a different state. Booting Linux straight, 0xCF seems to store a constant random value.

As I could not get this running under Linux, I query GPU temperature via nvidia-smi, CPU temperature via the EC.

Once in a while, the EC reports a very low CPU temperature (< 15 deg). These values are filtered out.

Fan control application is implemented as simple user-space process. A kernel module might be better, but would be more effort and I am too lazy. I assign the FIFO scheduler to the application, so in theory it should not be interrupted, and there is a background-process that restarts it if it crashed + a check that nvidia-smi actually delivers new temperature data. In case of failure, a high fan speed is assigned as safety measure.

Running since 2 week now without issues, so I am rather satisfied and think this is stable enough for my purpose - until I come across a way to do this inside the EC.

That would have the advantage to work under Windows as well. The application could be ported easily, but I would be afraid about interference with the hotkey utility - or perhaps I should just toss hotkey completely.

  • Thumbs Up 3
Link to comment
Share on other sites

  • 1 month later...
On 11/22/2016 at 0:56 PM, qon said:

Some more info on the automatic linux fan control:

There is some strange thing with the EC about querying GPU data. CPU temperature is always stored in 0x07 and CPU fan duty in 0xCE.

0xCF stores the GPU fan duty cycle, but only after starting the Hotkey utility under Windows, which seems to bring the EC in a different state. Booting Linux straight, 0xCF seems to store a constant random value.

As I could not get this running under Linux, I query GPU temperature via nvidia-smi, CPU temperature via the EC.

Once in a while, the EC reports a very low CPU temperature (< 15 deg). These values are filtered out.

Fan control application is implemented as simple user-space process. A kernel module might be better, but would be more effort and I am too lazy. I assign the FIFO scheduler to the application, so in theory it should not be interrupted, and there is a background-process that restarts it if it crashed + a check that nvidia-smi actually delivers new temperature data. In case of failure, a high fan speed is assigned as safety measure.

Running since 2 week now without issues, so I am rather satisfied and think this is stable enough for my purpose - until I come across a way to do this inside the EC.

That would have the advantage to work under Windows as well. The application could be ported easily, but I would be afraid about interference with the hotkey utility - or perhaps I should just toss hotkey completely.

If you could create a utility to adjust fans and the keyboard backlight feature while we did not have Hotkey software installed, you'd be doing all current-gen clevo notebook owners a ridiculous favour.

  • Thumbs Up 1
Link to comment
Share on other sites

  • 3 weeks later...
On 26.12.2016 at 4:22 PM, D2ultima said:

If you could create a utility to adjust fans and the keyboard backlight feature while we did not have Hotkey software installed, you'd be doing all current-gen clevo notebook owners a ridiculous favour.

Hi D2ultima,

 

in principle I would also like such a utility.

I am mostly using linux anyway, but the tool could be ported to Windows rather easily. However, there are a couple of severe issues:

first, and most importantly, I think the fan control belongs in the EC. A software solution is only a plan B. It has a couple of caveats: when the management thread crashes, the fans do no longer adjust to the temperature. When you reboot the laptop and do not reset the fan speed or start a new management process, the fans stay at the last state, even when the system overheats. This is nothing that can be solved in software. Also, my utility is not 100% working in setting the fan speed. I have added some heuristics to set it to 100% in case anything goes wrong, but that is not really safe.

So, this tool can really damage or kill the hardware. I am willing to take that risk to get rid of the noise, but I can not and will not offer support.

 

Further, I found out some of the ports by trial and error. Other clevo laptops might have other ports. In particular for the keyboard backlight I have no clue. So the problem is not the programming, but the maintenance and collecting all the data for various models. I am afraid I won't have the time for that, and I also do not see a good way to do that, because I have only a single laptop and I will not ask other people to experiment writing to various IO ports.

 

If there would be more information available which addresses and ports to use, it would be a different game of course.

  • Thumbs Up 1
Link to comment
Share on other sites

  • 1 month later...
On 1/11/2017 at 8:36 PM, qon said:

Hi D2ultima,

 

in principle I would also like such a utility.

I am mostly using linux anyway, but the tool could be ported to Windows rather easily. However, there are a couple of severe issues:

first, and most importantly, I think the fan control belongs in the EC. A software solution is only a plan B. It has a couple of caveats: when the management thread crashes, the fans do no longer adjust to the temperature. When you reboot the laptop and do not reset the fan speed or start a new management process, the fans stay at the last state, even when the system overheats. This is nothing that can be solved in software. Also, my utility is not 100% working in setting the fan speed. I have added some heuristics to set it to 100% in case anything goes wrong, but that is not really safe.

So, this tool can really damage or kill the hardware. I am willing to take that risk to get rid of the noise, but I can not and will not offer support.

 

Further, I found out some of the ports by trial and error. Other clevo laptops might have other ports. In particular for the keyboard backlight I have no clue. So the problem is not the programming, but the maintenance and collecting all the data for various models. I am afraid I won't have the time for that, and I also do not see a good way to do that, because I have only a single laptop and I will not ask other people to experiment writing to various IO ports.

 

If there would be more information available which addresses and ports to use, it would be a different game of course.

 

The profile that is labeled as Automatic by Clevo in their Hotkey will most likely do the same things you mention. 

Not installing it at all and cleaning the CCC from Clevo will result in the fan speed to always be set to auto. Sadly, this means that you got to track the temperatures yourself and I have seen the temperatures go as high as 100C with the auto fan, 4.0 GHz and Clevo stock BIOS. 

Creating a software based solution that would stay alive as long as the application stays alive would be a blessing for many P775 users if they are running stock Clevo BIOS! In windows there are a few ways of forcing such a software to keep running. 

Oh yes, in windows, you cannot kill the CCC after it started running. IF you kill the CCC or rather its XTU sub thread, it will instantly shut down the laptop. 

Link to comment
Share on other sites

  • 4 weeks later...

Hi qon,

 

I have been looking at your Github repository: https://github.com/davidrohr/clevo-indicator, would you mind updating it with your latest changes? I have look through all the forks and your changes are the only one that work for my Clevo laptop except the GPU temperature but I believe you have a work around by using the nvidia-smi utility.

 

BTW, if you are looking for keyboard light control for your Clevo laptop, have a look at https://bitbucket.org/lynthium/clevo-xsm-wmi.git , it is working for me.

 

Thank you.

Link to comment
Share on other sites

Hi MrPiggy,

 

I have added my script that I use to feed the nvidia-smi temperature to the modified clevo-indicator for automatic fan control.

Use at your own risk!

 

Cheers

qon

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.