Closed JimPix1 closed 2 years ago
pamixer is a dependency for this script. You'll get errors there if you don't have it or if there's something wrong with your Pulse/Pipewire system.
I have pamixer installed and I'm using pipewire. This has been working for months but a few hours ago this has began happening and I'm unsure as to why..
Okay. What happens if you run commands like:
pamixer --get-volume
or
pamixer --get-mute
Actually, I guess you say works after the first run, so it's probably a pipewire issue.
Assuming you haven't changed anything recently, how does your system start pipewire?
Actually, I guess you say works after the first run, so it's probably a pipewire issue.
Yeah, it will display the output normally only after the first time.
Assuming you haven't changed anything recently, how does your system start pipewire?
Prior to when this started I hadn't touched my pipewire configuration nor had their been any update today to have caused something to go wrong. Pipewire is started the normal way with systemd afaik
I used timeshift a few times and after a lot of testing I believe the issue was with me replacing the power manager I've been using for dwm (xfce4-power-manager) with lxqt-powermanagement and xautolock. I'm not sure why or how this would make pipewire get messed up, it's odd.
Alright I did more testing, xautolock
is not the issue. it's lxqt-powermanagement
I suspect it may be one of the dependencies it installs that may be the problem.
Update:
I now believe this happens due to Pipewire race conditioning/pipewire not starting quickly enough.
I recently removed the update checking script for a few reasons, one being it took a few seconds longer to load my dwmblocks when it was in use. When removing it however I got the same sb-volume error. To solve this I've added a blank module in my dwmblocks config.h that simply executes sleep 6
, This will mean dwmblocks will take 6 seconds to load, giving pipewire-pulse sufficient time to load. (Note: Below 6 seconds still gives the error)
@LukeSmithxyz If it's not too much trouble for you, could you try disabling sb-pacpackages
in your dwmblocks config and then reboot and see if you get the sb-volume errors in your ~/.xsession-errors
? (Or the module being displayed as muted when it shouldn't be)
Alright I'll close this now
The only solution is that there is none. My HDD isn't fast enough to start pipewire-pulse before dwmblocks (to be fair dwmblocks loads pretty much instantly) so sleep 6
is the only way to get it to work.
Why not move the initialization of pipewire earlier in boot? If you log in via tty, putting it to start in the ~/.zprofile or another profile file will have it start a bit before.
You can also use systemd/runit to start it up on boot, which would definitely fix the issue.
You can also use systemd/runit to start it up on boot, which would definitely fix the issue.
I didn't think about doing that. That's a good idea. If I started it via systemd would it cause a conflict when it tries to start it after login or would it not happen after login anymore?
Definitely remove all other lines attempting to start it if using systemd.
Thanks! I'll have to look into where it's even started from and how to get it to start via SystemD. Maybe I just need to make a service file for pipewire-pulse
I'm not actually sure where pipewire-pulse
specifically gets started.. does anyone know where?
If you're using these files, it's in ~/.config/x11/xprofile, although if you have had them installed for a while, I think I had it started elsewhere. Just remove pipewire there.
pirewire-pulse is started by pipewire.
I'm using a lot of your stuff but sadly not LARBS so it's not in ~/.config/x11/xprofile
I did more research and it's actually started by systemd by a service file in ~/.config/systemd but this would only start after login so doing systemctl --user --now enable pipewire pipewire-pulse
pipewire and pipewire-pulse is now started on boot and I no longer have the problem
Thanks for your help!
Weirdly I get a smaller error in ~/.xsession-errors about the sink not existing but the volume is still displayed correctly so I'll just ignore it.
I would like to ask you though what do you use for power management? I've been using xfce4-power-manager
but I'm not able to change the locker it uses so I'd like an alternative.
I know you can use init services and xautolock to do a lot of the stuff but but I'm not sure how to do more complex things like locking the screen if the laptop lid is closed when charging but then suspending and locking when the lid is closed but it's on battery
sb-volume doesn't display properly in dwmblocks and when I check ~/.xsession-errors I see this
Somehow the sink doesn't exist? When I try using sb-volume again it works but now whenever I turn on my laptop and open dwm the volume is not displayed properly (it's always muted even when it isnt) and I need to press one of my volume keys to change it. How do I fix this?