dominiksalvet / asus-fan-control

Fan control for ASUS devices running Linux
MIT License
317 stars 37 forks source link

Add support for ASUS VivoBook Pro 15 N580GD #5

Closed sangallidavide closed 3 years ago

sangallidavide commented 4 years ago

Dear @dominiksalvet I also have the problem that my Ausu is heating too much and I'd like to control the fans.

Environment Ubuntu 18.04 I did a git clone of the project and I'm directly running the script contained in source. Hash b526a4fe4d8a0f53b279946

Temperature configuration

sudo ./src/asus-fan-control -get-temps
55 56 57 58 59 60 61 62

Notebook model name

sudo dmidecode -s system-product-name
VivoBook_ASUSLaptop X580GD_N580GD

I tried to set temperatures with sudo ./src/asus-fan-control -set-temps:"40 41 42 43 44 45 46 47" which created /etc/asus-fan-control/custom-temps containing

sudo cat /etc/asus-fan-control/custom-temps 
40 41 42 43 44 45 46 47

but nothing changed

After that get temps still gives me the same temperatures:

sudo ./src/asus-fan-control -get-temps
55 56 57 58 59 60 61 62
dominiksalvet commented 4 years ago

@sangallidavide Hello and thank you for creating this issue! Honestly, I would rather continue investigating the problem with having asus-fan-control installed correctly in your system using GitPack as it may prevent some possible issues.

So, please install asus-fan-control using GitPack as stated in Instructions in the README.md file and reboot your machine. Then report the current state and we can continue with troubleshooting.


I am a GitPack developer - just in case you are concerned about using it.

dominiksalvet commented 4 years ago

@sangallidavide Anything new with your issue? :thinking:

sangallidavide commented 4 years ago

Hello, I'll try to install it with GitPack. Just I need to find some time to do it. I'll write here again as soon as I've done that.

azamet90 commented 4 years ago

@sangallidavide Anything new with your issue? thinking

i have the same problem: here is what i did:

┌─[azamet@localhost]─[/Downloads/asus-fan-control]
└──╼ $mkdir -p /tmp/gitpack/ && cd /tmp/gitpack/ && # prepare a temporary directory
> git clone https://github.com/dominiksalvet/gitpack.git ./ && # clone repository
> git checkout "$(git describe --tags --abbrev=0)" && # use latest version
> sudo src/gitpack install github.com/dominiksalvet/gitpack # install GitPack
Cloning into '.'...
remote: Enumerating objects: 99, done.
remote: Counting objects: 100% (99/99), done.
remote: Compressing objects: 100% (67/67), done.
remote: Total 1908 (delta 50), reused 66 (delta 23), pack-reused 1809
Receiving objects: 100% (1908/1908), 395.08 KiB | 115.00 KiB/s, done.
Resolving deltas: 100% (1083/1083), done.
Note: switching to '0.7.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at d5a9f75 Increase version to 0.7.0
[sudo] password for azamet: 
[install] github.com/dominiksalvet/gitpack 0.7.0
┌─[azamet@localhost]─[/tmp/gitpack]
└──╼ $gitpack
no argument provided
┌─[✗]─[azamet@localhost]─[/tmp/gitpack]
└──╼ $cd
┌─[azamet@localhost]─[~]
└──╼ $cd Downloads
┌─[azamet@localhost]─[~/Downloads]
└──╼ $sudo gitpack install github.com/dominiksalvet/asus-fan-control
/usr/local/bin/asus-fan-control: Missing temperatures for your notebook model or they are invalid. Falling back to UX430UA temperatures.
[install] github.com/dominiksalvet/asus-fan-control 2.9.1
┌─[azamet@localhost]─[~/Downloads]
└──╼ $sudo asus-fan-control
/usr/local/bin/asus-fan-control: Missing temperatures for your notebook model or they are invalid. Falling back to UX430UA temperatures.
┌─[azamet@localhost]─[~/Downloads]
└──╼ $sudo asus-fan-control -set-temps:'45 50 55 60 65 70 75 80'
┌─[azamet@localhost]─[~/Downloads]
└──╼ $sudo asus-fan-control
┌─[azamet@localhost]─[~/Downloads]
└──╼ $sudo asus-fan-control -set-temps:'35 40 45 50 55 60 65 70'
┌─[azamet@localhost]─[~/Downloads]
└──╼ $sudo asus-fan-control -h
/usr/local/bin/asus-fan-control: The option '-h' was not recognized.
┌─[✗]─[azamet@localhost]─[~/Downloads]
└──╼ $sudo asus-fan-control -help
USAGE: /usr/local/bin/asus-fan-control [OPTION]...

OPTION:
  -get-temps            show current temperatures of fan speed levels
  -set-default-temps    use default temperatures for fan speed levels
  -set-temps:<numbers>  use custom temperatures for fan speed levels
  -help                 show this help and exit
  -about                show information and exit
  -version              show version and exit
┌─[azamet@localhost]─[~/Downloads]
└──╼ $sudo asus-fan-control -get-temps
55 56 57 58 59 60 61 62
┌─[azamet@localhost]─[~/Downloads]
└──╼ $sudo asus-fan-control -about
asus-fan-control 2.9.1
Fan control for ASUS devices running Linux.

Copyright 2017-2019 Dominik Salvet
github.com/dominiksalvet/asus-fan-control
┌─[azamet@localhost]─[~/Downloads]
└──╼ $sudo asus-fan-control -set-temps:'35 40 45 50 55 60 65 70'
┌─[azamet@localhost]─[~/Downloads]
└──╼ $sudo asus-fan-control -about
asus-fan-control 2.9.1
Fan control for ASUS devices running Linux.

Copyright 2017-2019 Dominik Salvet
github.com/dominiksalvet/asus-fan-control
┌─[azamet@localhost]─[~/Downloads]
└──╼ $sudo asus-fan-control -get-temps
55 56 57 58 59 60 61 62
┌─[azamet@localhost]─[~/Downloads]
└──╼ $sudo asus-fan-control -set-temps:'30 35 40 45 50 55 60 65'
┌─[azamet@localhost]─[~/Downloads]
└──╼ $sudo cat /etc/asus-fan-control/custom-temps
30 35 40 45 50 55 60 65
┌─[azamet@localhost]─[~/Downloads]
└──╼ $sudo ./src/asus-fan-control -get-temps
sudo: ./src/asus-fan-control: komut bulunamadı
┌─[✗]─[azamet@localhost]─[~/Downloads]
└──╼ $sudo asus-fan-control -get-temps
55 56 57 58 59 60 61 62
sudo asus-fan-control -set-default-temps '30 35 40 45 50 55 60 65'
/usr/local/bin/asus-fan-control: Missing temperatures for your notebook model or they are invalid. Falling back to UX430UA temperatures.
/usr/local/bin/asus-fan-control: The option '30 35 40 45 50 55 60 65' was not recognized.
dominiksalvet commented 4 years ago

Turn off this advice by setting config variable advice.detachedHead to false

Thank you so much for this advice. :clap: I was thinking whether silence it or not. However, this is not related to asus-fan-control at all. I would really appreciate if you can create an issue for that directly in GitPack repository. :heart:

@azamet90 Note that -set-default-temps does not accept any additional argument and hence it can lead to undefined behaviour. Please beautify all your posts containing terminal output or code and do not use a pastebin (as mentioned in the previous link). If you will not beautify your posts, I do it myself as it can discourage newcomers from understading the issue. Please, do it right now. :pray:

Anyways, we must wait for @sangallidavide to test asus-fan-control when installed with GitPack. However, I have a bad feeling. :disappointed:

azamet90 commented 4 years ago

Turn off this advice by setting config variable advice.detachedHead to false

Thank you so much for this advice. clap I was thinking whether silence it or not. However, this is not related to asus-fan-control at all. I would really appreciate if you can create an issue for that directly in GitPack repository. heart

@azamet90 Note that -set-default-temps does not accept any additional argument and hence it can lead to undefined behaviour. Please beautify all your posts containing terminal output or code and do not use a pastebin (as mentioned in the previous link). If you will not beautify your posts, I do it myself as it can discourage newcomers from understading the issue. Please, do it right now. pray

Anyways, we must wait for @sangallidavide to test asus-fan-control when installed with GitPack. However, I have a bad feeling. disappointed

i did fix it sorry for that sir what you suggesting me now sir? should i wait if it is short time to wait or should i uninstall the tool?

dominiksalvet commented 4 years ago

@azamet90 Thank you! :+1: Now I see that 'Turn off this advice by setting config variable advice.detachedHead to false' is actually Git output and not your suggestion. :smile:

@azamet90 Please, let us keep this issue clear and continue with the discussion in #6.

sangallidavide commented 4 years ago

I've installed it via gitpack Everything is the same as in my last post

dominiksalvet commented 4 years ago

@sangallidavide Thank you! :rocket: Unfortunately, it looks like your model has different ACPI fan addresses compared to the addresses of currently tested devices (also observed in #4 and #6). As per the current state, I can't do anything - I am truly sorry. :disappointed:

Feel free to uninstall asus-fan-control using GitPack as sudo gitpack uninstall https://github.com/dominiksalvet/asus-fan-control. In case you want to purge the asus-fan-control installation, take a look at this post.

If you do not have any additional comments and you are not interested in the opportunity below, you can close this issue. Otherwise, I am here to assist. :rocket:


If you (or anyone) by chance are interested in adding the support for your model yourself, I would refer you to this post - the alpha and the omega of this program.

Right now I am open to accept a PR of adding support for any of unsupported models (issues marked with 'unsupported model' label). There is also a decent chance that adding support for one model might bring support for other models as well. Then, only the mechanism based on model-address relation is needed to be created (similar to current model-temperatures mechanism).

sangallidavide commented 4 years ago

Thanks. I'll give it a try checking the linked post.

dominiksalvet commented 4 years ago

@sangallidavide Basically you need to find your base ACPI fan/s address (if ASUS retained the fun control mechanism).

BTW, some support may be also provided directly from ASUS if you want to ask them. I have my own experince with asking about power control of my UX430UA.

Google also may be helpful as there a lot of nerds around and you might even get the information from other fan control projects.

Anyways, thank you for you interest. :heart: Once you know something important, please let me know. :rocket:

dominiksalvet commented 4 years ago

@sangallidavide NOTE: I have changed my mind about issues with unsupported models and so, please, let this issue open even though you would not be able to resolve it yourself. Other people will know that this issue still is not resolved and so they can contribute this way.

dominiksalvet commented 4 years ago

Hello @sangallidavide!

Good news! I have released the 3.0.0 version with the support for different base ACPI addresses among tested models.

If you ever know/find the base ACPI fan address for your device, asus-fan-control will be able to fully support your model. Please, let us know. :rocket:

dominiksalvet commented 4 years ago

@sangallidavide Please, take a look at this comment. Maybe it can help! :smile:

sangallidavide commented 4 years ago

Ciao, attached the output of afc-scout afc-scout.txt

I saw also issue #38 which is for a model almost identical to mine This could be useful too. https://github.com/hirschmann/nbfc/blob/master/Configs/ASUS%20Vivobook%20X580VD.xml

dominiksalvet commented 4 years ago

Ciao, attached the output of afc-scout

That's interesting. :thinking: The graph created of your afc-scout values is suspiciously similar to this one. :chart_with_upwards_trend: Feel free to take a look at the linked issue as you may find out something useful.

I saw also issue #38 which is for a model almost identical to mine

Yeah, but yours looks like to be more recent. Maybe ASUS has changed the fan control mechanism since the model of the mentioned issue is working out of the box -- at least its one fan. The support for the second fan will be added.

This could be useful too. https://github.com/hirschmann/nbfc/blob/master/Configs/ASUS%20Vivobook%20X580VD.xml

I have briefly taken a look at it but did not spot any important associations with asus-fan-control X580VD values. Our Holy Grail as per the current state is the 1335 (in decimal) address as all currently tested models use it.

sangallidavide commented 4 years ago

Ok. Indeed I get this:

afc-scout

I understand your statment

I guess that there is a problem with either your hardware or software. If it is a hardware issue, the EC0 controller used when calling ACPI may not be present on your device but for some reason it did not end up with an AE_NOT_FOUND error. If it is a software issue, the EC0 controller may be disabled by kernel for some reason if I had to guess.

should apply also to my model. I'm interested in this. Can you give me any suggestion on how to check if the EC0 controller is disabled by kernel for any reason ? Also can you tell me what it would mean in practice ? Just that I do not have control on my fans or anything else ?

Thank you in advance.

sangallidavide commented 4 years ago

Comparing to the other asus X580VD

Maybe one difference is that I'm running ubuntu 18.04 and thus a different kernel

uname -a
Linux VivoBook 5.3.0-46-generic #38~18.04.1-Ubuntu SMP Tue Mar 31 04:17:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linu
dominiksalvet commented 4 years ago

Maybe one difference is that I'm running ubuntu 18.04 and thus a different kernel

I use Ubuntu 18.04 as well and zero issues so far. But I do not know whether this "property" is cross-model, or not.

Can you give me any suggestion on how to check if the EC0 controller is disabled by kernel for any reason ?

I am sorry but I do not know that. I do not even know whether it is possible for EC0 to be disabled in the first place. :smile: I guess that we would need some ACPI expers to answer that question. Maybe @Lekensteyn, @avilella or other acpi_call developers may help, please? :pleading_face:

Also can you tell me what it would mean in practice ? Just that I do not have control on my fans or anything else ?

Again, I do not know. The keyboard backlight comes to my mind if I had to guess. If you have some time, you can take a look at this asus-fan issue where I believe you can find something useful.

sangallidavide commented 4 years ago

After upgrading to ubuntu 20.04 something changed. Now ubuntu detected a fan speed sensor (only one of the two fans).

Moreover the output of afc-scout is different

------ base address 1335 ------
[1334] = 54
[1335] = 55 <- possible start
[1336] = 56
[1337] = 57
[1338] = 58
[1339] = 59
[1340] = 60
[1341] = 61
[1342] = 62 <- possible end
[1343] = 63
------ base address 1431 ------
[1430] = 150
[1431] = 151 <- possible start
[1432] = 152
[1433] = 153
[1434] = 154
[1435] = 155
[1436] = 156
[1437] = 157
[1438] = 158 <- possible end
[1439] = 159

However asus fan controol is still not working

sudo asus-fan-control set-temps 45 50 55 60 65 70 75 80
sudo asus-fan-control get-temps
55 56 57 58 59 60 61 62
dominiksalvet commented 4 years ago

@sangallidavide I have updated afc-scout to print that beautified output of interesting ACPI address ranges. And since it matches your graph of values, nothing changes on this front unfortunately. 😞

Now ubuntu detected a fan speed sensor (only one of the two fans).

This, however, looks like very good news for you. Asus-fan-control may not be working for your device but maybe other fan control programs could work since there is at least a sign of a fan existence in your device.

Certainly let us know once you find out something interesting. :rocket: