Ticket #205 (closed defect: wontfix)

Opened 4 years ago

Last modified 4 years ago

No sound in text console

Reported by: AdamK Owned by: lennart
Milestone: Component: daemon
Keywords: Cc: mszpak@…

Description

If I switch from X to text console (Ctrl-Alt-F1), all sound from applications running under X with PulseAudio is 'suspended' . Now, if in console I start anything that goes through PulseAudio, I have sound again, even if I kill console program.

When I suspend PulseAudio manually, the start any audio app through ALSA it plays well if I switch to console, so it is not X issue, it is something Pulse specific.

Change History

  Changed 4 years ago by szpak

  • cc mszpak@… added

  Changed 4 years ago by coling

I'd say this is a consolekit issue, not a pulse one.

follow-up: ↓ 4   Changed 4 years ago by szpak

When you switch to another X-server sound disappear as well. Any sound application (like movie player to watch movies on TV) started on that second X-server begins playing its sound just after primary X-server is reactivated (for watching movies on that secondary screen it's not very comfortable :) ). There was no that problem with pure Alsa or OSS.

in reply to: ↑ 3   Changed 4 years ago by coling

Replying to szpak:

When you switch to another X-server sound disappear as well. Any sound application (like movie player to watch movies on TV) started on that second X-server begins playing its sound just after primary X-server is reactivated (for watching movies on that secondary screen it's not very comfortable :) ). There was no that problem with pure Alsa or OSS.

For me user switching works fine.

Login as UserA -> Start sound playing and bring up a new login window (sound is automatically muted). Login as UserB and he can play his own sounds... switch back to UserA and UserB's sound is muted and UserA's restored.

This is how OSX handles it too and is IMO the correct behaviour.

What you describe above seems to suggest that this is not happening? Are you running pulseaudio for each user or just the one?

  Changed 4 years ago by szpak

PulseAudio and user switching is new for me (I've recently updated to Fedora 8 from FC5). Muting sound when user is switched looks reasonable.

To watch movies on TV I used to do following use case.

1. Login to UserA (in fact it's the only user I use) - X-server on :0 is active. 2. Start (from terminal) another X-server session (as a UserA) with mplayer on it: xinit <real script calling mplayer on display :1> $@ -- /usr/bin/X -layout tv :1

  • X-server on :1 (tv) become active (X-server on :0 (monitor) became inactive), mplayer starts, but it's unable to play sound

It's not user switching. Only primary X-server become inactive (like with CTRL-ALT-F1).

An application is started from the second X-server, so sounds from the first X-server could be even muted. It would be enough to allow applications from the second X-server play sound (when it's active). Maybe it's possible to configure PulseAudio to do that?

  Changed 4 years ago by coling

Hmm I see what you mean.

I think that's probably still a consolekit issue tho'. Console Kit handles ACLs on your sound devices and it's responsible for removing access when you switch to the console. I'm no expert on this but perhaps Lennart can advise better, or perhaps you could ask the console kit folks about it?

  Changed 4 years ago by szpak

I asked at Fedora's bugzilla and they gave a solution. It's required to start mplayer (or something else) using ck-xinit-session (in addition to xinit), like:

DISPLAY=:1 /usr/bin/ck-xinit-session /usr/bin/xterm -e /usr/bin/mplayer

For more info see: https://bugzilla.redhat.com/show_bug.cgi?id=433675

Unfortunately it probably won't solve original problem reported in that ticket :(.

  Changed 4 years ago by lennart

  • status changed from new to closed
  • resolution set to wontfix

If a different ck session becomes active we need to make sure that the now inactive PA session gives up access to the audio device. Otherwise people might be able to eavesdrop on each other.

If you want to be able to continue playback while your session becomes inactive you probably want to run PA in system mode.

Note: See TracTickets for help on using tickets.