Waybar
Waybar copied to clipboard
MPD module freezes after suspend
When I leave my laptop suspended, on wake I find that waybar mpd module is unresponsive. I can control MPD server with clients, but mpd info at waybar is not updated, it stays the same as it was before suspend. Other waybar modules continue to work normally. One thing I've noticed is that suspend must last for certain amount of time to freeze the mpd module (e.g., suspending for several minutes does not cause the issue, but suspending for the night always does). It probably might matter that the module is configured to connect to a remote mpd server (always online). I can't say if the issue happened should I have mpd server at the localhost. If the problem is in losing the connectino when suspended, is there a way to commuinicate with mpd module, so that I could automatically launch a command on wake to tell it to reconnect? (currently, to solve the issue I have a script that runs on wake, kills the waybar and starts it again).
OS: Arch Linux waybar version: 0.9.7
This seems like a related bug: after waking my PC from suspend for a while, the MPD module fails to update despite the rest of waybar updating properly. Clicking the MPD module, however, does crash.
[2022-09-12 09:32:25.595] [debug] network: if3 down
// (A day at work with the PC suspended...)
[2022-09-12 18:04:41.744] [debug] network: new default route via 192.168.1.254 on if2 metric 20100
[2022-09-12 18:04:41.745] [debug] network: enp2s0, new addr 192.168.1.65/24
[2022-09-12 18:04:41.745] [debug] network: new default route via 192.168.1.254 on if2 metric 20100
[2022-09-12 18:04:41.745] [debug] network: enp2s0, new addr 192.168.1.65/24
[2022-09-12 18:04:42.576] [debug] network: new default route via 192.168.1.254 on if2 metric 100
[2022-09-12 18:04:42.576] [debug] network: new default route via 192.168.1.254 on if2 metric 100
[2022-09-12 18:04:42.576] [debug] network: enp2s0, new addr 192.168.1.65/24
[2022-09-12 18:04:42.577] [debug] network: enp2s0, new addr 192.168.1.65/24
[2022-09-12 18:12:01.403] [error] mpd: Idle: failed to unregister for IDLE events
** (waybar:105955): ERROR **: 18:12:01.437:
unhandled exception (type std::exception) in signal handler:
what: Connection reset by peer
zsh: trace trap (core dumped) waybar -l trace
I have a coredump, but I only see GLib functions in the backtrace. Lmk if you'd like more information.
A different result today (I didn't have -l trace this time around):
[2022-09-13 18:34:52.503] [warning] mpd: Playing: error: Connection reset by peer
[2022-09-13 18:34:52.517] [warning] mpd: Playing: error: Connection reset by peer
waybar: ../libmpdclient-2.20/src/status.c:390: mpd_status_get_song_pos: Assertion `status != NULL' failed.
zsh: IOT instruction (core dumped) waybar
I'm still experiencing this issue, although there's no crashes anymore when clicking the module: it works as expected but the text does not change.