Skip to content

"Pluseaudio not started" error produces high CPU load for polybar #86

@tariqc80

Description

@tariqc80

Occasionally upon system startup pulseaudio-control returns "Pulseaudio not started" in polybar. If I run the commands manually from the terminal I do get the expected volume percentages. I have to restart polybar one or two times to get this to resolve.

When this occurs, my system CPU increases to 30%+ and top reports polybar's CPU utilization is something like 7-8% instead of it's normal 0.6-0.7%. Once I restart polybar and correct the "Pulseaudio not started" error, CPU utilization returns to normal.

This only seems to happen intermittently when I start up my system or when I wake from sleep. My assumption is that there is some race condition.

Seems to be two things happening here though:

  1. pulseaudio-control listen is losing communication with pulseaudio, even though pulseaudio is running
  2. Polybar or pulseaudio is going haywire when it is in this state.

Let me know what other information I can provide to help to identify what the issue is.

This is my setup

[module/pulseaudio-control-input]
type = custom/script
tail = true
double-click-left = exec pavucontrol &
exec = pulseaudio-control --node-nicknames-from "device.description" --node-nickname "alsa_input.pci*: " --node-type input --icon-muted  --icons-volume "" --format '$VOL_ICON ${VOL_LEVEL}% $ICON_NODE $NODE_NICKNAME'  listen

[module/pulseaudio-control-output]
type = custom/script
tail = true
double-click-left = exec pavucontrol &
exec = pulseaudio-control --node-nicknames-from "device.description" --node-nickname "alsa_output.pci*:󰓃" --node-type output --icon-muted  --icons-volume " " --format '$VOL_ICON ${VOL_LEVEL}% $ICON_NODE $NODE_NICKNAME'  listen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions