Launching an X server from an existing CK session leads to no session being registered for that server

Bug #366404 reported by crabman on 2009-04-24
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
consolekit (Ubuntu)
Low
Unassigned
pulseaudio (Ubuntu)
Undecided
Unassigned

Bug Description

In intrepid I used to start a second xserver running openbox on my tv where i tun elisa, firefox and other stuff.

since installing a clean jaunty there is no sound when i am on the second X. When i switch (using Alt+F7) i can hear the sound of both X-servers. When i switch back (Alt+F9) sound disappers again.

EDIT:
I found this bug report: https://bugzilla.redhat.com/show_bug.cgi?id=433675
i am having EXACLTLY the same problem as Marcin Zajaczkowski, but using ubuntu. In the bug report the use of "ck-xinit-session" seems to solve the problem but i cant find it in ubuntus repos.

affects: ubuntu → pulseaudio (Ubuntu)
crabman (pommeskalle) on 2009-04-27
description: updated
summary: - no sound on TV-out (pulseaudio)
+ Unable to play sound on the second X-server

Confirmed.

Workaround:
You can execute "ck-launch-session" in the second X-Server. Then sound will work again (but you will have sound mixed from both xservers).

Since it's not clear to me where exactly the bug is, I'm further subscribing the ubuntu-x-swat team

Bryce Harrington (bryce) wrote :

The ck-* prefix indicates its a consolekit thing. Looks like ck-xinit-session is a redhat thing used to set something up with consolekit on x sessions.

Not sure there's really actually any X11 bug here... just sounds like some script or something that needs to be run when xinit starts up.

James Westby (james-w) wrote :

Hi,

How do you launch a second X server?

What's the output of ck-list-sessions when you can't hear the sound?

Thanks,

James

Janne Hyötylä (janne-hyotyla) wrote :

Hi James,

I launch the 2nd X server by logging in on a text console and typing:
$ xinit /usr/bin/xterm -- :1

Attaching the output of ck-list-sessions:
* After logging in at text console (e.g. Ctrl-Alt-F1) [can hear sound playing from 1st X server]
* After starting the 2nd X server, typed in the xterm that started with it [no sound]
* After executing ck-launch-session from the xterm [can hear sound again]

Further notes:
After changing to the text console, sound stops playing, but resumes when successfully logged in.

Don't know how relevant, but anyway: After executing ck-launch-session from the 2nd X server, the history of the xterm changes to match the one that I have in terminals of the 1st X server.

Janne Hyötylä (janne-hyotyla) wrote :
James Westby (james-w) wrote :

Hi,

So, what I think happens is that ck creates a session for you on
the text console. You then launch and X session from it, and switch
to it, away from the VT that the session is associated with, so
it thinks there are no active sessions.

You can try running

  $ ck-launch-session xinit /usr/bin/xterm -- :1

or

  $ xinit ck-launch-session /usr/bin/xterm -- :1

to force a new session.

Fixing this properly would require nested session support in ck I think.

Thanks,

James

Changed in consolekit (Ubuntu):
status: New → Triaged
importance: Undecided → Low
summary: - Unable to play sound on the second X-server
+ Launching an X server from an existing CK session leads to no session
+ being registered for that server
Janne Hyötylä (janne-hyotyla) wrote :

 $ ck-launch-session xinit /usr/bin/xterm -- :1

works well.

Daniel T Chen (crimsun) on 2010-03-05
Changed in pulseaudio (Ubuntu):
status: New → Invalid

Since Ubuntu 11.04, the trick with ck-launch-session no longer works. Now I'm running Ubuntu 12.04. I get no sound even after running ck-launch-session, but this used to work up to Ubuntu 10.10. Is there a different way to register a session for the second X server?

f1621106 (f1621106) wrote :

For those who bumped into this page while looking for solution, it's here:
http://askubuntu.com/questions/147547/how-to-get-sound-in-a-separate-x-server-in-ubuntu-11-04-or-later

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

Other bug subscribers