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

intel-undervolt daemon doesn't help persist settings #11

Closed
yglukhov opened this issue Sep 24, 2018 · 14 comments
Closed

intel-undervolt daemon doesn't help persist settings #11

yglukhov opened this issue Sep 24, 2018 · 14 comments

Comments

@yglukhov
Copy link

Steps:

  1. Arch linux, enabled both services:
systemctl enable --now intel-undervolt-loop.service
systemctl enable --now intel-undervolt.service
  1. Verify both services are healthy and the daemon is running:
ps ax | grep intel-under
3477 ?        Ss     0:00 /usr/bin/intel-undervolt daemon
  1. intel-undervolt apply
  2. intel-undervolt read yields correct settings
  3. Wait for some time. 20 mins or so...
  4. intel-undervolt read yields zero settings

No reboot was done in the process.

@kitsunyan
Copy link
Owner

Can you give me your config file and the output of systemctl status intel-undervolt-loop?

@yglukhov
Copy link
Author

Config:

# CPU Undervolting
# Usage: apply ${index} ${display_name} ${undervolt_value}
# Example: apply 2 'CPU Cache' -25.84

apply 0 'CPU' -140
apply 1 'GPU' -120
apply 2 'CPU Cache' -110
apply 3 'System Agent' 0
apply 4 'Analog I/O' 0

# TDP Alteration
# Usage: tdp ${short_term} ${long_term}
# Usage: tdp ${short_term}/${time_window} ${long_term}/${time_window}
# Example: tdp 45/0.002 35/28

# Critical Temperature Offset Alteration
# Usage: tjoffset ${temperature_offset}
# Example: tjoffset -20

# Daemon Update Inverval
# Usage: interval ${interval_in_milliseconds}

interval 5000

Status:

● intel-undervolt-loop.service - Intel Undervolt Loop Service
   Loaded: loaded (/usr/lib/systemd/system/intel-undervolt-loop.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2018-09-24 11:34:59 EEST; 12h ago
 Main PID: 3477 (intel-undervolt)
    Tasks: 1 (limit: 4915)
   Memory: 276.0K
   CGroup: /system.slice/intel-undervolt-loop.service
           └─3477 /usr/bin/intel-undervolt daemon

sep 24 11:34:59 yuriys-laptop systemd[1]: Started Intel Undervolt Loop Service.

@yglukhov
Copy link
Author

I might be wrong, but the daemon doesn't seem to call undervolt, while it should? https://github.com/kitsunyan/intel-undervolt/blob/master/main.c#L310-L311

@kitsunyan
Copy link
Owner

Actually it shouldn't.

Sometimes power and temperature limits could be reset … which will apply limits with the specified interval

It was designed so only power and temperature limits are changed by daemon. In your case you don't even need to use intel-undervolt-loop.

I thought it would be enough since undervolting is done by completely different and much more complex mechanism, although it seems the same from the first glance, so nothing would try to reset voltage.

Can you try to disable intel-undervolt-loop and find how often configuration resets? Maybe you'll be able to find under which conditions it happens.

@yglukhov
Copy link
Author

Ok, i'll keep an eye on it for now

@yglukhov
Copy link
Author

yglukhov commented Sep 25, 2018

Disabled intel-undervolt-loop, went to sleep. After full suspend the settings are reset to zeros. Rebooted, the settings are set to correct ones.

Now I think there could be suspend within my original steps to reproduce.

EDIT: Suspend to ram also seems to reset the settings to zero.
EDIT: I can't reproduce the issue by manually running systemctl hibernate (

@kitsunyan
Copy link
Owner

Can you check that program was executed after wake up? Check last activity time using systemctl status intel-undervolt.

@yglukhov
Copy link
Author

yglukhov commented Sep 25, 2018

After another suspend, I do systemctl status intel-undervolt at 18:22, and here's the output

● intel-undervolt.service - Intel Undervolt Service
   Loaded: loaded (/usr/lib/systemd/system/intel-undervolt.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Tue 2018-09-25 12:05:32 EEST; 6h ago
  Process: 3867 ExecStart=/usr/bin/intel-undervolt apply (code=exited, status=0/SUCCESS)
 Main PID: 3867 (code=exited, status=0/SUCCESS)

сен 25 12:05:32 yuriys-laptop systemd[1]: Starting Intel Undervolt Service...
сен 25 12:05:32 yuriys-laptop intel-undervolt[3867]: CPU (0): -139.65 mV
сен 25 12:05:32 yuriys-laptop intel-undervolt[3867]: GPU (1): -120.12 mV
сен 25 12:05:32 yuriys-laptop intel-undervolt[3867]: CPU Cache (2): -110.35 mV
сен 25 12:05:32 yuriys-laptop intel-undervolt[3867]: System Agent (3): -0.00 mV
сен 25 12:05:32 yuriys-laptop intel-undervolt[3867]: Analog I/O (4): -0.00 mV
сен 25 12:05:32 yuriys-laptop systemd[1]: Started Intel Undervolt Service.

which basically means that it was not triggered?

EDIT: intel-undervolt read yields zero settings.

@kitsunyan
Copy link
Owner

Here is the list of targets which trigger intel-undervolt:

WantedBy=multi-user.target suspend.target hibernate.target hybrid-sleep.target

Which method do you use for suspend and how?

@yglukhov
Copy link
Author

Which method do you use for suspend and how?

Dunno, it's just what default antergos/arch does when I close the laptop.

Here's the relevant part of the journal if that helps. I woke the laptop at 9:16 sep 26.

https://gist.github.com/yglukhov/f96408af48f82f22e3bf7d246c187cdd

@yglukhov
Copy link
Author

After a few software updates, the issue seems to be gone. Closing.

@kitsunyan
Copy link
Owner

Sorry, I forgot about your issue.

There was a similar problem on my machine with suspend/hibernate targets when I tried to create another tool for personal usage which is triggered by hibernate.target. After some systemd update my service wasn't triggered anymore, and I fixed it by replacing hibernate.target with sleep.target. After several systemd updates the problem was fixed. Perhaps, your problem was the same and it was fixed after some systemd update.

@utsnik
Copy link

utsnik commented Feb 1, 2019

I still have the same issues though, any idea how to help? Both loop service and regular is running.

Only the CPU and GPU voltages are reset when sleep.

@AlexPutin
Copy link

same issue on manjaro 20. I'm add suspend-then-hibernate.target to the list of targets in /usr/lib/systemd/system/intel-undervolt.service as PR #41 say and it's works

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

No branches or pull requests

4 participants