marioortizmanero / polybar-pulseaudio-control

A feature-full Polybar module to control PulseAudio
MIT License
482 stars 50 forks source link

High idle CPU usage from Pipewire process #84

Open decaby7e opened 1 year ago

decaby7e commented 1 year ago

Been confused as to why pipewire has been idling at around 30% CPU usage for a while and I finally figured out it was being caused by pulseaudio-control when I was making changes to my config.

Here's my config:

[module/pulseaudio-control]
type = custom/script
tail = true
format-underline = ${colors.cyan}
label-foreground = ${colors.foreground}

exec = pulseaudio-control --format '$ICON_NODE $NODE_NICKNAME' --node-blacklist "*.monitor" --node-nickname 'alsa_output.pci-0000_0b*.analog-stereo:Desk' --node-nickname 'alsa_output.pci-0000_09*.hdmi-stereo-extra3:TV' output

click-left = pulseaudio-control next-node
click-right = exec pavucontrol &

And am running the latest version of pulseaudio-control:

pacman -Q pulseaudio-control          
pulseaudio-control 3.1.1-1

I noticed when when pulseaudio-control is enabled in Polybar, running pactl subscribe returns a ton of these messages:

...
Event 'remove' on client #75672
Event 'remove' on client #75671
Event 'new' on client #75673
Event 'new' on client #75674
Event 'remove' on client #75673
Event 'remove' on client #75674
Event 'new' on client #75675
Event 'new' on client #75676
Event 'remove' on client #75675
Event 'remove' on client #75676
Event 'new' on client #75677
Event 'new' on client #75678
Event 'remove' on client #75677
Event 'remove' on client #75678
Event 'new' on client #75679
Event 'new' on client #75680
Event 'remove' on client #75679
Event 'remove' on client #75680
Event 'new' on client #75681
Event 'new' on client #75682
Event 'remove' on client #75681
Event 'remove' on client #75682
Event 'new' on client #75683
Event 'new' on client #75684
Event 'remove' on client #75683
Event 'remove' on client #75684
Event 'new' on client #75685
Event 'new' on client #75686
Event 'remove' on client #75685
Event 'remove' on client #75686
Event 'new' on client #75687
Event 'remove' on client #75687
Event 'new' on client #75688
Event 'remove' on client #75688
Event 'new' on client #75689
Event 'remove' on client #75689
Event 'new' on client #75690
Event 'remove' on client #75690
Event 'new' on client #75691
Event 'remove' on client #75691
Event 'new' on client #75692
Event 'remove' on client #75692
Event 'remove' on client #72539
Event 'remove' on client #72538
Event 'new' on client #75693
Event 'new' on client #75694
...

And that's with no desktop applications at all running on the machine.

I think this may be related to #68 but I don't know how to verify that.

Any help would be appreciated! This module is an incredibly useful addition to Polybar.

CarlosGT7274 commented 11 months ago

you could fixed it?

decaby7e commented 11 months ago

Unfortunately not! I forgot about this and have had the feature disabled since I posted this.

@CarlosGT7274 are you facing the same issue?

tariqc80 commented 8 months ago

I have a similar issue with high process usages by polybar itself from the pulseaudio-control plugin. Although for me it happens randomly I get "Pulseaudio not started" error from the listen command. I created #86 for my issue because I think it's different