LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-27-2016, 02:11 PM   #1
kingbeowulf
Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware64 14.2 Slackware 14.2, Slackware{32,64}-current
Posts: 909
Blog Entries: 9

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Question Current extra/tigervnc-1.6.0 and pulseaudio issue: No sound on default DE after exit


This is a minor annoyance, but I thought I'd ask around:

Slackware64-current multilib as of Thu May 12 01:50:21 UTC 2016 updates. Nothing obvious visible about this in more recent change log.

TigerVNC kills pulseaudio (PA) server when shut down. The local desktop is :0 and the vnc session is :1. As long as both are running, I have sound on :0. Once I shut down vncserver, I loose sound completely, even pure alsa. The workaround is to shut down the desktop (ie X and XFCE) and restart via startx. A reboot/relogin is not needed. See attached error from the PA panel plugin.

On pure alsa (14.1), I did not have this issue (tigervnc-1.3.0 and AlienBob's builds)

When I am remote, I do not need sound. So am I missing a configureation option? Is there a glitch in Slackware's implementation of PA? I was thinking of killing PA and going back to pure ALSA, but Steam works a bit better with PA in front of Alsa, as well as some standalone Linux games (gotta feed that addiction...).

Any ideas much appreciated.
Attached Thumbnails
Click image for larger version

Name:	tigervnc_pulseaudio_2016-05-27_11-52-23.png
Views:	52
Size:	28.7 KB
ID:	21899  
 
Old 05-27-2016, 02:27 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,699

Rep: Reputation: 6239Reputation: 6239Reputation: 6239Reputation: 6239Reputation: 6239Reputation: 6239Reputation: 6239Reputation: 6239Reputation: 6239Reputation: 6239Reputation: 6239
Quote:
Originally Posted by kingbeowulf View Post
This is a minor annoyance, but I thought I'd ask around:

Slackware64-current multilib as of Thu May 12 01:50:21 UTC 2016 updates. Nothing obvious visible about this in more recent change log.

TigerVNC kills pulseaudio (PA) server when shut down. The local desktop is :0 and the vnc session is :1. As long as both are running, I have sound on :0. Once I shut down vncserver, I loose sound completely, even pure alsa. The workaround is to shut down the desktop (ie X and XFCE) and restart via startx. A reboot/relogin is not needed. See attached error from the PA panel plugin.

On pure alsa (14.1), I did not have this issue (tigervnc-1.3.0 and AlienBob's builds)

When I am remote, I do not need sound. So am I missing a configureation option? Is there a glitch in Slackware's implementation of PA? I was thinking of killing PA and going back to pure ALSA, but Steam works a bit better with PA in front of Alsa, as well as some standalone Linux games (gotta feed that addiction...).

Any ideas much appreciated.
Purely speculating now;
Pulseaudio is session-aware. In "/etc/pulse/default.pa" you will find this configuration block:
Code:
### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif
Assuming you are using XFCE in your VNC session (information gleaned from your other post today) does your ~/.vnc/xstartup script end with
Code:
exec /usr/bin/startxfce4
or with
Code:
exec dbus-launch --exit-with-session /usr/bin/startxfce4
I would expect the first example to be a candidate for killing off PA in your local desktop session (:0) when the remote session (:1) terminates.
 
Old 05-28-2016, 03:59 PM   #3
kingbeowulf
Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware64 14.2 Slackware 14.2, Slackware{32,64}-current
Posts: 909

Original Poster
Blog Entries: 9

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by Alien Bob View Post
Assuming you are using XFCE in your VNC session (information gleaned from your other post today) does your ~/.vnc/xstartup script end with
Code:
exec /usr/bin/startxfce4
or with
Code:
exec dbus-launch --exit-with-session /usr/bin/startxfce4
I would expect the first example to be a candidate for killing off PA in your local desktop session (:0) when the remote session (:1) terminates.
I'm using the logged in user's $HOME/.xinitrc (since there is only ever one user), and modified ~/.vnc/xstartup from the tigervnc default:
Code:
#!/bin/sh

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
OS=`uname -s`
if [ $OS = 'Linux' ]; then
  case "$WINDOWMANAGER" in
    *gnome*)
      if [ -e /etc/SuSE-release ]; then
        PATH=$PATH:/opt/gnome/bin
        export PATH
      fi
      ;;
  esac
fi
#if [ -x /etc/X11/xinit/xinitrc ]; then
#  exec /etc/X11/xinit/xinitrc
#fi
#if [ -f /etc/X11/xinit/xinitrc ]; then
#  exec sh /etc/X11/xinit/xinitrc
#fi
# run the user's xinitrc instead of system default
if [ -x $HOME/.xinitrc ]; then
  exec $HOME/.xinitrc
fi
if [ -f /$HOME/.xinitrc ]; then
  exec sh $HOME/.xinitrc
fi
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
And $HOME/.xinitrc is standward Slackware (from xwmconfig):
Code:
#!/bin/sh
#  xinitrc.xfce - modified to work around xfce4session bug
#                 https://bugzilla.xfce.org/show_bug.cgi?id=8841


########################################################################
##  Merge in defaults and keymaps                                     ##
########################################################################

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

if [ -f $sysresources ]; then
    /usr/bin/xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    /usr/bin/xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    /usr/bin/xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    /usr/bin/xmodmap $usermodmap
fi

########################################################################
##  Start xfce Desktop Environment                                    ##
########################################################################

if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
  exec ck-launch-session dbus-launch --exit-with-session /usr/bin/startxfce4
else
  exec dbus-launch --exit-with-session /usr/bin/startxfce4
fi
If I understand this correctly, since my DESKTOP_SESSION=xfce, the executed line is "exec dbus-launch --exit-with-session /usr/bin/startxfce4"...so there is that. What else could I be missing? too many nested execs?
 
Old 05-28-2016, 06:54 PM   #4
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
God I hate being dyslexic. This crash is caused by two things .asoundrc and or /etc/pulse/default.pa in slack current leave that stock.
Also remember some times for some bug reason it puts a device in monitor mode. You will never know it. Till you open pavucontrol.
remember to use alsamixer to set your channel for speakers I use channel 6 for my desk top speakers.
If you do not know what monitor mode is thats when another program monitors it for recording. so it is busy and no output sound

Last edited by Drakeo; 05-28-2016 at 07:16 PM. Reason: God I hate being dyslexic
 
Old 05-28-2016, 08:31 PM   #5
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,281

Rep: Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924
From the ~/.vnc/xstartup
Code:
unset DBUS_SESSION_BUS_ADDRESS
...
twm &
Starting twm like that will leave the DBUS_SESSION_BUS_ADDRESS unset. Perhaps a wrapper script to launch twm with DBUS_SESSION_BUS_ADDRESS is required, like here.
Then call the wrapper script, rather than twm directly, in ~/.vnc/xstartup.
 
Old 05-29-2016, 04:59 AM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,699

Rep: Reputation: 6239Reputation: 6239Reputation: 6239Reputation: 6239Reputation: 6239Reputation: 6239Reputation: 6239Reputation: 6239Reputation: 6239Reputation: 6239Reputation: 6239
The line
Code:
exec $HOME/.xinitrc
will make sure that the remainder of the script is never executed. It will never get to the "twm &" line, if you have a $HOME/.xinitrc file.
 
Old 05-29-2016, 08:01 AM   #7
Regnad Kcin
Member
 
Registered: Jan 2014
Location: Beijing
Distribution: Slackware 64 -current .
Posts: 217

Rep: Reputation: 137Reputation: 137
This may be completely off-base regarding the question at hand , but pulseaudio frequently fails for me, particularly if I unplug my head phones and plug them back in.

The fix that works for me and avoids a reboot is to open a terminal and run

Quote:
pulseaudio --kill
It is highly invigorating and satisfying and fixes things without rebooting.
 
Old 05-30-2016, 01:54 AM   #8
kingbeowulf
Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware64 14.2 Slackware 14.2, Slackware{32,64}-current
Posts: 909

Original Poster
Blog Entries: 9

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by Regnad Kcin View Post
This may be completely off-base regarding the question at hand , but pulseaudio frequently fails for me, particularly if I unplug my head phones and plug them back in.

The fix that works for me and avoids a reboot is to open a terminal and run
Code:
pulseaudio --kill
Nope, headphones with Mumble, Steam, etc are no issue here. PA has been solid as a rock (surprisingly) here so far except for this one issue. As either user or root I get
Code:
$ pulseaudio --kill
E: [pulseaudio] main.c: Failed to kill daemon: No such file or directory
...probably because PA ia no longer running. I have a $HOME/.xinitrc; its how I have always started any DE, and this does get called correctly to stat the DE.

The only thing that seems to work is the following when I want to kill the vnc session and then restart PA:
Code:
$ vncserver -kill :1
$ pulseaudio --start
Now, the question remains: Where cam I put "pulseaudio --start" to make this automatic? Since 'exec' doesn't return to the calling shell script, I can't just stick in in $HOME/.xinitrc or $HOME/.vnc/xstartup
 
  


Reply

Tags
desktop, pulseaudio, sound, tigervnc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Pulseaudio and wine (sound issue) on -current coralfang Slackware 3 02-08-2016 05:34 PM
Broke pulseaudio sound updating to last current :-/ Tonus Slackware 5 11-19-2015 03:24 PM
How do I get pulseaudio to change the default sound card? jdog320 Linux - Newbie 3 04-04-2015 12:49 PM
Winecfg crashes on sound tab with Pulseaudio and no 'sounddrivers' without pulseaudio William (Dthdealer) Linux - Software 5 06-13-2010 07:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration