i3status-rust icon indicating copy to clipboard operation
i3status-rust copied to clipboard

When using pipewire, the sound module causes delays in status bar loading

Open invader-zimm opened this issue 3 years ago • 6 comments

I'm on Artix Linux, using pipewire instead of pulseaudio. If I add a sound block to the status bar and I start i3wm, 9 times out of 10, i3status_rust takes about 3-4 seconds to load/display. The block seems to function as expected, the only issue I see is the noticeable delay in loading the status bar. If I remove the sound block, the status bar loads almost instantaneously. Before switching to pipewire, loading was also very fast.

I have installed these packages pipewire pipewire-alsa pipewire-pulse and in .xinitrc I have

/usr/bin/pipewire&
/usr/bin/pipewire-pulse&
/usr/bin/wireplumber&
exec i3

The block setup in config.toml is pretty basic:

[[block]]
block = "sound"
driver = "pulseaudio"
on_click = "pavucontrol"
headphones_indicator = true

Can anyone else reproduce this issue? Any idea what exactly causes that delay? Thanks.

invader-zimm avatar Jun 20 '22 22:06 invader-zimm

Which version do you use? (i3status-rs -V)

MaxVerevkin avatar Jun 21 '22 06:06 MaxVerevkin

If you comment out those lines in xinitrc (other than i3), and instead start them up each in a separate terminal without backgrounding them, can you still reproduce the issue? (I guess you will have to kill i3bar bar first) If so then there might be some interesting info in the terminal running pipewire-pulse

ammgws avatar Jun 21 '22 07:06 ammgws

I am using i3status-rs 0.22.0.

If I do this:

  1. edit .xinitrc to contain only "exec i3"
  2. start i3 and kill i3bar
  3. from separate terminals, start pipewire, pipewire-pulse and wireplumber
  4. start i3bar

then I don't really see the delay, or at least it's not noticeable. I don't see any errors regarding pipewire in the terminals, everything seems to initialize and start without problems.

invader-zimm avatar Jun 21 '22 15:06 invader-zimm

Hmm not sure what else to try then. My initial thought was that pipewirse-pulse was only loading for the first time after i3status-rs initiated the pulseaudio connection, but if that were the case it should be reproducable.

Do you get the same delay with the sound block (bar itself should load instantly) with git master?

ammgws avatar Jun 22 '22 14:06 ammgws

Using i3status-rs from git requires compilation, right? I don't know how to compile rust from source, I'm looking into that. The build I'm using comes from the Arch repos.

But I can say with certainty that it's the sound block causing the delay. It doesn't happen all the time, maybe 8-9 times out of 10 and it takes between 1 and 4-ish seconds ¯_(o_o)_/¯

invader-zimm avatar Jun 23 '22 20:06 invader-zimm

Using i3status-rs from git requires compilation, right?

Yes it does, but with rust it's not that hard :) check out https://rustup.rs/ to install the toolchain and then run cargo build in the repo :)

GladOSkar avatar Jun 26 '22 20:06 GladOSkar

I'm pretty sure this is fixed on master.

MaxVerevkin avatar Dec 23 '22 21:12 MaxVerevkin