second x-server window has no sound. Please help!

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
deckoff
Level 1
Level 1
Posts: 7
Joined: Sun Aug 28, 2011 7:46 am

second x-server window has no sound. Please help!

Post by deckoff »

This is not WINE, but more xinit question, so I am sorry if anyone is offended.
I searched for two days for an answer that works for me , and did not get any answer in Ubuntu forums.I ask this question here, because it seems a lot of people run their win games in separate windows, so I hope on who knows might be willing to help.
My problem Every game I run starts and works OK in a separate x-window session , but no sound...
Games will have sound, when started in the default graphic environment.

This is the command I use to run a game:( the example given is for Heroes3, but is true for every game)
cd '/home/deckoff/.wine/drive_c/Program Files/GOG.com/Heroes of Might and Magic 3 Complete' && xinit /usr/bin/sudo -u deckoff /usr/share/playonlinux/playonlinux --run "Heroes3" $* -- :1
My searches found, that I will have to use
ck-launch-session
n to provide sound... I simply dont know how to use this and when to execute. ( If yu think this might solve problem, pls step by step how to)
Some bonus info - executing the command from tty1 when logged in, will provide sound for the tty, but not in the x-window
I use Ubuntu 11.04 (kubuntu on the pc I run, and Ubuntu on my desktop) I now Ubuntu uses pulseaudio( AFAIK), and pulseaudio does not work very well with WINE (although games do have sound when run form KDE or gnome.
Any info and help welcome, thank you in advance
deckoff
Level 1
Level 1
Posts: 7
Joined: Sun Aug 28, 2011 7:46 am

Post by deckoff »

I've found a solution:

edit /etc/group

Code:

Code: Select all

sudo vi /etc/group
Next, search for audio, you shoud find somethink like this:

Code:

Code: Select all

audio:x:29:pulse
Add a coma and your username afther pulse

Code:

Code: Select all

audio:x:29:pulse,username
change username with yours
Save and restart ubuntu, it should work.
If I switch between sessions, I loose sound, but that is minor trouble. I hope this helps someone
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Post by oiaohm »

deckoff the curse of pulseaudio.

Reason why you were getting no sound is the pulseaudio sound server is still sitting on the audio in an exclusive way.

3 possible solutions.

1 don't use pulseaudio return to dmix and alsa.
2 use pulseaudio but have dmix under it that everyone can access.
3 Do some horrid setting to pulseaudio so that the second users audio can pass into pulseaudio of the first user.

Anyone one of the 3 you don't loss sound when you switch between sessions.

This is something I want pulseaudio to fix assp. Some way to allow pulseaudio servers to operate nicely with each other.
jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm

Post by jorl17 »

FYI, I'd go with option 2.
deckoff
Level 1
Level 1
Posts: 7
Joined: Sun Aug 28, 2011 7:46 am

Post by deckoff »

I'd be quite happy if you share a how-to link for option 2, spent last few days search various things and might use a little help. :) I am trying to teach myself how to patch wine, so I can play Worms :)
Locked