The officially official Devuan Forum!

You are not logged in.

#1 Yesterday 17:31:52

Big_Hat
Member
Registered: Yesterday
Posts: 2  

New Devuan user, strugging to get the sound working

Hello, I've recently installed Devuan, after a year with Linux Mint, looking to get away from systemd/age verification etc. 

Installing and setting-up Devuan (with sysvinit and the Cinnamon DE) has has gone pretty well so far, except that the sound has only ever worked once - and didn't work the next time I rebooted :-( 

First I tried the instructions in the Release Notes to get Pipewire working, which didn't help unfortunately.  I didn't have a ~/.xsessionrc file, so pasted the three lines indicated into a blank new file - but noticed that the ~/.profile file when open in Geany had the if/then/fine/continue/fi etc in bold, whereas the .xsessionrc file didn't - so I'm not sure if there was a problem with the file.  Neither file was set to be executable. 

I then thought I'd use pulseaudio and pavucontrol, as I do on Mint, so installed that - but couldn't get it to work either. 

Then I removed pulseaudio/pavu, and followed the instructions to set up pipewire in this forum post https://dev1galaxy.org/viewtopic.php?pid=56220#p56220 but with no success. 

Now I'm at my wits' end, and would be very grateful if someone could help me get a working sound configuration, please?

Offline

#2 Yesterday 18:30:01

rolfie
Member
Registered: 2017-11-25
Posts: 1,446  

Re: New Devuan user, strugging to get the sound working

Welcome to dev1galaxy.

What worked for me on my Excalibur with Cinnamon on sysvinit, basically the same setup you have:

apt install pipewire-audio

Edit the users .xsessionrc and add:

# kill any existing pipewire instance to restore sound 
pkill -u "$USER" -fx /usr/bin/pipewire-pulse 1>/dev/null 2>&1 
pkill -u "$USER" -fx /usr/bin/wireplumber 1>/dev/null 2>&1 
pkill -u "$USER" -fx /usr/bin/pipewire 1>/dev/null 2>&1 

exec /usr/bin/pipewire & 

# wait for pipewire to start before attempting to start related daemons 
while [ "$(pgrep -f /usr/bin/pipewire)" = "" ] ; do 
   sleep 1 
done 

exec /usr/bin/wireplumber & 

exec /usr/bin/pipewire-pulse & 

The file is a config file, does not need to be executable. Octal rights 644.

If you have more than one user you have to repeat that for these too.

Last edited by rolfie (Yesterday 18:30:43)

Offline

#3 Yesterday 19:20:57

Big_Hat
Member
Registered: Yesterday
Posts: 2  

Re: New Devuan user, strugging to get the sound working

Many thanks for your welcome, rolfie, and your reply. 

I followed your advice, and ran

apt install pipewire-audio

which came back that everything was installed and up to date. 

I then added your lines to ~/.xsessionrc, checked the file permissions (664), and restarted the computer.  Unfortunately, when I logged into Devuan, the screen froze as black with just the mouse pointer showing. 

I had to hold the power button down to turn off the computer, then booted into Linux Mint and hashed out the addition to .xsessionrc.  This time Devuan logged in fine, but with no sound as before. 

I'm wondering, what does your entire .xsession file look like, please?  With your lines added, mine was

if [ -f ~/.profile ]; then
    . ~/.profile
fi

# kill any existing pipewire instance to restore sound 
pkill -u "$USER" -fx /usr/bin/pipewire-pulse 1>/dev/null 2>&1 
pkill -u "$USER" -fx /usr/bin/wireplumber 1>/dev/null 2>&1 
pkill -u "$USER" -fx /usr/bin/pipewire 1>/dev/null 2>&1 

exec /usr/bin/pipewire & 

# wait for pipewire to start before attempting to start related daemons 
while [ "$(pgrep -f /usr/bin/pipewire)" = "" ] ; do 
   sleep 1 
done 

exec /usr/bin/wireplumber & 

exec /usr/bin/pipewire-pulse & 

the first 3 lines are from the Devuan Excalibur release notes. 

Also, my ~/.profile file is this, in case it makes a difference - again the last section I added from the Devuan Excalibur release notes

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
	. "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi

# Pipewire Audio snippet from Devuan release notes
if [ "$XDG_RUNTIME_DIR" = "/run/user/$(id -u)" ] ; then
                psess_pids=
                for p in pipewire wireplumber pipewire-pulse ; do
                command -v $p >/dev/null || continue
                    pgrep --exact --uid $USER $p >/dev/null && continue
                    $p &
                    psess_pids="$! ${psess_pids}"
                done
                [ "$psess_pids" ] && trap "kill $psess_pids" EXIT
fi

Offline

#4 Yesterday 19:53:36

rolfie
Member
Registered: 2017-11-25
Posts: 1,446  

Re: New Devuan user, strugging to get the sound working

I guess the problem is that you are mixing several approaches, and they don't go together very well. I have taken my setup from here: https://dev1galaxy.org/viewtopic.php?pid=45747#p45747. This is the initial Daedalus approach. The same thread then talks about different approaches and daemons ... never fully understood the differences, and never changed my setup. It works 18 months now. 

I have simply upgraded my Daedalus installation to Excalibur, ignored the release notes, and the old stuff simply works. Also on my travelling laptop.

You followed a different guide, and I guess you have to undo that stuff first of all. Sorry, I should have mentioned that.

I got the same snippet in front of my .xsessionrc:

if [ -f ~/.profile ]; then
    . ~/.profile
fi

But according to my notes this was because of some conf change for gnupg. I don't think this hurts.

I would remove or comment out the addition from the release note in .profile. Give it a try.

Offline

#5 Today 01:05:12

rbit
Member
Registered: 2018-06-12
Posts: 119  

Re: New Devuan user, strugging to get the sound working

If you installed Cinnamon desktop using the excalibur 6.1.1 iso set, attempts to have some kind of sound working after installation.  Sorry it didn't work out for you.  The installer creates /etc/xdg/autostart/pipewire.desktop file that attempts to run daemon to start pipewire, pipewire-pulse, and wireplumber.  Since this method isn't working on your system, before attempting other ways of getting these processes to start up, you should first disable the xdg autostart.  You can do this in the Cinnamon GUI: Menu -> System Settings -> Startup Applications, turn the slider for Pipewire to the off position.  Then you may try other methods of starting pipewire, if that's what you want to use.

Offline

Board footer