Failed to find mixer #148

Open
opened 4 months ago by flipflop133 · 16 comments

When I start yambar with sway I get this in the error log:

err: modules/alsa.c:247: failed to find mixer
err: modules/alsa.c:247: failed to find mixer

Even if I delay its startup by few seconds.
But when I start yambar manually it works fine.
Is there any workaround? I fear this is related to #59.
EDIT: even a 30 seconds sleep doesn't help, while if I start yambar manually from terminal as soon as sway is up it works fine (so in less than 30 seconds).

When I start yambar with sway I get this in the error log: ``` err: modules/alsa.c:247: failed to find mixer err: modules/alsa.c:247: failed to find mixer ``` Even if I delay its startup by few seconds. But when I start yambar manually it works fine. Is there any workaround? I fear this is related to #59. EDIT: even a 30 seconds sleep doesn't help, while if I start yambar manually from terminal as soon as sway is up it works fine (so in less than 30 seconds).
Owner

If it doesn't work even after delaying startup by a couple of seconds, then it must be something else.

Also, that error message happens after we've successfully connected to the audio device, further suggesting there's something else happening here.

How long did you try delaying startup? Did you try something really long (10s), just to rule out, with certainty, that pipewire isn't taking a long time to initialize?

If it doesn't work even after delaying startup by a couple of seconds, then it must be something else. Also, that error message happens **after** we've successfully connected to the audio device, further suggesting there's something else happening here. How _long_ did you try delaying startup? Did you try something really long (10s), just to rule out, with certainty, that pipewire isn't taking a long time to initialize?
Poster

I tried 30 seconds (see my edit).

I tried 30 seconds (see my edit).
Owner

That suggests there's something in the environment...

Does it still work if you start yambar after starting Sway, but with swaymsg exec yambar?

That suggests there's something in the environment... Does it still work if you start yambar after starting Sway, but with `swaymsg exec yambar`?
Poster

If I do it like that in my .zprofile:

# Start sway in tty1
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
	exec sway 1>/dev/null 2>/dev/null; sleep 5 && swaymsg exec yambar
fi

I get the following error:
swaymsg: failed to find socket

So how do you suggest me to start it after starting sway?

If I do it like that in my .zprofile: ``` # Start sway in tty1 if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then exec sway 1>/dev/null 2>/dev/null; sleep 5 && swaymsg exec yambar fi ``` I get the following error: `swaymsg: failed to find socket` So how do you suggest me to start it after starting sway?
Owner

From a terminal in sway

From a terminal in sway
Poster

It's really weird after a reboot it works only after killing yambar and restarting yambar, it's like if yambar was starting a service like alsa.

It's really weird after a reboot it works only after killing yambar and restarting yambar, it's like if yambar was starting a service like alsa.
Owner

Sounds like pipewire is preventing multiple processes to connect to the simulated alsa device...

Sounds like pipewire is preventing multiple processes to connect to the simulated alsa device...

I'm getting the same error recently. In my case, the error is still there even if I start yambar manually in Sway.

I'm getting the same error recently. In my case, the error is still there even if I start yambar manually in Sway.
Poster

@dnkl why not use pulseaudio like waybar does?

@dnkl why not use pulseaudio like waybar does?
Owner

Because I don't use pulseaudio.

But, someone else has started working on a pulseaudio module for yambar: #102

Because I don't use pulseaudio. But, someone else has started working on a pulseaudio module for yambar: https://codeberg.org/dnkl/yambar/pulls/102
Owner

I'm getting the same error recently.

If it started happening recently, then it sounds like pipewire has changed something (since yambar hasn't been updated in a while)?

Does tools like alsamixer work? Do the mixer device(s) they show match what you've configured in yambar?

> I'm getting the same error recently. If it started happening recently, then it sounds like pipewire has changed something (since yambar hasn't been updated in a while)? Does tools like `alsamixer` work? Do the mixer device(s) they show match what you've configured in yambar?
Poster

Yeah for me it does.

Yeah for me it does.
Owner

I'm testing pipewire, and I'm seeing the same (I assume) issue.

I'm testing pipewire, and I'm seeing the same (I assume) issue.
Owner

Or well, for me, it's just the first automated startup, and probably happens because pipewire isn't up yet. Yambar has logic to deal with this, but it's obviously not working.

If I restart yambar everything works.

Or well, for me, it's just the first automated startup, and probably happens because pipewire isn't up yet. Yambar has logic to deal with this, but it's obviously not working. If I restart yambar everything works.
Owner

In my case, the issue appears to be that wireplumber isn't completely up yet, despite my yambar service having a dependency on pipewire+wireplumber.

A spin-loop that keeps trying "fixes" this. Not the correct solution obviously, but perhaps a timer, and then we keep retrying a couple of times before giving up for real.

Too bad pipewire and wireplumber are such crappy daemons... there doesn't appear to be a way to have them tell us when they're up and ready. Which means the service manager will launch yambar as soon as it exec:d pipewire+wireplumber, even though they aren't actually ready yet :/

In my case, the issue appears to be that `wireplumber` isn't completely up yet, despite my yambar service having a dependency on pipewire+wireplumber. A spin-loop that keeps trying "fixes" this. Not the correct solution obviously, but perhaps a timer, and then we keep retrying a couple of times before giving up for real. Too bad pipewire and wireplumber are such crappy daemons... there doesn't appear to be a way to have them tell us when they're up and ready. Which means the service manager will launch yambar as soon as it exec:d pipewire+wireplumber, even though they aren't actually ready yet :/

I've had the exact same issue in my notebook, and the solution was to start yambar, wait a second, kill it, and start it again. Looks absolutely horrible, but it works.

A spin-loop that keeps trying "fixes" this. Not the correct solution obviously, but perhaps a timer, and then we keep retrying a couple of times before giving up for real.

Personally, this sounds alright to me, as a temporary "fix". Additionally, we should probably open an issue in the pipewire gitlab for them to add a way for us to know when the services are actually ready.

I've had the exact same issue in my notebook, and the solution was to start yambar, wait a second, kill it, and start it again. Looks absolutely horrible, but it works. > A spin-loop that keeps trying "fixes" this. Not the correct solution obviously, but perhaps a timer, and then we keep retrying a couple of times before giving up for real. Personally, this sounds alright to me, as a temporary "fix". Additionally, we should probably open an issue in the pipewire gitlab for them to add a way for us to know when the services are actually ready.
Sign in to join this conversation.
No Milestone
No Assignees
4 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.