Configure ACPI field on Linux

I have a netbook that launched a fan a little for me in my opinion. I found a Windows-only solution to reduce fan noise, but I use Ubuntu on this computer.

In a Windows solution, the guy uses a program called “Notebook Hardware Management” (NHC), which, from what I can parse, reads and sets ACPI values. ( http://hpmini110c.siteboard.eu/f3t31-lueftersteuerung-fuer-den-mini.html , the corresponding source is in the 7z file, in the .cs file there is a C # file with logic for setting the fan is on)

I would like to find a way to replicate in a Linux environment:

# Where the value is being set write = ACPI.FIELD.Write("_SP.PCIO.SBRG.ECO.CTPM", 40); # Reading the temperature int temp1 = 0; bool _tmp = APCI.FIELD.Read("_SB.PCIO.SBRG.ECO.TPM1", ref temp1) 

I will be honest that I am on this, but if someone can push me in the right direction, I would be very grateful!

+1
linux acpi
source share
3 answers

Michal Kottman has created a kernel module that allows you to execute such ACPI commands. It was designed to call commands for switching a video card, but can be used for other purposes. It is available from Github , installation instructions below:

  • Set the kernel headers corresponding to the current kernel
  • Get the source code and create it

     git clone git://github.com/mkottman/acpi_call.git cd acpi_call make 
  • Download the module:

     /sbin/insmod acpi_call.ko 

    If all goes well, you should now have a /proc/acpi/call "file".

  • To execute the command, write it to /proc/acpi/call . I think you made a typo with _SP and therefore replaced it with \_SB :

     echo '\_SB.PCIO.SBRG.ECO.CTPM' > /proc/acpi/call 
  • To get the result of this command, check the kernel log ( dmesg ) or read the result:

     cat /proc/acpi/call 

    After reading this value, it will be cleared, so be sure to save the output somewhere if you want to reuse it later.

+5
source share

Not sure if this is exactly what you want, but have you looked at lm_sensors ? They support hw monoriting with kernel drivers, but provide a user space library.

0
source share

Reflector says that NHC.exe is a managed assembly and contains classes that provide ACPI.FIELD.Write() and ACPI.FIELD.Read() and soon. NHC's author described in the chm file how to create custom classes that include calls to these things for certain types of hardware, something like a plugin model.

Instead of dropping the .DLL, you are throwing the actual C # code into a special folder; obviously, nhc.exe dynamically compiles and runs this code when nhc.exe starts. If all this is true, you should write your own application that uses ACPI.FIELD.Read and Write calls, ACPI.FIELD.Read it into exe, specifying nhc.exe as a reference.

Although a kicker, it is that nhc.exe is confusing and all of these classes are not visible. Therefore, you cannot just run csc.exe and the nhc.exe link. I do not know for sure, but it seems to me that only this code can be run in the context of nhc.exe, which performs special compilation to process it.

Another bad news is that NHC development seems to have stopped; The forum site is dead, and the latest update is from 2007.

-2
source share

All Articles