Skip to content
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

[UNSUPPORTED HARDWARE: ZenBook UX3410UA] module load fails #44

Open
daringer opened this issue Apr 22, 2017 · 61 comments
Open

[UNSUPPORTED HARDWARE: ZenBook UX3410UA] module load fails #44

daringer opened this issue Apr 22, 2017 · 61 comments

Comments

@daringer
Copy link
Owner

Hey, thanks and good tests, let's see if we can dig deeper,
this is the second time I see the test_module.sh script does not recognize a non working fan control. Somehow fails on the main task it should do 😞

So generally we should check the following points:

  • what's the reason the module is not loaded
  • is the acpi call similar (or missing, or somehow changed) to your link, think I used this page, too---initially.
  • disable specific functions, which maybe block the other functionalities...

From here try the following way:

  1. compile the module manually in debug-mode: see here how
  2. please post what dmesg says, if you load the module using insmod asus_fan.ko from within the build dir---please post what happens with and without force-load=1. (I also added some more debug, just now, no linux box here, so it's untested, will check it later, but "looks good" 😄 ) (this will hopefully tell us what is happening under the hood)
  3. next steps will then follow, once we know more, but under the line we either do some code changes to check, if this helps (based on the dmesg output we see) or should play with acpi_call using your link this at least will hopefully show which ACPI paths are existing/working, please check this comment here in the other issue, generally we only have to test:
\_SB.PCI0.LPCB.EC0.SFNV 
\_SB.PCI0.LPCB.EC0.TACH
\_SB.ATKD.QMOD
\_SB.PCI0.LPCB.EC0.ST98 
\_SB.PCI0.LPCB.EC0.SFNV 
\_SB.PCI0.LPCB.EC0.TH1R

It is very likely that if any of those is missing or so, loading the module might fail. If you find out which one this is, I could work around this in the init phase (and/or exclude it completely). Depending on which one this is, we then also have to find the replacement to get full functionality for asus_fan.

@daringer daringer self-assigned this Apr 22, 2017
@daringer daringer changed the title [unsupported hardware: ZenBook UX3410UA] module load fails [UNSUPPORTED HARDWARE: ZenBook UX3410UA] module load fails Apr 22, 2017
@HorstBaerbel
Copy link

Ok. I cloned the repo to "/usr/src", called "make DEBUG=1" and ran "./misc/test_module.sh".
W/O "force_load=1" I got:

[i] ------------ Starting 'asus-fan' kernel module quick test
[i] Clearing 'dmesg' (kernel) log
[i] Trying to modprobe the module: 'asus_fan'
modprobe: ERROR: could not insert 'asus_fan': No such device
[i] Could not modprobe the module: 'asus_fan'
[i] Will try to find the module (.ko file) (starting in '../')
[+++] looks like I found: ../asus-fan/asus_fan.ko, trying insmod directly
insmod: ERROR: could not insert module ../asus-fan/asus_fan.ko: No such device

[i] ------------ Inspecting dmesg a.k.a. kernel log
[---] 'dmesg' reports no finished module init!

WITH "force_load=1" I got:

[i] ------------ Starting 'asus-fan' kernel module quick test
[i] Clearing 'dmesg' (kernel) log
[i] Trying to modprobe the module: 'asus_fan'
[+++] Successfully inserted module: 'asus_fan'

[i] ------------ Inspecting dmesg a.k.a. kernel log
[+++] 'dmesg' reports finished module init
[i] Remaining dmesg lines with related information:
[ 3912.383694] asus-fan (init) - forced loading of module: USE WITH CARE

[i] ------------ Search /sys files
[i] Checking for fan1 /sys/ files:
[+] Found /sys path (/sys/devices/platform/asus_fan)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon5)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon5/fan1_input)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon5/fan1_label)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon5/fan1_min)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon5/fan1_speed_max)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon5/pwm1)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon5/pwm1_enable)
[i] Checking for fan2 /sys/ files:
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon5/fan2_input)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon5/fan2_label)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon5/fan2_min)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon5/pwm2)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon5/pwm2_enable)
[+++] All /sys files found for primary fan (no: 1)
[+++] All /sys files found for secondary fan (no: 2)
[i] Looks like this machine has two fans!

[i] ------------ Test functionality
[i] Checking fan1 functionality! (label: 'CPU Fan')
[+++] Reading fan speed: 3028
[+++] fan1 speed is updated (changed)
[+] Change found in try no: 2!
[+] Could read and verify (default) activated auto-mode: 0
[+] Successfully read the min speed for fan1: 10
[i] Set fan speed manually starting with fan1_min (10) using 15 as stepping
[i] You should hear/feel the changing fan1 speed!
[i] Set manual speed to: 15 30 45 60 75 90 105 120 135 150
165 180 195 210 225 240 255
[+++] Getting speed during manual mode for fan1 successfully done
[+++] Setting manual speeds for fan1 successful!
[+] Auto-mode (/sys/devices/platform/asus_fan/hwmon/hwmon5/pwm1_enable) flag behaves as intended for fan1!
[+] Auto-mode (/sys/devices/platform/asus_fan/hwmon/hwmon5/pwm1_enable) was successfully reseted!
[i] Checking fan2 functionality! (label: 'GFX Fan')
[+++] Reading fan speed: -1
[---] Looks like the fan2 speed is not updated ... (/sys/devices/platform/asus_fan/hwmon/hwmon5/fan2_input)

dmesg returned:

[ 4111.732246] asus-fan (set_auto) - failed reseting fan(s) to auto-mode! errcode: 5 - DANGER! OVERHEAT? DANGER!
[ 4111.732249] asus-fan (init) - set auto-mode speed to active, failed! errcode: 5
[ 4114.117718] asus-fan (debug) - starting initialization...
[ 4114.117722] asus-fan (init) - dmi sys info: 'ASUSTeK COMPUTER INC.'
[ 4114.117723] asus-fan (init) - dmi product name: 'UX410UAK'
[ 4114.117724] asus-fan (debug) - dmi chassis type: '10'
[ 4114.117727] asus-fan (debug) - fan-id: 0 | get RPM
[ 4114.117728] asus-fan (debug) - |--> get RPM using acpi
[ 4114.117729] asus-fan (debug) - |--> evaluate acpi request: _SB.PCI0.LPCB.EC0.TACH
[ 4114.118084] asus-fan (debug) - |--> acpi request returned: 0
[ 4114.118085] asus-fan (debug) - fan-id: 1 | get RPM
[ 4114.118086] asus-fan (debug) - |--> get RPM using acpi
[ 4114.118087] asus-fan (debug) - |--> evaluate acpi request: _SB.PCI0.LPCB.EC0.TACH
[ 4114.118343] asus-fan (debug) - |--> acpi request returned: 0
[ 4114.118344] asus-fan (debug) - __fan_rpm() calls succeeded, found 1 fan(s)
[ 4114.118346] asus-fan (debug) - fan-id: (both) | set max speed: 255, force reset: 0
[ 4114.119431] asus-fan (debug) - fan_set_max_speed() call succeeded, ret: 0
[ 4114.119432] asus-fan (debug) - fan-id: (both) | set to automatic mode
[ 4114.119445] asus-fan (set_auto) - failed reseting fan(s) to auto-mode! errcode: 5 - DANGER! OVERHEAT? DANGER!
[ 4114.119451] asus-fan (init) - set auto-mode speed to active, failed! errcode: 5

Btw. How would I execute those API calls? Is there some way to do it via bash or is only C the way to go?

@daringer
Copy link
Owner Author

Can you please also show me the dmesg output (of the debug-build-module) after you tried to insmod asus_fan.ko without force-load=1, there we maybe see what fails...

further acpi_call is under the line just a kernel module which allows you "echoing" into your acpi also from the bash for example. there will surely be a package, if you don't have it anyways, just go for a modprobe acpi_call, if this works you should find a /proc/acpi/call where you may directly echo into.

@HorstBaerbel
Copy link

Oh. Sorry the dmesg output was using ./misc/test_module.sh without force-load=1. Here ist is again, just to be sure:

[27891.355150] asus-fan (set_auto) - failed reseting fan(s) to auto-mode! errcode: 5 - DANGER! OVERHEAT? DANGER!
[27891.355153] asus-fan (init) - set auto-mode speed to active, failed! errcode: 5
[27891.557172] asus-fan (debug) - starting initialization...
[27891.557173] asus-fan (init) - dmi sys info: 'ASUSTeK COMPUTER INC.'
[27891.557173] asus-fan (init) - dmi product name: 'UX410UAK'
[27891.557174] asus-fan (debug) - dmi chassis type: '10'
[27891.557174] asus-fan (debug) - fan-id: 0 | get RPM
[27891.557174] asus-fan (debug) - |--> get RPM using acpi
[27891.557175] asus-fan (debug) - |--> evaluate acpi request: _SB.PCI0.LPCB.EC0.TACH
[27891.557314] asus-fan (debug) - |--> acpi request returned: 0
[27891.557315] asus-fan (debug) - fan-id: 1 | get RPM
[27891.557315] asus-fan (debug) - |--> get RPM using acpi
[27891.557316] asus-fan (debug) - |--> evaluate acpi request: _SB.PCI0.LPCB.EC0.TACH
[27891.557419] asus-fan (debug) - |--> acpi request returned: 0
[27891.557420] asus-fan (debug) - __fan_rpm() calls succeeded, found 1 fan(s)
[27891.557420] asus-fan (debug) - fan-id: (both) | set max speed: 255, force reset: 0
[27891.558198] asus-fan (debug) - fan_set_max_speed() call succeeded, ret: 0
[27891.558198] asus-fan (debug) - fan-id: (both) | set to automatic mode
[27891.558202] asus-fan (set_auto) - failed reseting fan(s) to auto-mode! errcode: 5 - DANGER! OVERHEAT? DANGER!
[27891.558204] asus-fan (init) - set auto-mode speed to active, failed! errcode: 5

@HorstBaerbel
Copy link

I can toy around with the ACPI calls via /proc/acpi/call tomorrow if you tell me what I should be looking for...

@daringer
Copy link
Owner Author

uh, ok so there I see a dmesg message without force-load=1 ... ok so loading of the module seems fine,

for acpi, see this post there you see what to echo into the acpi call file ... looks like disabling the auto-mode is the evil part here:

[27891.558202] asus-fan (set_auto) - failed reseting fan(s) to auto-mode! errcode: 5 - DANGER! OVERHEAT? DANGER!
[27891.558204] asus-fan (init) - set auto-mode speed to active, failed! errcode: 5

So there is this acpi entry handling this, currently with 2 params, 0 0 \\_SB.PCI0.LPCB.EC0.SFNV
So you could try passing other parameters to to it using acpi call ... and we could also dig the internet for the appropriate acpi entry...

@HorstBaerbel
Copy link

HorstBaerbel commented Apr 23, 2017

I installed acpi-call-dkms and started the module with modprobe acpi_call. It installs and starts without errors or messages in dmesg, but when I sudo echo \_SB.PCI0.LPCB.EC0.SFNV > /proc/acpi/call tells me "bash: /proc/acpi/call: permission denied"... :/ ?

@HorstBaerbel
Copy link

ls -la /proc/acpi/

dr-xr-xr-x   3 root root 0 Apr 23 22:31 .
dr-xr-xr-x 252 root root 0 Apr 23 20:49 ..
dr-xr-xr-x   3 root root 0 Apr 23 22:31 button
-rw-rw----   1 root root 0 Apr 23 22:31 call
-rw-r--r--   1 root root 0 Apr 23 22:31 wakeup

At least root should be able to execute it...

@daringer
Copy link
Owner Author

you should try it directly being root, and with ""....

$ sudu su
$ echo "\_SB.PCI0.LPCB.EC0.SFNV 0" > call
$ cat call; echo
0x0called

This should be the roughly the output, try out some combinations as to be seen in the other post, especially the SFNV above. The argument "0" leads to low fan speeds on my side, using "1" and or "2" leads to very low (if not off) running fans... Try it out please and tell me if you hear any difference....

@HorstBaerbel
Copy link

I get:

$ sudo su
$ echo "\_SB.PCI0.LPCB.EC0.SFNV 0" > call
$ cat call; echo

(empty result, just an empty line)
Fan speeds do not change regardless of the number (or choosing .TACH, .ST98 or whatnot). I might be doing something wrong. Does not matter if asus_fan.ko and acpi_call are loaded or not... :/

@happel007
Copy link

I've got a UX310UAK here, which is internally the same as @HorstBaerbel's UX410UAK.

Also have to force load the module.

Using asus-fan I can manually set the fan speed. lm sensors even reports the fan speed according to the set speed. The fan doesn't actually change it's speed though. lm-sensors does show the actual speed of the fan when set to auto.

I've included the test_module.sh and acpi_call output below. Hope it helps, would be nice if we can get this to work.

test_module.sh output:

[i] ------------ Starting 'asus-fan' kernel module quick test
[+] asus-fan loaded! REMOVING (rmmod) asus-fan (asus_fan) module
[i] Clearing 'dmesg' (kernel) log
[i] Trying to modprobe the module: 'asus_fan'
[+++] Successfully inserted module: 'asus_fan'

[i] ------------ Inspecting dmesg a.k.a. kernel log
[+++] 'dmesg' reports finished module init
[i] Remaining dmesg lines with related information:
[78303.292836] asus-fan (debug) - starting initialization...
[78303.292838] asus-fan (init) - dmi sys info: 'ASUSTeK COMPUTER INC.'
[78303.292838] asus-fan (init) - dmi product name: 'UX310UAK'
[78303.292839] asus-fan (debug) - dmi chassis type: '10'
[78303.292839] asus-fan (init) - forced loading of module: USE WITH CARE
[78303.292839] asus-fan (debug) - register asus fan driver
[78303.292891] asus-fan (debug) - probe for device
[78303.292892] asus-fan (debug) - init hwmon device

[i] ------------ Search /sys files
[i] Checking for fan1 /sys/ files:
[+] Found /sys path (/sys/devices/platform/asus_fan)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon7)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon7/fan1_input)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon7/fan1_label)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon7/fan1_min)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon7/fan1_speed_max)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon7/pwm1)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon7/pwm1_enable)
[i] Checking for fan2 /sys/ files:
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon7/fan2_input)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon7/fan2_label)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon7/fan2_min)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon7/pwm2)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon7/pwm2_enable)
[+++] All /sys files found for primary fan (no: 1)
[+++] All /sys files found for secondary fan (no: 2)
[i] Looks like this machine has two fans!

[i] ------------ Test functionality
[i] Checking fan1 functionality! (label: 'CPU Fan')
[+++] Reading fan speed: 3032
[+++] fan1 speed is updated (changed)
[+] Change found in try no: 4!
[+] Could read and verify (default) activated auto-mode: 0
[+] Successfully read the min speed for fan1: 10
[i] Set fan speed manually starting with fan1_min (10) using 15 as stepping
[i] You should hear/feel the changing fan1 speed!
[i] Set manual speed to: 15 30 45 60 75 90 105 120 135 150 
                         165 180 195 210 225 240 255 
[+++] Getting speed during manual mode for fan1 successfully done
[+++] Setting manual speeds for fan1 successful!
[+] Auto-mode (/sys/devices/platform/asus_fan/hwmon/hwmon7/pwm1_enable) flag behaves as intended for fan1!
[+] Auto-mode (/sys/devices/platform/asus_fan/hwmon/hwmon7/pwm1_enable) was successfully reseted!
[i] Checking fan2 functionality! (label: 'GFX Fan')
[+++] Reading fan speed: -1
[---] Looks like the fan2 speed is not updated ... (/sys/devices/platform/asus_fan/hwmon/hwmon7/fan2_input)

I got the following from acpi_call:

\_SB.PCI0.LPCB.EC0.SFNV    Error: AE_NOT_FOUND 
\_SB.PCI0.LPCB.EC0.TACH    0xbc3lled
\_SB.ATKD.QMOD             Error: AE_NOT_FOUND
\_SB.PCI0.LPCB.EC0.ST98    0x0called
\_SB.PCI0.LPCB.EC0.TH1R    0x0called

@pasdVn
Copy link

pasdVn commented May 16, 2017

Hi,
I have got an UX330UAK which (I guess) is quite similar to the mentioned devices above. So I just add my results here instead of opening a seperate issue:

build + install:

tobias@hugo:~/Entwicklung/asus-fan$ make DEBUG=1
make -C /lib/modules/4.8.0-51-generic/build M=$PWD modules
make[1]: Entering directory '/usr/src/linux-headers-4.8.0-51-generic'
  CC [M]  /home/tobias/Entwicklung/asus-fan/asus_fan.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/tobias/Entwicklung/asus-fan/asus_fan.mod.o
  LD [M]  /home/tobias/Entwicklung/asus-fan/asus_fan.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.8.0-51-generic'
tobias@hugo:~/Entwicklung/asus-fan$ sudo make install
make -C /lib/modules/4.8.0-51-generic/build M=$PWD modules_install
make[1]: Entering directory '/usr/src/linux-headers-4.8.0-51-generic'
  INSTALL /home/tobias/Entwicklung/asus-fan/asus_fan.ko
At main.c:158:
- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178
sign-file: certs/signing_key.pem: No such file or directory
  DEPMOD  4.8.0-51-generic
make[1]: Leaving directory '/usr/src/linux-headers-4.8.0-51-generic'
depmod -a

Running the tests with force_load=1 as otherwise loading fails when trying to set auto-mode :

tobias@hugo:~/Entwicklung/asus-fan$ misc/test_module.sh force_load=1
[i] ------------ Starting 'asus-fan' kernel module quick test
[i] Clearing 'dmesg' (kernel) log
[i] Trying to modprobe the module: 'asus_fan'
[+++] Successfully inserted module: 'asus_fan'

[i] ------------ Inspecting dmesg a.k.a. kernel log
[+++] 'dmesg' reports finished module init
[i] Remaining dmesg lines with related information:
[12091.548914] asus-fan (debug) - starting initialization...
[12091.548915] asus-fan (init) - dmi sys info: 'ASUSTeK COMPUTER INC.'
[12091.548915] asus-fan (init) - dmi product name: 'UX330UAK'
[12091.548916] asus-fan (debug) - dmi chassis type: '10'
[12091.548916] asus-fan (init) - forced loading of module: USE WITH CARE
[12091.548916] asus-fan (debug) - register asus fan driver
[12091.549050] asus-fan (debug) - probe for device
[12091.549051] asus-fan (debug) - init hwmon device

[i] ------------ Search /sys files
[i] Checking for fan1 /sys/ files:
[+] Found /sys path (/sys/devices/platform/asus_fan)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon10)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon10/fan1_input)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon10/fan1_label)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon10/fan1_min)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon10/fan1_speed_max)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon10/pwm1)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon10/pwm1_enable)
[i] Checking for fan2 /sys/ files:
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon10/fan2_input)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon10/fan2_label)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon10/fan2_min)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon10/pwm2)
[+] Found /sys path (/sys/devices/platform/asus_fan/hwmon/hwmon10/pwm2_enable)
[+++] All /sys files found for primary fan (no: 1)
[+++] All /sys files found for secondary fan (no: 2)
[i] Looks like this machine has two fans!

[i] ------------ Test functionality
[i] Checking fan1 functionality! (label: 'CPU Fan')
[+++] Reading fan speed: 3438
[+++] fan1 speed is updated (changed)
[+] Change found in try no: 2!
[+] Could read and verify (default) activated auto-mode: 0
[+] Successfully read the min speed for fan1: 10
[i] Set fan speed manually starting with fan1_min (10) using 15 as stepping
[i] You should hear/feel the changing fan1 speed!
[i] Set manual speed to: 15 30 45 60 75 90 105 120 135 150 
                         165 180 195 210 225 240 255 
[+++] Getting speed during manual mode for fan1 successfully done
[+++] Setting manual speeds for fan1 successful!
[+] Auto-mode (/sys/devices/platform/asus_fan/hwmon/hwmon10/pwm1_enable) flag behaves as intended for fan1!
[+] Auto-mode (/sys/devices/platform/asus_fan/hwmon/hwmon10/pwm1_enable) was successfully reseted!
[i] Checking fan2 functionality! (label: 'GFX Fan')
[+++] Reading fan speed: -1
[---] Looks like the fan2 speed is not updated ... (/sys/devices/platform/asus_fan/hwmon/hwmon10/fan2_input)

corresponding dmesg:

[12091.548914] asus-fan (debug) - starting initialization...
[12091.548915] asus-fan (init) - dmi sys info: 'ASUSTeK COMPUTER INC.'
[12091.548915] asus-fan (init) - dmi product name: 'UX330UAK'
[12091.548916] asus-fan (debug) - dmi chassis type: '10'
[12091.548916] asus-fan (init) - forced loading of module: USE WITH CARE
[12091.548916] asus-fan (debug) - register asus fan driver
[12091.549050] asus-fan (debug) - probe for device
[12091.549051] asus-fan (debug) - init hwmon device
[12091.549091] asus-fan (init) - finished init, found 2 fan(s) to control
[12091.579027] asus-fan (debug) - fan-id: 0 | get RPM
[12091.579028] asus-fan (debug) - |--> get RPM using acpi
[12091.579028] asus-fan (debug) - |--> evaluate acpi request: \_SB.PCI0.LPCB.EC0.TACH
[12091.579141] asus-fan (debug) - |--> acpi request returned: 0
[12091.581008] asus-fan (debug) - fan-id: 0 | get RPM
[12091.581009] asus-fan (debug) - |--> get RPM using acpi
[12091.581009] asus-fan (debug) - |--> evaluate acpi request: \_SB.PCI0.LPCB.EC0.TACH
[12091.581136] asus-fan (debug) - |--> acpi request returned: 0
[12092.584427] asus-fan (debug) - fan-id: 0 | get RPM
[12092.584429] asus-fan (debug) - |--> get RPM using acpi
[12092.584429] asus-fan (debug) - |--> evaluate acpi request: \_SB.PCI0.LPCB.EC0.TACH
[12092.584615] asus-fan (debug) - |--> acpi request returned: 0
[12092.586213] asus-fan (debug) - fan-id: 0 | get control state
[12092.588672] asus-fan (debug) - fan-id: 0 | get RPM
[12092.588673] asus-fan (debug) - |--> get RPM using acpi
[12092.588674] asus-fan (debug) - |--> evaluate acpi request: \_SB.PCI0.LPCB.EC0.TACH
[12092.588859] asus-fan (debug) - |--> acpi request returned: 0
[12092.589663] asus-fan (debug) - fan-id: 0 | get RPM
[12092.589664] asus-fan (debug) - |--> get RPM using acpi
[12092.589665] asus-fan (debug) - |--> evaluate acpi request: \_SB.PCI0.LPCB.EC0.TACH
[12092.589789] asus-fan (debug) - |--> acpi request returned: 0
[12092.594722] asus-fan (debug) - fan-id: 0 | set state: 15
[12092.594723] asus-fan (debug) - fan-id: 0 | set speed: 15
[12093.601013] asus-fan (debug) - fan-id: 0 | get RPM
[12093.601017] asus-fan (debug) - |--> get RPM for manual mode, calculated: 110
[12093.620801] asus-fan (debug) - fan-id: 0 | set state: 30
[12093.620804] asus-fan (debug) - fan-id: 0 | set speed: 30
[12094.629808] asus-fan (debug) - fan-id: 0 | get RPM
[12094.629813] asus-fan (debug) - |--> get RPM for manual mode, calculated: 558
[12094.652568] asus-fan (debug) - fan-id: 0 | set state: 45
[12094.652574] asus-fan (debug) - fan-id: 0 | set speed: 45
[12095.667459] asus-fan (debug) - fan-id: 0 | get RPM
[12095.667466] asus-fan (debug) - |--> get RPM for manual mode, calculated: 978
[12095.690059] asus-fan (debug) - fan-id: 0 | set state: 60
[12095.690064] asus-fan (debug) - fan-id: 0 | set speed: 60
[12096.701338] asus-fan (debug) - fan-id: 0 | get RPM
[12096.701344] asus-fan (debug) - |--> get RPM for manual mode, calculated: 1369
[12096.721484] asus-fan (debug) - fan-id: 0 | set state: 75
[12096.721489] asus-fan (debug) - fan-id: 0 | set speed: 75
[12097.733846] asus-fan (debug) - fan-id: 0 | get RPM
[12097.733851] asus-fan (debug) - |--> get RPM for manual mode, calculated: 1733
[12097.758856] asus-fan (debug) - fan-id: 0 | set state: 90
[12097.758862] asus-fan (debug) - fan-id: 0 | set speed: 90
[12098.770287] asus-fan (debug) - fan-id: 0 | get RPM
[12098.770290] asus-fan (debug) - |--> get RPM for manual mode, calculated: 2069
[12098.780231] asus-fan (debug) - fan-id: 0 | set state: 105
[12098.780233] asus-fan (debug) - fan-id: 0 | set speed: 105
[12099.787168] asus-fan (debug) - fan-id: 0 | get RPM
[12099.787174] asus-fan (debug) - |--> get RPM for manual mode, calculated: 2377
[12099.810095] asus-fan (debug) - fan-id: 0 | set state: 120
[12099.810101] asus-fan (debug) - fan-id: 0 | set speed: 120
[12100.822700] asus-fan (debug) - fan-id: 0 | get RPM
[12100.822705] asus-fan (debug) - |--> get RPM for manual mode, calculated: 2656
[12100.842942] asus-fan (debug) - fan-id: 0 | set state: 135
[12100.842945] asus-fan (debug) - fan-id: 0 | set speed: 135
[12101.848668] asus-fan (debug) - fan-id: 0 | get RPM
[12101.848670] asus-fan (debug) - |--> get RPM for manual mode, calculated: 2907
[12101.853578] asus-fan (debug) - fan-id: 0 | set state: 150
[12101.853579] asus-fan (debug) - fan-id: 0 | set speed: 150
[12102.860469] asus-fan (debug) - fan-id: 0 | get RPM
[12102.860475] asus-fan (debug) - |--> get RPM for manual mode, calculated: 3131
[12102.880131] asus-fan (debug) - fan-id: 0 | set state: 165
[12102.880134] asus-fan (debug) - fan-id: 0 | set speed: 165
[12103.889702] asus-fan (debug) - fan-id: 0 | get RPM
[12103.889707] asus-fan (debug) - |--> get RPM for manual mode, calculated: 3326
[12103.901284] asus-fan (debug) - fan-id: 0 | set state: 180
[12103.901286] asus-fan (debug) - fan-id: 0 | set speed: 180
[12104.907389] asus-fan (debug) - fan-id: 0 | get RPM
[12104.907393] asus-fan (debug) - |--> get RPM for manual mode, calculated: 3493
[12104.920064] asus-fan (debug) - fan-id: 0 | set state: 195
[12104.920067] asus-fan (debug) - fan-id: 0 | set speed: 195
[12105.928879] asus-fan (debug) - fan-id: 0 | get RPM
[12105.928884] asus-fan (debug) - |--> get RPM for manual mode, calculated: 3633
[12105.938794] asus-fan (debug) - fan-id: 0 | set state: 210
[12105.938796] asus-fan (debug) - fan-id: 0 | set speed: 210
[12106.946222] asus-fan (debug) - fan-id: 0 | get RPM
[12106.946227] asus-fan (debug) - |--> get RPM for manual mode, calculated: 3745
[12106.966218] asus-fan (debug) - fan-id: 0 | set state: 225
[12106.966223] asus-fan (debug) - fan-id: 0 | set speed: 225
[12107.977490] asus-fan (debug) - fan-id: 0 | get RPM
[12107.977496] asus-fan (debug) - |--> get RPM for manual mode, calculated: 3827
[12108.001530] asus-fan (debug) - fan-id: 0 | set state: 240
[12108.001533] asus-fan (debug) - fan-id: 0 | set speed: 240
[12109.010106] asus-fan (debug) - fan-id: 0 | get RPM
[12109.010111] asus-fan (debug) - |--> get RPM for manual mode, calculated: 3883
[12109.031514] asus-fan (debug) - fan-id: 0 | set state: 255
[12109.031519] asus-fan (debug) - fan-id: 0 | set speed: 255
[12110.043284] asus-fan (debug) - fan-id: 0 | get control state
[12110.064496] asus-fan (debug) - fan-id: 0 | set control state: 0
[12110.064499] asus-fan (debug) - fan-id: (both) | set to automatic mode
[12110.064538] asus-fan (set_auto) - failed reseting fan(s) to auto-mode! errcode: 5 - DANGER! OVERHEAT? DANGER!
[12110.068845] asus-fan (debug) - fan-id: 0 | get control state
[12110.074745] asus-fan (debug) - fan-id: 1 | get RPM
[12110.074747] asus-fan (debug) - |--> get RPM using acpi
[12110.074748] asus-fan (debug) - |--> evaluate acpi request: \_SB.PCI0.LPCB.EC0.TACH
[12110.075005] asus-fan (debug) - |--> acpi request returned: 0
[12110.078115] asus-fan (debug) - fan-id: 1 | get RPM
[12110.078117] asus-fan (debug) - |--> get RPM using acpi
[12110.078118] asus-fan (debug) - |--> evaluate acpi request: \_SB.PCI0.LPCB.EC0.TACH
[12110.078343] asus-fan (debug) - |--> acpi request returned: 0
[12111.082917] asus-fan (debug) - fan-id: 1 | get RPM
[12111.082919] asus-fan (debug) - |--> get RPM using acpi
[12111.082920] asus-fan (debug) - |--> evaluate acpi request: \_SB.PCI0.LPCB.EC0.TACH
[12111.083168] asus-fan (debug) - |--> acpi request returned: 0
[12112.090676] asus-fan (debug) - fan-id: 1 | get RPM
[12112.090680] asus-fan (debug) - |--> get RPM using acpi
[12112.090682] asus-fan (debug) - |--> evaluate acpi request: \_SB.PCI0.LPCB.EC0.TACH
[12112.091519] asus-fan (debug) - |--> acpi request returned: 0
[12113.099137] asus-fan (debug) - fan-id: 1 | get RPM
[12113.099138] asus-fan (debug) - |--> get RPM using acpi
[12113.099139] asus-fan (debug) - |--> evaluate acpi request: \_SB.PCI0.LPCB.EC0.TACH
[12113.099339] asus-fan (debug) - |--> acpi request returned: 0
[12114.106331] asus-fan (debug) - fan-id: 1 | get RPM
[12114.106335] asus-fan (debug) - |--> get RPM using acpi
[12114.106336] asus-fan (debug) - |--> evaluate acpi request: \_SB.PCI0.LPCB.EC0.TACH
[12114.107503] asus-fan (debug) - |--> acpi request returned: 0
[12115.116673] asus-fan (debug) - fan-id: 1 | get RPM
[12115.116676] asus-fan (debug) - |--> get RPM using acpi
[12115.116678] asus-fan (debug) - |--> evaluate acpi request: \_SB.PCI0.LPCB.EC0.TACH
[12115.117224] asus-fan (debug) - |--> acpi request returned: 0
[12116.125127] asus-fan (debug) - fan-id: 1 | get RPM
[12116.125131] asus-fan (debug) - |--> get RPM using acpi
[12116.125133] asus-fan (debug) - |--> evaluate acpi request: \_SB.PCI0.LPCB.EC0.TACH
[12116.126189] asus-fan (debug) - |--> acpi request returned: 0
[12117.133188] asus-fan (debug) - fan-id: 1 | get RPM
[12117.133190] asus-fan (debug) - |--> get RPM using acpi
[12117.133191] asus-fan (debug) - |--> evaluate acpi request: \_SB.PCI0.LPCB.EC0.TACH
[12117.133407] asus-fan (debug) - |--> acpi request returned: 0
[12118.141026] asus-fan (debug) - fan-id: 1 | get RPM
[12118.141031] asus-fan (debug) - |--> get RPM using acpi
[12118.141033] asus-fan (debug) - |--> evaluate acpi request: \_SB.PCI0.LPCB.EC0.TACH
[12118.141739] asus-fan (debug) - |--> acpi request returned: 0
[12119.150332] asus-fan (debug) - fan-id: 1 | get RPM
[12119.150334] asus-fan (debug) - |--> get RPM using acpi
[12119.150335] asus-fan (debug) - |--> evaluate acpi request: \_SB.PCI0.LPCB.EC0.TACH
[12119.150697] asus-fan (debug) - |--> acpi request returned: 0

The fan speed is not changing during the test.

I also played a bit around with manually setting the fan speed via sysfs without success. The fan always seems to stay in auto mode, even though you can read out the previously set speed.

My results from api_call:

\_SB.PCI0.LPCB.EC0.SFNV      Error: AE_NOT_FOUND
\_SB.PCI0.LPCB.EC0.TACH      0xd74lled
\_SB.ATKD.QMOD                    Error: AE_NOT_FOUND 
\_SB.PCI0.LPCB.EC0.ST98       0x0called
\_SB.PCI0.LPCB.EC0.TH1R      0x0called

@afilipovich
Copy link

afilipovich commented May 29, 2017

Hi, I have Asus UX360UAK and experience the same issue: asus_fan module fails to load, if forced to load it shows current temp/fan status but does not change fan speed.

When I try ACPI calls I see the same result as @pasdVn, i.e. "_SB.PCI0.LPCB.EC0.SFNV" and "_SB.ATKD.QMOD" are missing.

After much tinkering with decompiled DSDT I found ACPI calls which can replace missing ones:

\_SB.PCI0.LPCB.EC0.WRAM 0x0521 0xc5   # full fan speed, locks register 0x97; .TACH method shows current fan speed
\_SB.PCI0.LPCB.EC0.WRAM 0x0521 0x85   # back to automatic fan speed control
\_SB.PCI0.LPCB.EC0.WRAM 0x0521 0x35   # manual fan control. Fan speed can be controlled by .ST84 call.
\_SB.PCI0.LPCB.EC0.ST84 Arg0 Arg1     # Arg0 - fan id (0x00 for CPU fan). Arg1 - speed 0x00 - 0xff

For GPU following calls should work but I cannot test them as my laptop does not have GPU:

\_SB.PCI0.LPCB.EC0.WRAM 0x0522 0xc5   # full CPU fan speed
\_SB.PCI0.LPCB.EC0.WRAM 0x0522 0x85   # back to auto fan speed control
\_SB.PCI0.LPCB.EC0.WRAM 0x0522 0x35   # manual fan control. Fan speed can be controlled by .ST84 call with Arg0 = 0x01

I am going to do quick and dirty update of current asus_fan.c for use on my laptop, however I think proper solution would auto-detect laptop model and select appropriate ACPI calls (or try original method first and fall-back to that more hacky one for newer laptops) which is beyond my C abilities.

Thank you for making this kernel module available!
Also want to mention that this forum thread was of immense help:
http://forum.notebookreview.com/threads/fan-control-on-asus-prime-ux31-ux31a-ux32a-ux32vd.705656/

@HorstBaerbel
Copy link

Nice! It looks like this is going somewhere... Will try the ACPI calls on my laptop too when I find time.
Maybe we should make a list of models and if they have one or two fans:
One fan: UX310UAK?, UX330UAK?, UX360UAK, UX410UAK (integrated GPU)
Two fans: UX...UQ models (dedicated GPU)?

@afilipovich
Copy link

afilipovich commented Jun 10, 2017

I found thermal tipping point table in embedded controller RAM. It is between addresses 0x537. 0x53e.
Tipping point values can be changed via .WRAM ACPI call.

Default table:
35, 40, 45, 50, 55, 60, 65, 80
which means EC sets fan power to "1" if temperature exceeds 35C, increase to "2" if it exceeds 40, etc.

I have adjusted tipping points to following temp values and my laptop is silent most of the time:
45, 48, 51, 55, 58, 60, 65, 80

ACPI calls to achieve that:

\_SB.PCI0.LPCB.EC0.WRAM 0x537 0x2d
\_SB.PCI0.LPCB.EC0.WRAM 0x538 0x30
\_SB.PCI0.LPCB.EC0.WRAM 0x539 0x33
\_SB.PCI0.LPCB.EC0.WRAM 0x53a 0x37
\_SB.PCI0.LPCB.EC0.WRAM 0x53b 0x3a

Pros of this approach:

  • Embedded Controller keeps controlling the fan and it works even without asus_fan kernel module.
  • .TACH ACPI call shows fan RPM readings.

Cons:

  • not sure if that works for GPU fan.
  • other laptop models may contain that thermal table at different RAM region.
  • it does not set exact fan speed, only defines tipping points.

It would be nice to expose these adjustments via asus_fan kernel module.

@afilipovich
Copy link

Proof-of-concept script to tweak cooling profile:
https://github.com/afilipovich/asus_ux360uak/blob/master/update_cooling_profile.py

@HorstBaerbel
Copy link

HorstBaerbel commented Jun 11, 2017

It might sound stupid, but I'm stuck using acpi_call. I do

echo '\_SB.PCI0.LPCB.EC0.WRAM <ADDRESS>' | sudo tee /proc/acpi/call && sudo cat /proc/acpi/call

Which should read from ADDRESS. It does not matter what address I use, I always get the result

\_SB.PCI0.LPCB.EC0.WRAM <ADDRESS>
0x1called

I tried addresses around 0x100, 0x200 and 0x537-53b, but always get the same result. What am I doing wrong with acpi_call?!

@afilipovich
Copy link

@HorstBaerbel, WRAM call requires two arguments: <memory address> and <value to write>, e.g. \_SB.PCI0.LPCB.EC0.WRAM 0x537 0x2d. If you want to double-check if memory was updated, you can read that address with \_SB.PCI0.LPCB.EC0.RRAM 0x537

@HorstBaerbel
Copy link

HorstBaerbel commented Jun 12, 2017

Doh, Thanks. "RRAM" for reading makes sense...
My default fan table on the UX3410UA reads "0x23 0x34 0x3a 0x42 0x4d 0x54 0x5c 0x5c" -> "35° 52° 58° 66° 77° 84° 92° 92°". Looks a bit strange. Values before and after are 0x0, so this looks quite plausible.
I tried writing 0x2d to 0x537, but my fan does not immediately stop. It seems to work tough. When the temperature reaches 45°, the fan spins up and after the CPU reaches a temperature below 45° it will stay on a short while, then spin down.
The sad thing is that its enough to browse to a different web page / click a link and the CPU temperature shoots up to 50°, the fan spins up an immediately down again. I guess this is why ASUS chose to pick the 35° lower limit. The fan does not spin up / down so often...
The good thing is you can read / scroll a web page or watch a youtube video now without the fan spinning...

@afilipovich
Copy link

It takes 10-20 seconds for changes in these values to become effective on my laptop and it also switches the fan on/off when there are load spikes. In the end I set the first threshold to 48C to make this annoyance less frequent.

Also it seems fan reacts not only to CPU but also WiFi module temperature which is 5C hotter than CPU when idling in non-power-save mode.

@HorstBaerbel
Copy link

So what I did for now was adding acpi_call to /etc/modules and adding a systemd script fan_table.service to /etc/systemd/system/ that sets the lowest fan tipping point temperature:

[Unit]
Description=Adjusts fan temperature tipping points using acpi_call

[Install]
WantedBy=default.target

[Service]
ExecStart=/bin/bash -c '/bin/echo \"\\_SB.PCI0.LPCB.EC0.WRAM 0x537 0x2d\" | /usr/bin/tee /proc/acpi/call'
ExecStop=/bin/bash -c '/bin/echo \"\\_SB.PCI0.LPCB.EC0.WRAM 0x537 0x23\" | /usr/bin/tee /proc/acpi/call'
Type=oneshot
RemainAfterExit=yes

(mind the escaping)

Then do a systemclt daemon-reload, enable it with systemctl enable fan_table.service and test it with systemctl start fan_table.service. Then you can reboot and your fan table should be adjusted...

@daringer
Copy link
Owner Author

Sounds like this is a clear candidate to be exposed using asus_fan ...

@daringer
Copy link
Owner Author

ok, let's say it's on the way, #52 was the first step, now #53 then this one...

@epiphone
Copy link

@afilipovich your replacement for the _SB.PCI0.LPCB.EC0.SFNV call works on my UX310UQ too, thank you very much! Changing the thermal tipping table values however seems to have no effect - perhaps the GPU uses another table as you proposed. I'm not sure how to find another fan table on the register, would you have any tips on that?

@HorstBaerbel
Copy link

HorstBaerbel commented May 11, 2019

The module is now working on my UX3410UA. See my (preliminary) commit here.
I would suggest I clean the commit up and add a system where "models" can be defined. These would be seperate .h/.c files aka (atm) "model_default" and "model_ux410uak" that contain the all the functions like _fan_set_auto() and the like for that specific machine. They are all registered in "asus_fan.c" and used according to the machine detected. This will be a rather big change, but imo it makes sense to keep "asus_fan.c" clean and enable support of different laptop models.
Maybe you could explain a bit how this auto mode could be interacting with thermald. I haven't tried thermald before...

@daringer
Copy link
Owner Author

nice to see it working, great stuff...

the models system sounds like a pretty good idea to have a clean separation for the models.
Concerning thermald I also haven't used it with auto mode, only more or less manual, might be possible, but admittedly I haven't been using thermald for quite some time now.

@HorstBaerbel
Copy link

Just a conceptional question: What is fan auto mode supposed to do? Reset the fan to its default behaviour / EC control?

@daringer
Copy link
Owner Author

Yes,
for my last Zenbook (UX32VD) one had to first disable "auto" fan management so that setting an actual fan speed had an impact onto the fan's RPM. Once auto was switched on again, the manual settings got overwritten and the internal fan controller is in charge again.

@HorstBaerbel
Copy link

OK. This is somehing in between manual and auto mode... What should I call it, should I add another sysfs entry?

@daringer
Copy link
Owner Author

I would say this is "auto", but adjustable.
"non-auto" in my understanding translates to: "controlled exclusively in/from user-space"
"auto" translates to: "controlled in kernel-space (within given parameters)"

@dominiksalvet
Copy link

@afilipovich So far I didn't find any better way how to directly say thank you as you have made possible creating my asus-fan-control repository, mainly focused on my ASUS ZenBook UX430UA and later being extended to support ASUS ROG Strix GL553VD as well. The very core of the mentioned project stands on this comment in this issue. So thank you! 😃

@daringer I am sorry for the "spam" in this issue, but @afilipovich has no public email in his GitHub profile and I want to let him know.

@afilipovich
Copy link

Thank you @dominiksalvet! I still remember the day when that annoying fan went quiet :)

@klausenbusk
Copy link

I found thermal tipping point table in embedded controller RAM. It is between addresses 0x537. 0x53e.

I can confirm it works on UX430UNR (54 58 62 66 72 78 88 96).

So what I did for now was adding acpi_call to /etc/modules and adding a systemd script fan_table.service to /etc/systemd/system/ that sets the lowest fan tipping point temperature:

FWIW: Using systemd-tmpfiles works perfectly:

$ cat /etc/tmpfiles.d/fan.conf
w /proc/acpi/call - - - - \\_SB.PCI0.LPCB.EC0.WRAM 0x537 0x3a # 58 degree

This is good. The bad news is that once the fan has spun up again, it never spins down completely, regardless of the CPU temperature, so I searched on.

On my laptop the fan spins up at 54° and spins down at ~40°, but if i change the first tipping point to 58° the fan spins down at ~45°. Does the controller use some kind of sliding offset for spin down? maybe?


A few test scripts, maybe they are useful for someone.

Read all tipping points (0x537-0x53e)

#!/bin/bash

# 0x537-0x53e
for i in {1335..1342}; do
	HEX="$(printf '%x\n' $i)"
	echo "\_SB.PCI0.LPCB.EC0.RRAM 0x${HEX}" > /proc/acpi/call
	VALUE="$(cat /proc/acpi/call | sed 's/\x0.*//g')"
	echo $((16#${VALUE#0x}))
done

Read all (?) EC memory

#!/bin/bash

# 0x0-0xfff
for i in {0..4095}; do
	HEX="$(printf '%x\n' $i)"
	echo "\_SB.PCI0.LPCB.EC0.RRAM 0x${HEX}" > /proc/acpi/call
	VALUE="$(cat /proc/acpi/call | sed 's/\x0.*//g')"
	echo -e "0x${HEX}\t$((16#${VALUE#0x}))"
done

@klausenbusk
Copy link

Not related to fan control at all, but I think some of you could find the information useful.

Most newer Zenbooks supports battery charge control (https://www.asus.com/us/support/FAQ/1032726/).

So I did some tinkering and found the relevant address (Zenbook UX430UNR, bios 308):

0x3af	100 # start charge threshold
0x3b0	95 # current battery percent

I use the following, to limit the battery to max 80%:

$ cat /etc/tmpfiles.d/battery.conf 
w /proc/acpi/call - - - - \\_SB.PCI0.LPCB.EC0.WRAM 0x3af 0x50 # 80%

@klausenbusk
Copy link

After much tinkering with decompiled DSDT I found ACPI calls which can replace missing ones:

Support for newer Zenbooks should be supported out-of-the-box when this patch gets merged (5.4 or maybe 5.3).

@dominiksalvet
Copy link

@daringer Oops, here we go again... but you already know the email address thing, don't you? Sorry for that... still could not help myself. 😢

@klausenbusk Hey man! Do you know about asus-fan-control? It does basically the same as your script for setting temperature does but in a more sophisticated and consistent way - it sets all temperatures, performs various checks, it supports a decent amount of ASUS laptop models and much more. Thanks to @agura-lex we also have systemd integration and an AUR package for our dear Arch users. Your model name seems to be very similar to mine (UX430UA), so there is a decent chance it will work out of the box (but explicitly adding it as tested would be really great). Please, consider giving asus-fan-control a try. 😄

@klausenbusk BTW thank you so much for the code snippets above. ❤️ Some people have reported me that asus-fan-control did not work on their devices and I have been thinking a bit what to do with that. Once I had seen your snippets, I got an idea and I have created afc-scout, which you can basically use to find your base ACPI fan address by reading a given ACPI address range. Yep, you need to process it manually but it is certainly better than nothing! 🚀

@daringer
Copy link
Owner Author

daringer commented Mar 8, 2020

HAHA, this is pretty next level: direct-marketing at the competitor, at least you come over to visit asus-fan - but seriously: no worries, it's not like this is a competition for the highest number of hardware-specific adaptations within some piece of code 🤓

Personally I believe hardware should not be controlled by bash scripts (too often) :D so it will be tough for you to get me to asus-fan-control and if your project gets better because of the discussions/investigations here, it's already win-win. Despite the fact that afc-scout will be helpful to support more models, so keep up the good work. At least until I have a zenbook again 👍 😩 But this is already around the corner, will for sure use afc-scout^^

@dominiksalvet
Copy link

@daringer Glad to hear that! I have no interest to compete with asus-fan. We both develop software that does basically the same (except for two fans support) but we use different approaches.

I understand your skepticism about "bash scripts" but keep in mind that my scripts are almost without an exception POSIX shell scripts and so they run practically everywhere without any special dependencies (even on macOS and even these days). I also realize the fact that shell scripts may be very fragile and hence I really keen on mechanisms preventing those issues - AND/OR lists, no command substitution in another command's parameter, no pipes (except with echo), no non-POSIX command options, functions, which modify calling shell's environment, are strictly put into their own subshells, etc.

BTW, I really wouldn't post here if @klausenbusk had an email address on his GitHub profile. For the sake of completeness, @afilipovich really did not have an email address on his profile that time (in case you miss it)... He just reacted quickly and added it. 😄

Hope you will be happy with a new ZenBook! 🚀

@klausenbusk
Copy link

BTW, I really wouldn't post here if @klausenbusk had an email address on his GitHub profile. For the sake of completeness, @afilipovich really did not have an email address on his profile that time (in case you miss it)... He just reacted quickly and added it. smile

Finding a email address for a Github user isn't hard if they have some public activity :)
foo

@klausenbusk Hey man! Do you know about asus-fan-control? It does basically the same as your script for setting temperature does but in a more sophisticated and consistent way - it sets all temperatures, performs various checks, it supports a decent amount of ASUS laptop models and much more. Thanks to @agura-lex we also have systemd integration and an AUR package for our dear Arch users.

It is hard to compete with w /proc/acpi/call - - - - \\_SB.PCI0.LPCB.EC0.WRAM 0x537 0x3a # 58 degree, I prefer to keep it simple and tmpfiles.d is just simpler. It is a cool tool though!

Your model name seems to be very similar to mine (UX430UA), so there is a decent chance it will work out of the box (but explicitly adding it as tested would be really great). Please, consider giving asus-fan-control a try. smile

The base fan control address is located at the same location (1335) so I assume it will work. BTW: I think you should move the fallback addr behind a --yes-i-know-what-im-doing flag, writing to "random" EC memory locations can be dangerous!

Out of curiosity: Are you experiencing throttling on your model? My CPU was capped at ~8w (IIRC) until I did: https://github.com/erpalma/throttled/tree/88216b119ad512d6d345e66dd304ba7b6b3e93c0#static-fix

@dominiksalvet
Copy link

@klausenbusk Thanks man! Didn't know about the email address. 👍 I would gladly add your model as tested but since you haven't tried it with asus-fan-control, I can't do so. 😢 But I completely understand your argument of simplicity and I respect it! 😄 Still, should you change your mind, make sure you will add your model, please.

Here is the thing with writing to "random" EC addresses... The fact that there is no such flag from the very beginning of asus-fan-control is probably the main reason why asus-fan-control is not called ux430ua-fan-control as was initially... BTW, I think that afc-scout brings at least something to the table in this matter... 😄

I do not notice any symptoms of CPU throttling on my device. BTW, I have i5-7200U and default UX430UA asus-fan-control configuration... 🚀


Ok, I am truly sorry @daringer for the spam and since now I know how to reach people even without public GitHub email, this is most likely my last post here. Also, feel free to remove my posts here (e.g., in a week) as their messages have been delivered and I must admit that they do not contribute to this issue very much. Nevertheless, thank you so much for the given space! ❤️

@daringer
Copy link
Owner Author

@dominiksalvet, absolutly ok, it drives things/projects forward, you have my full support :D

@mirh
Copy link

mirh commented Feb 25, 2021

You should point out about asus-fan-control in the readme
Also it's not the super-est clear if non-zenbook asus laptops are welcome or not.
EDIT: also, I found a list of possible ECs here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests