The question below is mainly about the support for the fan in my Panasonic CF-AX2 under Linux, but I made a special thread for it, as I could imagine that the ACPI for many recent Panasonic machines is similar, so that it may also be relevant for other machines.
The temperatures outside are rising and so is the temperature of my laptop. I noticed this week that the fan is switching to its most noisy speed more often, which creates on-off-on-off-on patterns that can be annoying.
The behavior under Linux seems different from that under Windows: under Windows the fan is by default not in its most silent mode, although not at its highest speed either, which avoids on-off-on-off patterns. Under Linux the machine is mostly very silent, but when the fan switches on, it does so at a very high speed.
This made me wonder whether I could change the fan speed under Linux.
My main question is: the kernels I tried don't see the fan. lm-sensors gives no result. I don't know if any kernel module exists for it or where to find it.
I found a work-around which works well for me, but a more solid solution (with proper kernel support) would be very welcome.
This is my current solution. By decompiling the ACPI DSDT I found out that the ACPI provides relatively easy support for changing the default fan speed of the machine. It can be used as follows:
1) Install the acpi_call module from https://github.com/mkottman/acpi_call/ , which adds support for calling ACPI functions from the command line.
2) execute this statement as root:
echo "\_SB.PCI0.LPCB.TFN1.SSPD x" > /proc/acpi/call
where x is a number between 0 and 100. At 0 the fan is silent, while at 100 it will switch to its maximum speed.
This doesn't change the (invisible) active cooling trip points. I'm looking for a solution to that. However, it does change the lowest speed at which the fan runs.
Any idea is welcome!
-
-
I have studied the fan behavior of the AX2 further and have found a solution which I would like to share for the small number of people that might be interested.
The short message is: to change the trip point that causes the fan to suddenly spin up at a very high speed, download acer_ec.pl from this webpage:
https://code.google.com/p/aceracpi/wiki/EmbeddedController
Then execute the following command as root:
perl ./acer_ec.pl := 8B D
After this, the low speed/high speed fan pattern is gone; the fan spins up gracefully if the machine gets warmer and only very rarely at a high speed. As a result, the temperatures in the machine are slightly higher, but as far as I can see they are not dangerously high.
The longer story is that I first modified the acpi_thermal.c kernel module such that the kernel sees all temperature sensors in the laptop. These sensors are exposed by the machine's ACPI, but are not detected by the kernel's standard acpi_thermal driver. A potential reason for this is that the DSDT in the machine does not implement the ACPI standard correctly (eg., it exposes active cooling temperatures, but does not link these to a cooling device, as required). I did not really study this in detail. In any case, a modification of the driver was needed, which I've uploaded in the attachment.
View attachment thermal_panasonic.zip
After this, I could study the relationship between the fan and the temperature sensors. I noticed that the fan would always switch on at a very high speed when the TMEM active trip point was exceeded (presumably this sensor measures the temperature of the memory chip). This trip point was set to 50C, but with the current warmer weather the memory temperature is regularly 49C even when the processor is idle. Any activity is then enough to trigger the fan.
So I set out to change the TMEM active trip point. Unfortunately, though, the ACPI implementation does not provide support for changing this.
Hence, I resorted to the ./acer_ec.pl script to analyse the functionality of the embedded controller that drives the fan and the temperature sensors. It turns out that register 0x8B in this controller corresponds exactly to the TMEM trip point. The command
perl ./acer_ec.pl := 8B D
changes this register.
After this modification, the fan no longer switches on at 50C. Hence, the TMEM temperature increases. I have not seen it get higher than 54C. I assume this is safe, given that the maximum allowable temperature for many RAM chips is 85 degrees. After the change, the fan only spins up slowly when the first active cooling trip point of the CPU is reached (which is at 75C).
As a side note, the change in trip point will be invisible to the kernel module described above. The reason for this is that the ACPI is hard coded to return the trip point of 50C and does not read the trip point from the embedded controller.
All in all, I would like to add that I am surprised by the large number of temperature sensors in the machine, but also disappointed by the sloppy implementation of the ACPI.
I don't know for sure how relevant or useful this is for Windows users - however, I could imagine that also under Windows it could make sense to change the trip point register(s) (carefully, of course). This software
[Vorstellung] NoteBook FanControl (NBFC) - ComputerBase Forum
may be tuned do so (I can't try, as I don't have Windows on my machine).
Linux Fan Speed (AX2, but possibly other machines)
Discussion in 'Panasonic' started by travelings, Jul 5, 2013.