High power consumption

Bug #2067830 reported by pinus
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

After fresh install of 24.04 the power consumption raised about 40W being idle. Previously running Ubuntu 22.04.

Analysis found that the the step from login screen to Ubuntu/gnome desktop consumes ~40W. Doing the same with KDE doesn't do that. The KDE desktop is near login screen power consumption. The Ubuntu/gnome behaves the same as the gnome/gnome package. CPU usage/load is near zero.

Setting the CPU governor to powersave reduces the power consumption significantly. The default schedutil governor is a pretty bad choice. It seems that gnome shell does something that prevents the CPU from going to sleep, without creating lots of CPU load. The governor conservative produces much better power consumption. Not sure what gnome does to keep the CPU in boost mode but it waists a lot of energy.

I use a desktop PC with AMD Ryzen 5900x, using 65W eco mode in BIOS. Connected via power meter.
---
ProblemType: Bug
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
DisplayManager: gdm3
DistroRelease: Ubuntu 24.04
InstallationDate: Installed on 2024-05-01 (33 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240424)
Package: gnome-shell 46.0-0ubuntu5.1
PackageArchitecture: amd64
ProcEnviron:
 LANG=de_DE.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
ProcVersionSignature: Ubuntu 6.8.0-35.35-generic 6.8.4
RelatedPackageVersions: mutter-common 46.0-1ubuntu9
Tags: noble
Uname: Linux 6.8.0-35-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip docker libvirt lpadmin plugdev sudo users
_MarkForUpload: True

Revision history for this message
Chris Guiver (guiverc) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command only once, as it will automatically gather debugging information, in a terminal:

apport-collect 2067830

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

To resolve the issue, a Support site maybe more appropriate, eg. https://answers.launchpad.net/ubuntu. You can also find help with your problem in the support forum of your local Ubuntu community http://loco.ubuntu.com/ or asking at https://askubuntu.com or https://ubuntuforums.org, or for more support options please look at https://discourse.ubuntu.com/t/community-support/709.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please:

1. Run:

   ps auxw > ps.txt

   and attach the resulting text file here.

2. Run:

   apport-collect 2067830

   to automatically send more information and the machine.

tags: added: noble
Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
pinus (pinus) wrote : Dependencies.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
pinus (pinus) wrote : GsettingsChanges.txt

apport information

Revision history for this message
pinus (pinus) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
pinus (pinus) wrote : ShellJournal.txt

apport information

Revision history for this message
pinus (pinus) wrote : monitors.xml.txt

apport information

Revision history for this message
pinus (pinus) wrote : Re: High power consumption of gnome-shell
Download full text (50.2 KiB)

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.8 0.0 24492 14176 ? Ss 18:30 0:01 /sbin/init splash
root 2 0.0 0.0 0 0 ? S 18:30 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S 18:30 0:00 [pool_workqueue_release]
root 4 0.0 0.0 0 0 ? I< 18:30 0:00 [kworker/R-rcu_g]
root 5 0.0 0.0 0 0 ? I< 18:30 0:00 [kworker/R-rcu_p]
root 6 0.0 0.0 0 0 ? I< 18:30 0:00 [kworker/R-slub_]
root 7 0.0 0.0 0 0 ? I< 18:30 0:00 [kworker/R-netns]
root 8 0.0 0.0 0 0 ? I 18:30 0:00 [kworker/0:0-events]
root 9 0.0 0.0 0 0 ? I 18:30 0:00 [kworker/0:1-rcu_gp]
root 10 0.0 0.0 0 0 ? I< 18:30 0:00 [kworker/0:0H-events_highpri]
root 11 0.0 0.0 0 0 ? I 18:30 0:00 [kworker/u64:0-gfx_0.0.0]
root 12 0.0 0.0 0 0 ? I< 18:30 0:00 [kworker/R-mm_pe]
root 13 0.0 0.0 0 0 ? I 18:30 0:00 [rcu_tasks_kthread]
root 14 0.0 0.0 0 0 ? I 18:30 0:00 [rcu_tasks_rude_kthread]
root 15 0.0 0.0 0 0 ? I 18:30 0:00 [rcu_tasks_trace_kthread]
root 16 0.0 0.0 0 0 ? S 18:30 0:00 [ksoftirqd/0]
root 17 0.0 0.0 0 0 ? I 18:30 0:00 [rcu_preempt]
root 18 0.0 0.0 0 0 ? S 18:30 0:00 [migration/0]
root 19 0.0 0.0 0 0 ? S 18:30 0:00 [idle_inject/0]
root 20 0.0 0.0 0 0 ? S 18:30 0:00 [cpuhp/0]
root 21 0.0 0.0 0 0 ? S 18:30 0:00 [cpuhp/1]
root 22 0.0 0.0 0 0 ? S 18:30 0:00 [idle_inject/1]
root 23 0.1 0.0 0 0 ? S 18:30 0:00 [migration/1]
root 24 0.0 0.0 0 0 ? S 18:30 0:00 [ksoftirqd/1]
root 25 0.0 0.0 0 0 ? I 18:30 0:00 [kworker/1:0-cgwb_release]
root 26 0.0 0.0 0 0 ? I< 18:30 0:00 [kworker/1:0H-events_highpri]
root 27 0.0 0.0 0 0 ? S 18:30 0:00 [cpuhp/2]
root 28 0.0 0.0 0 0 ? S 18:30 0:00 [idle_inject/2]
root 29 0.1 0.0 0 0 ? S 18:30 0:00 [migration/2]
root 30 0.0 0.0 0 0 ? S 18:30 0:00 [ksoftirqd/2]
root 31 0.0 0.0 0 0 ? I 18:30 0:00 [kworker/2:0-events]
root 32 0.0 0.0 0 0 ? I< 18:30 0:00 [kworker/2:0H-events_highpri]
root 33 0.0 0.0 0 0 ? S 18:30 0:00 [cpuhp/3]
root 34 0.0 0.0 0 0 ? S 18:30 0:00 [idle_inject/3]
root 35 0.1 0.0 0 0 ? S 18:30 0:00 [migration/3]
root 36 0.0 0.0 0 0 ? S 18:30 0:00 [ksoftirqd/3]
root 37 0.0 0.0 0 0 ? I 18:30 ...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The most CPU is used by:

  /usr/libexec/epiphany-search-provider

so try closing Epiphany.

The second-most CPU is used by:

  /usr/bin/gnome-shell

so try disabling the thing that is keeping gnome-shell redrawing all the time:

  gnome-extensions disable '<email address hidden>'

affects: gnome-shell (Ubuntu) → ubuntu
Revision history for this message
pinus (pinus) wrote :

Sorry I wanted to send you the apport from my tuser account but failed due to email-verification and stuff which annoyed me enough to give up.

With a new user tuser, just created for this purpose I can reproduce the issue. I reboot, login screen, ~80W, login tusr ~130W. I removed this Welcome Ubuntu thingy.

And yes first I suspected plugins and stuff, disabled them. But even with a fresh, newly created user it happens.

It doesn't seem to be the load, it seems to be the frequency. Using cpu util of the kernel I can hinder the cpu to boost setting it to powersave. The power draw is significantly lower. Something seems to run very frequent keeping cpu from going to sleep.

Currently typing this message in Firefox and having a console with htop running. The cores should be mostly at 2200MHz. But the aren't. Htops top scorers are htop 3-5%, gnome-shell 1-2% and /usr/bin/vxc-init 1-2%.

Without htop running:

cat /proc/cpuinfo | grep MHz
cpu MHz : 3659.957
cpu MHz : 3651.652
cpu MHz : 4574.981
cpu MHz : 3668.731
cpu MHz : 3748.627
cpu MHz : 3659.617
cpu MHz : 3651.320
cpu MHz : 2200.000
cpu MHz : 3657.285
cpu MHz : 4554.655
cpu MHz : 2200.000
cpu MHz : 4160.337
cpu MHz : 3700.000
cpu MHz : 4587.006
cpu MHz : 3700.000
cpu MHz : 3700.000
cpu MHz : 2200.000
cpu MHz : 3710.992
cpu MHz : 3632.179
cpu MHz : 3644.581
cpu MHz : 3629.941
cpu MHz : 3620.373
cpu MHz : 3606.826
cpu MHz : 4411.667

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please repeat:

  ps -eo pid,pcpu,comm --sort -pcpu | head

several times to confirm which processes are the busiest.

summary: - High power consumption of gnome-shell
+ High power consumption
Revision history for this message
pinus (pinus) wrote :

ps -eo pid,pcpu,comm --sort -pcpu | head
    PID %CPU COMMAND
 104935 0.4 tracker-miner-f
   2973 0.4 vxc-init
 104208 0.3 gnome-shell
3496806 0.1 gjs
 103722 0.0 Xorg
3492956 0.0 kworker/u66:0-kcryptd/252:0
 104696 0.0 SealOne
3493063 0.0 kworker/u66:4-kcryptd/252:0
3493661 0.0 kworker/u66:9-kcryptd/252:0

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

> Something seems to run very frequent keeping cpu from going to sleep.

You can use 'powertop' to see what is waking up the CPU most frequently:

  sudo apt install powertop
  sudo powertop

Revision history for this message
pinus (pinus) wrote :

ps -eo pid,pcpu,comm --sort -pcpu | head
    PID %CPU COMMAND
 104935 0.4 tracker-miner-f
   2973 0.4 vxc-init
 104208 0.3 gnome-shell
3496806 0.1 gjs
 103722 0.0 Xorg
3492956 0.0 kworker/u66:0-kcryptd/252:0
 104696 0.0 SealOne
3493063 0.0 kworker/u66:4-kcryptd/252:0
3493661 0.0 kworker/u66:9-kcryptd/252:0

Revision history for this message
pinus (pinus) wrote :

Please close the ticket. After a 2 weeks off and upgrading to latest version the problem disappeared. Not sure what changed but it is solved now.

Changed in ubuntu:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.