Ubuntu

pulseaudio breaks on switching from tty7 to tty [1-6] (in and out of Gnome)

Reported by Peter Garrett on 2008-04-07
96
This bug affects 10 people
Affects Status Importance Assigned to Milestone
pulseaudio (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: pulseaudio

lsb_release -rd
Description: Ubuntu hardy (development branch)
Release: 8.04

$ apt-cache policy pulseaudio
pulseaudio:
  Installed: 0.9.9-1ubuntu4
  Candidate: 0.9.9-1ubuntu4
  Version table:
 *** 0.9.9-1ubuntu4 0
        500 http://archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status

On switching for example to tty1 from X on tty7, sound drops out when using pulseaudio ( for example in mplayer ). Using alsa as default does not produce this issue.

Changing the audio output to alsa produces the expected behaviour: namely, that sound is not muted or interrupted on vt change.

This bug occurs when switching in and out of X with ctrl+alt+F7, ctrl+alt+F[1-6]
If sound is played from the prompt in a Vt and a switch is made to another Vt it appears not to happen.

For instance, starting playback mplayer (using pulse) sound is muted on change to tty1, and returns on switching back to X on tty7. The same issue occurs with Totem and the Firefox Totem plugin.

Peter Garrett (peter-garrett) wrote :
Daniel T Chen (crimsun) wrote :

This is an intentional feature. PulseAudio, in esd compat, supports the foreground user.

Changed in pulseaudio:
status: New → Won't Fix

On Sat, 19 Apr 2008 15:41:35 -0000
Daniel T Chen <email address hidden> wrote:

> This is an intentional feature. PulseAudio, in esd compat, supports the
> foreground user.

Wow, what a great feature... :|

Anakin Starkiller (sunrider) wrote :

This is a real bug !!
The main goal of MPD is to play local music even if X server is down !

Anakin Starkiller (sunrider) wrote :

I've found one solution. Open PolicyKit. And let the main user access sound device (in hal section).
Now, switching between tty works, but restarting X server still cause pulseaudio to stop...

Anakin Starkiller (sunrider) wrote :

For Peter Garrett :
I've found at last the solution for using pulseaudio even if X is down.
Well, everything was actually explained in the /etc/default/pulseaudio file :

---------------------------------------------------------------------
# Start the PulseAudio sound server in system mode.
# (enables the pulseaudio init script)
# System mode is not the recommended way to run PulseAudio as it has some
# limitations (such as no shared memory access) and could potentially allow
# users to disconnect or redirect each others audio streams. The
# recommend way to run PulseAudio is as a per-session daemon. For GNOME
# sessions you can install pulseaudio-esound-compat and GNOME will
# automatically start PulseAudio on login (if ESD is enabled in
# System->Preferences->Sound). For other sessions, you can simply start
# PulseAudio with "pulseaudio --daemonize".
# 0 = don't start, 1 = start
PULSEAUDIO_SYSTEM_START=0

# Prevent users from dynamically loading modules into the PulseAudio sound
# server. Dynamic module loading enhances the flexibilty of the PulseAudio
# system, but may pose a security risk.
# 0 = no, 1 = yes
DISALLOW_MODULE_LOADING=1
---------------------------------------------------------------

You have to make PulseAudio act as a Daemon instead as an esd instance of gnome-session.
So change PULSEAUDIO_SYSTEM_START=0 to PULSEAUDIO_SYSTEM_START=1
Everything works fine now ;)

Peter Garrett (peter-garrett) wrote :

On Tue, 06 May 2008 17:30:59 -0000
Anakin Starkiller <email address hidden> wrote:

> You have to make PulseAudio act as a Daemon instead as an esd instance of gnome-session.
> So change PULSEAUDIO_SYSTEM_START=0 to PULSEAUDIO_SYSTEM_START=1
> Everything works fine now ;)

Nice catch :) Thanks.

Lauri Niskanen (ape3000) wrote :

On Tue, 06 May 2008 17:30:59 -0000
Anakin Starkiller <email address hidden> wrote:

> You have to make PulseAudio act as a Daemon instead as an esd instance of gnome-session.
> So change PULSEAUDIO_SYSTEM_START=0 to PULSEAUDIO_SYSTEM_START=1
> Everything works fine now ;)

That doesn't do anything.. The problem is still here. Does my output for pulseaudio --daemonize say anything?

ape@ape-linux:~$ pulseaudio --daemonize
E: main.c: daemon startup failed.

Michael Nagel (nailor) wrote :

still the same with intrepid...
i dont know what advantages this behaviour offers...

Michael Nagel (nailor) wrote :

could this be reopened as a wishlist item? so you can easily switch between the two possibilities?

Juaco (kankito) wrote :

Policykit workaround had success on my machine, running intrepid. Thank you!!!

Lee Boynton (lboynton) wrote :

Sorry, how exactly do you open PolicyKit? Or does this only work with MPD? I would like to continue playing music from Banshee when switching user.

Lee Boynton (lboynton) wrote :

Ah, polkit-gnome-authorization :)

Sébastien Bertrand (damocles) wrote :

I think this bug is fixed under Jaunty :
- When I switch to tty1-tty6 : Sound playback continue if/when I'm logged in ;
- When I start another X server (with xinit for example) : Sound playback continue if I run 'ck-launch-session'.

Maybe 'ck-launch-session' will work for tty1-tty6 for intrepid.

Changed in pulseaudio (Ubuntu):
status: Won't Fix → Fix Released

And what is exactly ck-launch-session ? There is no manual page for it...

In Jaunty, even when PulseAudio is started in daemon mode, when I restart
the computer with mpd music player playing some music, it does not resume
after reboot...

2009/5/5 Sébastien Bertrand
<<email address hidden><thedamocles%<email address hidden>>
>

>
> I think this bug is fixed under Jaunty :
> - When I switch to tty1-tty6 : Sound playback continue if/when I'm logged
> in ;
> - When I start another X server (with xinit for example) : Sound playback
> continue if I run 'ck-launch-session'.
>
> Maybe 'ck-launch-session' will work for tty1-tty6 for intrepid.
>
> ** Changed in: pulseaudio (Ubuntu)
> Status: Won't Fix => Fix Released
>
> --
> pulseaudio breaks on switching from tty7 to tty [1-6] (in and out of Gnome)
> https://bugs.launchpad.net/bugs/213149
> You received this bug notification because you are a direct subscriber
> of the bug.
>
>

Sébastien Bertrand (damocles) wrote :

The best page I've found to explain what is 'ck-launch-session' is :
- http://wiki.archlinux.fr/systeme:consolekit (in French)
- http://translate.google.fr/translate?u=http%3A%2F%2Fwiki.archlinux.fr%2Fsysteme%3Aconsolekit&sl=fr&tl=en&hl=fr&ie=UTF-8 (in English)

I do not understand what you are saying about MPD.
The original description of this bug do not talk about MPD but about the fact that sound isn't shared between sessions of the same user (tty7 and tty1-6).

got the same problem here on Ubuntu 11.04.

Ivan Zorin (iaz) wrote :

I can confirm this bug also - exactly the same problem using Ubuntu 11.10

KernelPanic (jfrusciante) wrote :

The policy might be desired, but the way it is implemented is IMHO buggy.

Scenario on my computer:

1. X running, tty7. Everything's ok.
2. Switch to tty1: no sound.
3. Login in tty1: sound comes back.
4. Switch back to X: everything's ok

Now, this is nonsense to me. X *is* running when I switch to tty1. There is no authentication required when I switch back to it. All my user processes keep running within my authenticated session; they are not stopped, they do not require another authentication when I switch back to it. So why only Pulseaudio stops?

I could understand if sound stopped after I quit/lock the session (annoying but, ok, safer). But I do not.
I am sure there is some technical reason for it but IMHO the overall behavior is buggy.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers