You are not logged in.

#1 2022-01-06 10:07:25

duyinthee
Member
Registered: 2015-06-14
Posts: 242
Website

volumeicon is killed immediately at start up if pipewire is used

I use Arch + windows manager, DWM and Awesome.
I switched to PipeWire from PulseAudio. Everything fines.
But volumeicon is immediately killed after showing up in systray at startup of Window Manager. It's ok if I start volumeicon in terminal after start-up completion.
I also tested with 4-5 second waiting in autostart.sh to start volumeicon. It doesn't work. The volumeicon is still killed immediately after showing up in systray at startup of WM.
Is there anyone with same issue. Thanks in advance.

Last edited by duyinthee (2022-01-06 10:09:43)

Offline

#2 2022-01-06 11:26:59

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: volumeicon is killed immediately at start up if pipewire is used

Please share the full content of autostart.sh and also explain how exactly you are starting the graphical session.

Have you tried logging the X session to see if volumeicon gives any error messages? Also check the journal & X.Org log.


Jin, Jîyan, Azadî

Offline

#3 2022-01-07 04:52:46

duyinthee
Member
Registered: 2015-06-14
Posts: 242
Website

Re: volumeicon is killed immediately at start up if pipewire is used

I use LightDM to start my window manager.
In DWM, I use autostart patch and in Awesome, I use its autostart way like

awful.spawn.with_shell("~/.config/awesome/autostart.sh")

In autostart.sh is like below;

#!/usr/bin/env bash
function run {
		if ! pgrep -f $1; then
				$@ &
		fi
}

run ~/.dwm/dwm-status-trigger
run ~/.dwm/enabling-tapping-click
run /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
run setxkbmap -layout us,mm -option "altwin:menu_win,grp:alt_space_toggle"
run feh --bg-fill ~/.dwm/wp/archlinux-wallpaper-3.png
run picom
sleep 1s
run /usr/lib/xfce4/notifyd/xfce4-notifyd
run xbindkeys
run flameshot
run xss-lock slock
run clipmenud
run sbxkb
run blueman-applet
run volumeicon

No clue in

$ journalctl -r

Last edited by duyinthee (2022-01-07 04:55:57)

Offline

#4 2022-01-07 07:56:51

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: volumeicon is killed immediately at start up if pipewire is used

Have you tried to redirect stdin (and maybe stdout) of volumeicon to /dev/null? I remember I had some issues with calibre a few years ago that did not like the pipes it was getting from my i3 startup. Also try to nohup or disown it, possibly the bash script exiting kills it.

Last edited by progandy (2022-01-07 08:03:39)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#5 2022-01-07 10:27:03

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: volumeicon is killed immediately at start up if pipewire is used

If progandy's suggestion doesn't help:

To eliminate as many variables as possible try removing autostart.sh and add the list of commands to ~/.xprofile instead. That file is run by LightDM upon login. Perhaps also try disabling LightDM and test with a console login & 'startx' with ~/.xinitrc instead.

For the volumeicon line use this:

volumeicon > ~/vicon.log 2>&1 &

Then check ~/vicon.log when it fails to start.

Note that you should only fork() commands if needed. Unnecessary use of '&' can lead to race conditions and weird problems so you should probably remove that from the run function and only add it to the lines that need it. To find out which lines run the command in a terminal — if the prompt is returned then the ampersand is not needed. I know that both setxkbmap & feh definitely don't need to be backgrounded. And do you actually need the run function at all? Do you experience multiple instances of the various processes if it's not used?


Jin, Jîyan, Azadî

Offline

#6 2022-01-08 06:06:59

duyinthee
Member
Registered: 2015-06-14
Posts: 242
Website

Re: volumeicon is killed immediately at start up if pipewire is used

The ~/vicon.log and running volumeicon in terminal say

snd_mixer_handle_events: No such file or directory

And alsamixer say something like "this sound card does not have any controller"
(sorry I will edit it) If i do

$ systemctl --user restart pipewire pipewire-pulse

it also doesn't work.
However, if I start play any media like playing song in mplayer or open YouTube in browser, everything become alive and work.
After that, I can start volumeicon and it will show up in systray.
That's in window managers, dwm and awesome.

And I test in xfce4. It works everything fine right after start up. I don't need anything to do extra.

Last edited by duyinthee (2022-01-08 06:17:57)

Offline

#7 2022-01-08 08:29:07

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: volumeicon is killed immediately at start up if pipewire is used

Interesting. the alsa shim of pipewire might not have the mixer set up until some sound was played. No idea if that is considered a bug or not, you could try reporting it.
Or maybe it works only after something has connected to the pulse socket.
xfce might start something that tries to play a sound or connects to the socket. Maybe try the same (paplay ... or pactl get-default-sink)

By the way, this should be am alternative, it works fine for me: https://aur.archlinux.org/packages/pa-applet-git/

Last edited by progandy (2022-01-08 08:32:05)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#8 2022-01-09 11:13:57

duyinthee
Member
Registered: 2015-06-14
Posts: 242
Website

Re: volumeicon is killed immediately at start up if pipewire is used

At last, I ended up using my childish script in autostart.sh to start volumeicon as below;

#!/usr/bin/env bash
sleep 3s
pactl set-sink-mute @DEFAULT_SINK@ 0
pactl set-sink-volume @DEFAULT_SINK@ 60%
sleep 5s
mplayer ~/.mshdir/notisounds/selected-1.mp3
volumeicon &

Now, the volumeicon appears at systray on startup.

Last edited by duyinthee (2022-01-09 11:16:09)

Offline

Board footer

Powered by FluxBB