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

system76-power daemon is taking too much cpu #277

Open
edap opened this issue Oct 3, 2021 · 9 comments
Open

system76-power daemon is taking too much cpu #277

edap opened this issue Oct 3, 2021 · 9 comments

Comments

@edap
Copy link

edap commented Oct 3, 2021

Previously open on pop-os/system76-firmware#68

Distribution (run cat /etc/os-release):

NAME="Pop!_OS"
VERSION="21.04"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 21.04"
VERSION_ID="21.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=hirsute
UBUNTU_CODENAME=hirsute
LOGO=distributor-logo-pop-os

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

System 76 power daemon

Issue/Bug Description:

Taking 100% cpu

Steps to reproduce (if you know):

I do not know. But one processor is always using 100% of the resources, independently from which application is running

Expected behavior:

When just the browser is running (without videos webGL applications), the daemon should not take that amount of cpu and the fan should be quiet.

Other Notes:
132541922-c1ede1f7-58a3-446e-9ada-b547cdf2c141

@crawfxrd
Copy link
Member

crawfxrd commented Oct 4, 2021

How frequently does this happen?

What does systemctl say about the service when it's in that state?

sudo systemctl status system76-power

@grantbrown
Copy link

This occurs about every other week for me. I also sometimes observe that this daemon hangs, preventing proper shutdown.

Here's the result of running that command from this morning (ended up here because it happened just now and wondered if anyone had a solution).

 system76-power.service - System76 Power Daemon
     Loaded: loaded (/etc/systemd/system/system76-power.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2021-10-04 08:35:25 CDT; 2h 29min ago
   Main PID: 4427 (system76-power)
      Tasks: 18 (limit: 47308)
     Memory: 5.3M
     CGroup: /system.slice/system76-power.service
             ├─ 812 /usr/bin/system76-power daemon
             └─4427 /usr/bin/system76-power daemon

Oct 04 08:35:25 zg14 system76-power[4427]: [INFO] Disabling NMI Watchdog (for kernel debugging only)
Oct 04 08:35:25 zg14 system76-power[4427]: [INFO] Setting automatic graphics power
Oct 04 08:35:25 zg14 system76-power[4427]: [INFO] Enabling graphics power
Oct 04 08:35:25 zg14 system76-power[4427]: [INFO] Initializing with the balanced profile
Oct 04 08:35:25 zg14 system76-power[4427]: [INFO] Registering dbus name com.system76.PowerDaemon
Oct 04 08:35:25 zg14 system76-power[4427]: [INFO] Adding dbus path /com/system76/PowerDaemon with interface com.system76.PowerDaemon
Oct 04 08:35:25 zg14 systemd[1]: Started System76 Power Daemon.
Oct 04 08:35:25 zg14 system76-power[4427]: [ERROR] fan daemon: platform hwmon not found
Oct 04 08:35:25 zg14 system76-power[4427]: [INFO] Handling dbus requests
Oct 04 08:35:25 zg14 system76-power[4427]: [ERROR] hid_backlight: no system76_acpi::kbd_backlight led

Here's the result of cat /etc/os-release for me:

NAME="Pop!_OS"
VERSION="21.04"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 21.04"
VERSION_ID="21.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=hirsute
UBUNTU_CODENAME=hirsute
LOGO=distributor-logo-pop-os

Also, I am not on System76 hardware if it matters - I'm observing this on a Rog Zephyrus G14 (GA401IV-BR9N6)

@edap
Copy link
Author

edap commented Oct 4, 2021

I am also on a G14, (ROG Zephyrus G14 GA401IV-HE003, processor AMD R7 4800HS, graphics card RTX 2060). Occasionally I also have troubles shutting down the laptop. This is the result of sudo systemctl status system76-power , at the moment all the cpus are running fine.

● system76-power.service - System76 Power Daemon
     Loaded: loaded (/etc/systemd/system/system76-power.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2021-10-04 10:52:19 CEST; 7h ago
   Main PID: 810 (system76-power)
      Tasks: 1 (limit: 47303)
     Memory: 3.2M
     CGroup: /system.slice/system76-power.service
             └─810 /usr/bin/system76-power daemon

Oct 04 10:52:19 pop-os system76-power[810]: [ERROR] fan daemon: platform hwmon not found
Oct 04 10:52:19 pop-os system76-power[810]: [INFO] Handling dbus requests
Oct 04 10:52:19 pop-os systemd[1]: Started System76 Power Daemon.
Oct 04 10:52:19 pop-os system76-power[810]: [ERROR] hid_backlight: no system76_acpi::kbd_backlight led
Oct 04 10:52:32 pop-os system76-power[810]: [INFO] DBUS Received GetSwitchable() method
Oct 04 10:52:32 pop-os system76-power[810]: [INFO] DBUS Received GetGraphics() method
Oct 04 10:52:32 pop-os system76-power[810]: [INFO] DBUS Received GetProfile() method
Oct 04 16:59:06 pop-os system76-power[810]: [INFO] DBUS Received GetSwitchable() method
Oct 04 16:59:06 pop-os system76-power[810]: [INFO] DBUS Received GetGraphics() method
Oct 04 16:59:06 pop-os system76-power[810]: [INFO] DBUS Received GetProfile() method

I will post the result of the same command as soon as the problem happens again.

@crawfxrd
Copy link
Member

crawfxrd commented Oct 4, 2021

This looks like it may be related to #268.

@crawfxrd
Copy link
Member

crawfxrd commented Oct 4, 2021

You can also try installing strace. Then, once you hit the issue, if you run htop as root you can press s (and then F8 for autoscroll) to see what syscall it's spinning on.

@grantbrown
Copy link

Thanks, will try that when it recurs.

@grantbrown
Copy link

I can't attach to the process when running as root, which looks like it may mean that it's already attached. It's currently spinning at 100% with PID 801, and the result of running:

grep 801 /proc/801/status 

is the following:

Tgid: 801 Pid: 801 NStgid: 801 NSpid: 801 NSpgid: 801 NSsid: 801

The contents of /proc/801/syscall is just the string "running", and the contents of /proc/801 is:

arch_status  cmdline             environ  limits     mounts      oom_score      root       smaps_rollup  task
attr         comm                exe      loginuid   mountstats  oom_score_adj  sched      stack         timens_offsets
autogroup    coredump_filter     fd       map_files  net         pagemap        schedstat  stat          timers
auxv         cpu_resctrl_groups  fdinfo   maps       ns          patch_state    sessionid  statm         timerslack_ns
cgroup       cpuset              gid_map  mem        numa_maps   personality    setgroups  status        uid_map
clear_refs   cwd                 io       mountinfo  oom_adj     projid_map     smaps      syscall       wchan

Anything specific to look at?

@thazhemadam
Copy link

This seems to be happening to me too, although it is a lot more frequent than once a week - more like at least once every two days. Is there any fix/hack around that could help fix this? Even sending a SIGKILL to the process doesn't seem to kill the process.

@emptythevoid
Copy link

Is the same as this bug? #360

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

5 participants