I got fed up with xinit and startx so I decided to write my own startx script. Now it mostly works great, except for one thing: Pulseaudio will only play audio on VTs I have done a text login on. So if I log into tty1 and start X on tty2, pulse refuses to play sound unless tty1 is active. I have tried the following:

  • Chowning and chmodding tty2 to duncan:tty and 0600 (this is the behavior I see when I log into a tty)
  • Using openvt -fuc to attempt to allocate the tty to me. This results in the behavior noticed in the previous bullet, but still does not allow audio to be played.

What can I do to fix this? It seems I need to somehow tell Pulse that tty2 is assigned to me.

I discovered that this only happens if the X server has been started at least once since boot. Even if I open another tty and log in as a different user, audio played via Pulse by the first user continues. But the moment I start the X server, these policies are applied.

Note: System-wide mode doesn't fit in my circumstances, so that's not an option (and it's strongly discouraged anyway).

  • In principle, audio shouldn't be related to your VT/tty at all. So debug it: Do you run Pulseaudio? If yes, stop it (verify with ps), and see if you can use aplay to access the ALSA devices directly. If that works, something prevents Pulseaudio from working, and we can debug it further.
    – dirkt
    Commented Mar 6, 2017 at 7:55
  • Alright, I'll try that out. I know that in my experience it has always been related to VT, so that only the current user's audio gets played Commented Mar 6, 2017 at 13:54
  • I can play audio on my system even if logged in remotely via ssh, which uses no VT at all, so I seriously doubt it's related to what VT the user is on. If you run Pulseaudio with DBus and other user-specific stuff, Pulseaudio may restrict which user can do what, but the ALSA interface has no such restriction.
    – dirkt
    Commented Mar 6, 2017 at 15:49
  • Does that work if nobody is logged in on the active VT? Commented Mar 6, 2017 at 15:50
  • Yes (again: I'm not using Pulseaudio for it).
    – dirkt
    Commented Mar 6, 2017 at 15:53


You must log in to answer this question.

Browse other questions tagged .