Replies: 12 comments 11 replies
-
So if you start the LG bar during startup without the volume module, the bar starts correctly but with the volume module it doesn't start at all? Is that the log file for when the LG bar starts automatically as part of the i3 startup? If so, there is something fishy going on there, there should be at least a line mentioning the powermenu module (or a crash message) polybar -l trace -r LG 2>&1 | tee -a /tmp/polybar-LG.log & disown |
Beta Was this translation helpful? Give feedback.
-
I was starting to think it started but did not render, but:
/tmp/polybar-LG.log
I minimized apps & applets that autostart so not sure about what is writing to ~/.xsession-errors but here it is in case it's helpful:
~/.config/polybar/launch-polybar:
Edit to add xrandr -q:
|
Beta Was this translation helpful? Give feedback.
-
As best as I can tell, polybar is getting stuck while initializing the pulseaudio module. I don't know why though. Can you also post the log output of the LG bar when it correctly starts when you manually run the launch script. Do you do any kind of pulseaudio configuration in your i3 autostart file? |
Beta Was this translation helpful? Give feedback.
-
I have tried with & without in i3/config (before launching polybar):
/tmp/polybar-LG.log after relaunching polybar (via i3 restart):
|
Beta Was this translation helpful? Give feedback.
-
Looking at the Discussion #2699 we both have the same issue. I am using BSPWM, so this is not specific to i3. My pulseaudio is launched separately as a service independent of BSPWM so not sure how that ties into polybar getting stuck. The issue is probably somewhere within the pulseuadio loop. Printing
However later it becomes
I wonder if the D status right before launch has something to do with it and causes a race condition bug or something. Edit |
Beta Was this translation helpful? Give feedback.
-
I'm seeing the same/similar. It seems pulse takes a long time to start for some reason. ╰─❯ cat ~/.config/polybar/launch-polybar ─╯ #!/bin/bash
# Terminate already running bar instances
killall -q polybar
# Launch Polybar, using default config location ~/.config/polybar/config
echo "---" | tee -a /tmp/polybar-LG.log /tmp/polybar-Gateway.log
/usr/bin/pactl info 2>&1 | tee -a /tmp/polybar-LG.log & disown
polybar -l trace -r LG 2>&1 | tee -a /tmp/polybar-LG.log & disown
polybar -r Gateway 2>&1 | tee -a /tmp/polybar-Gateway.log & disown
echo "Bars launched..." ╰─❯ cat /tmp/polybar-LG.log ─╯
╰─❯ cat ~/.xsession-errors ─╯
|
Beta Was this translation helpful? Give feedback.
-
If I only start the LG bar it will work. 😕 |
Beta Was this translation helpful? Give feedback.
-
After much trial & error I have it working. Not sure why but trying to start both bars in one script just wouldn't work for me. So now I have a script to launch each bar and I explicitly start the bar with the volume module first, making the bar w/o volume module wait for the other to start. So my i3 config for starting polybar looks something like this:
This is less than ideal, but I'm tired of rebooting for the moment. It seems like the bar with the volume module will wait for pulseaudio, but the bar w/o the volume module will start and that somehow fubars the bar w/ volume module. At least that's my impression at the moment, some kind of race condition. |
Beta Was this translation helpful? Give feedback.
-
@sitedyno Thanks I adapted the script to check if pulse is ready pstat=$(pgrep -u $UID -x pulseaudio | xargs --no-run-if-empty ps -o stat --no-headers fp)
while [ ${pstat:0:1} = "D" ]
do
sleep .3;
done
polybar -r LG 2>&1 | tee -a /tmp/polybar-LG.log & disown Waiting for pulse to be ready and then starting polybar works. |
Beta Was this translation helpful? Give feedback.
-
This definitely looks like a timing issue. However, the results you are getting are a bit puzzling. The expected behavior would either be, the module failing to start with an error because it can't connect to pulse or polybar waiting until pulse has started. It obviously shouldn't be getting stuck. @vikigenius and @sitedyno: Could you describe what your startup procedure looks like? Are you using a display manager to login? With or without password? Does/Did this happen consistently or only sometimes? I am unfortunately still unable to reproduce this even if I manually completely stop pulse and start it while polybar is starting up. Some observations that I made: In your first comment (#2697 (comment)) @sitedyno, your LG bar isn't running at all and the log cuts off after either @vikigenius Can you confirm whether the bar process is actually running after it seems stuck in the logs? If anyone is still motivated in helping me debug this, let me know and I can provide a patch that will produce more debug information that should help me debug this further. |
Beta Was this translation helpful? Give feedback.
-
So @patrick96 for the startup procedure, I use lightdm as my login manager. I enter the password and if successful It starts BSPWM using the XSession script. My As for the process itself, even with the logs showing polybar as stuck, a simple I would be willing to try it out and help debug this issue. Even though a workaround exists, it's bit annoying. |
Beta Was this translation helpful? Give feedback.
-
@patrick96 here is the log with the patch applied for when polybar gets stuck
It doesn't progress any further looks like it's stuck at polybar/src/adapters/pulseaudio.cpp Line 81 in 6a2d7b5 The line number is slightly different because of the patch but I checked locally that this was the line where it no longer progresses further. I confirmed that the process is still running.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
If I boot w/o volume module, polybar starts OK. The problem is only w/ the LG bar. Restarting polybar via launch-polybar works to start the LG bar.
~/.config/polybar/config.ini
polybar -vvv:
log for the LG bar:
~/.config/polybar/lauch-polybar
Beta Was this translation helpful? Give feedback.
All reactions