Increased power usage in idle ... audio driver?

System : Dell XPS15 9530

I am running Manjaro stable with cinnamon, with powertop reporting ~7W in idle with screen at 50% the last time I checked “a few weeks ago”, but now its “suddenly” like 12W~13W.

htop showed 2 instances of pulseaudio which consume ~ 4.5% and 2.5% CPU , which I think might be too much and maybe the reason ?


    0[              0.0%]  3[              0.0%]  6[||            5.1%]  9[              0.0%]  10[|             0.6%] 13[||            6.4%] 16[|             3.8%] 19[|             0.6%]
    1[              0.0%]  4[              0.0%]  7[              0.0%]                         11[              0.0%] 14[||            2.5%] 17[||            1.3%]
    2[              0.0%]  5[              0.0%]  8[|||           9.0%]                         12[||            5.1%] 15[||            3.2%] 18[|             0.6%]
  Mem[|||||||||||||||||||                                                         5.33G/62.5G] Tasks: 121, 1027 thr, 268 kthr; 1 running
  Swp[                                                                                  0K/0K] Load average: 0.52 0.49 0.53
                                                                                               Uptime: 05:51:37

  [Main] [I/O]
    PID USER       PRI  NI  VIRT   RES   SHR S  CPU%▽MEM%   TIME+  Command
  37805 root        20   0 10568  8272  5232 R   3.8  0.0  0:03.69 htop
   1864 sum         -6   0 1812M 21372 16092 S   4.5  0.0 14:43.35 /usr/bin/pulseaudio --daemonize=no --log-target=journal
   1885 sum         20   0 5179M  173M 70984 S   0.6  0.3  4:32.98 cinnamon --replace
   9702 sum         20   0 12.4G  491M  201M S   1.3  0.8  7:16.10 /usr/lib/firefox/firefox
   1094 root        20   0 1027M 82096 37332 S   1.3  0.1  3:19.50 /usr/lib/Xorg :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
   1753 sum          9 -11 1812M 21372 16092 S   2.5  0.0  7:57.20 /usr/bin/pulseaudio --daemonize=no --log-target=journal

After my fresh install of Manjaro about ~1 year ago, I had some issues with audio not working but found a hint here that I need to add a special audio driver … and it worked great after I installed it … honestly can’t really remember what I did , but grabbed the info from this thread:

https://forum.manjaro.org/t/no-sound-on-dell-xps-15-9530/149316

I am now on kernel 6.9.3 and just read in the old thread that audio should now be handled “out of the box” (?) by kernel >= 6.9 … maybe a collision of drivers now ?

$ inxi -Aa
Audio:
  Device-1: Intel Raptor Lake-P/U/H cAVS vendor: Dell
    driver: sof-audio-pci-intel-tgl alternate: snd_hda_intel, snd_soc_avs,
    snd_sof_pci_intel_tgl bus-ID: 0000:00:1f.3 chip-ID: 8086:51ca
    class-ID: 0401
  API: ALSA v: k6.9.3-3-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.0.7 status: off tools: pw-cli
  Server-3: PulseAudio v: 17.0 status: active with: pulseaudio-alsa
    type: plugin tools: pacat,pactl,pavucontrol

$ sudo alsa-info.sh --upload

http://alsa-project.org/db/?f=ccf83d466ae23b474691240d9d847d73d673e2c2

Specifications for system show 8 watts total peak power for all 4 speakers

Dell XPS 15 Laptop : XPS Laptop Computers | Dell UK

  • Audio and Speakers
    Stereo woofer 2.5 W x 2 and stereo tweeter 1.5 W x 2 = 8 W total peak

Simplest way to establish if extra power consumption is due to PulseAudio or Speakers would be to turn off PulseAudio service

systemctl --user stop pulseaudio.socket pulseaudio.service

and play audio to headphones and speakers via ALSA
Playback to headphone jack should use less power than built-in speakers (about 1-2 watt)

Actually, and I may have mentioned that, the laptop consumes 12~13W instead of ~7W in idle, while NOT playing any audio.
I just saw pulseaudio in the process list with a (as I think) high CPU consumption while NOT playing any audio …

Anyway, I stopped pulseaudio as suggested and looks like that saved ~2W

Stupid, newbee question : What do I need pulseaudio for if I can (just ?) use ALSA ?

ALSA is the basic sound driver. It can play and record audio, but only one stream without a mixer by default.

PULSEAUDIO works on top of ALSA. Here you can listen to sound from multiple applications at once, not only one, but not only that, there are a lot of more modules to extent its functionalities. Downside is just: It consumes CPU Power…

Usually the audio device should suspend after time by default when not active. If not, then there must a digital connection like HDMI or DisplayPort which serves Audio. There it will power idle until you switch the audio profile. I mean this for example:

You could try this:
File: /etc/tlp.d/10-sound.conf

USB_AUTOSUSPEND=1
SOUND_POWER_SAVE_ON_AC=0
SOUND_POWER_SAVE_ON_BAT=1
SOUND_POWER_SAVE_CONTROLLER=Y
PCIE_ASPM_ON_AC=performence 
PCIE_ASPM_ON_BAT=powersupersave 

Then run: sudo tlp bat

ALSA is good for playing one audio stream direct to an audio device
PulseAudio was created to provide better support for mixing multiple audio streams, resampling, upmixing to surround sound and digital signal processing
ALSA plugins provide similar functions to PulseAudio but they do not have GUI controls
(e.g. ALSA can have a graphic equalizer with fixed settings, but there are no controls to adjust settings
and ALSA would need to be restarted to load new settings)

PulseAudio has module-suspend-on-idle that suspends sinks and sources after a predetermined amount of idle time. Defaullt exit-idle-time for PulseAudio is 20 seconds

That would be sufficient for me. I am not an audio engineer … Can I uninstall/disable PulseAudio ?

Try uninstalling manjaro-pulse first

Note that many program rely on pipewire/pulseaudio. ALSA is sometimes used as fallback/legacy sound server in older software, but not always. So keep that in mind.

Disable it permanently:

systemctl --user stop pulseaudio.service
systemctl --user disable pulseaudio.service
systemctl --user mask pulseaudio.service

Better would be solving your problem with pulseaudio or give pipewire a try, which is a drop-in replacement for pulseaudio or jack.

Anyhow… it is not clear what keeps pulseaudio active and prevents it from going into idle. It will probably be a program or a HDMI/DP connection.

Manjaro i3 does not include PulseAudio but it is required for other DEs and cannot be uninstalled

PulseAudio can be replaced by AUR package apulse - a pulse emulator for ALSA
Use ALSA with Applications requiring PulseAudio - Manjaro Wiki
But this may not work for some applications that require pulseaudio

PulseAudio can be disabled temporarily with command already suggested

systemctl --user stop pulseaudio.socket pulseaudio.service

Or disabled permanently

systemctl --user disable --now pulseaudio.socket pulseaudio.service

There is also also an Archwiki example for using PulseAudio in an extremely minimal form:
PulseAudio as a minimal unintrusive dumb pipe to ALSA - ArchWiki

I use a minimal configuration for PulseAudio (1 static sink and source) and htop reports 1-2% CPU usage

Latest version of PulseAudio 17.0 was released in Jan 2024 so a recent increase in power usage is more likely to be from other packages using PulseAudio