KGS Sound Issues in Ubuntu

Comments, questions, rants, etc, that are specifically about KGS go here.
User avatar
flOvermind
Lives with ko
Posts: 295
Joined: Wed Apr 21, 2010 3:19 am
Rank: EGF 4 kyu
GD Posts: 627
Location: Linz, Austria
Has thanked: 21 times
Been thanked: 43 times

Re: KGS Sound Issues in Ubuntu

Post by flOvermind »

nagano wrote:I am aware of WINE, but if that doesn't work well enough for some of my programes, using VMware player is sufficient to run Windows, right? Are there any issues with this setup?


The only real issue I'm aware of is that applications using WPF may crash VMware. But I've never seen this issue with VirtualBox.

One thing to be aware of is that inside VMware or VirtualBox, you only have virtual hardware. That's most noticable with the graphics card, or with professional sound cards. Inside the virtual machine, you'll have a generic graphic card instead of your nVidia or AMD card. In that case, WINE may even work better (or not, it really depends on the application). But that's only relevant if you run things that need some specific hardware...
User avatar
judicata
Lives in sente
Posts: 932
Joined: Wed Apr 21, 2010 12:55 pm
Rank: KGS 1k
GD Posts: 0
Universal go server handle: judicata
Location: New York, NY
Has thanked: 146 times
Been thanked: 150 times

Re: KGS Sound Issues in Ubuntu

Post by judicata »

jaliz wrote:
clemi wrote:Hi,

there have always been issues with KGS and sounds when other applications are running (firefox, vlc player, etc...). What i do is i always start KGS first and firefox last, but you then won't get sound on firefox :(.

Here's a link on the kgs faq site :

http://kgsfaq.free.fr/index.php?action= ... artlang=en


For me, there are sound issues even if I am not running anything other than KGS. In my case, I can make stone clicking sounds work, even if I am using other programs for sound (like flash player for youtube on firefox) if I use padsp or aoss, but no other sounds work for me no matter what.



Sorry - I haven't checked this thread for a few days. When I get home, I can tell you what versions of what I use. But I recall that I renamed the java launcher (which is just "java") to "java.bin" and made a script called "java" with something like:

Code: Select all

#!/bin/bash

padsp /[location of java]/java.bin "$@"


And then made the script executable (sudo chmod +x java). I run the latest updates of Ubuntu on my Lenovo T61 with some sort of Intel audio.
pel
Dies in gote
Posts: 20
Joined: Sun Apr 25, 2010 2:52 pm
Rank: 3k
GD Posts: 0
Has thanked: 5 times
Been thanked: 1 time

Re: KGS Sound Issues in Ubuntu

Post by pel »

This problem is driving me mad.

I use the same "hack" with padsp and java.bin as judicata describes.
I also have the same "partial" sound problem as jaliz.

On my 32-bit laptop it works just fine
On my 64-bit desktop I have this issue

Both running ubuntu 10.10.

My desktop has been broken for a couple of months - before it broke it was working just fine
(All hardware except harddrive has been replaced).

Outside of KGS and guojuans internetgoschool-lessons everything works just fine.
User avatar
judicata
Lives in sente
Posts: 932
Joined: Wed Apr 21, 2010 12:55 pm
Rank: KGS 1k
GD Posts: 0
Universal go server handle: judicata
Location: New York, NY
Has thanked: 146 times
Been thanked: 150 times

Re: KGS Sound Issues in Ubuntu

Post by judicata »

pel wrote:This problem is driving me mad.

I use the same "hack" with padsp and java.bin as judicata describes.
I also have the same "partial" sound problem as jaliz.



That sucks. I suppose you removed the open java (I didn't see you mentioned it, but I imagine it was among the first things you did). As for my hack, I think the java executable location changed recently (I'm at work, so I can't check), and I had to adjust accordingly. But if you implemented the script, I'm sure you naturally found the right directory.

Oddly, I had the opposite problem to start with--I could here voice audio, but not the stones/alarms. My efforts were to remedy that, and I can hear both now.
pel
Dies in gote
Posts: 20
Joined: Sun Apr 25, 2010 2:52 pm
Rank: 3k
GD Posts: 0
Has thanked: 5 times
Been thanked: 1 time

Re: KGS Sound Issues in Ubuntu

Post by pel »

Yes, I've removed openjdk (should not have to, but did it anyway just to be sure).

The java executable changes when java version is upgraded (due to the symlink structure you usually find that out the hard way :) )
but that is not the issue. I've also tried removing the hack and runing the padsp wrapper manually.
pel
Dies in gote
Posts: 20
Joined: Sun Apr 25, 2010 2:52 pm
Rank: 3k
GD Posts: 0
Has thanked: 5 times
Been thanked: 1 time

Re: KGS Sound Issues in Ubuntu

Post by pel »

I would be interested in peoples results running the Java sound demo[1],
well if you suffer from this problem that is.

In particular the tests on the Juke Box-tab.


1) http://java.sun.com/products/java-media ... SoundDemo/
pel
Dies in gote
Posts: 20
Joined: Sun Apr 25, 2010 2:52 pm
Rank: 3k
GD Posts: 0
Has thanked: 5 times
Been thanked: 1 time

Re: KGS Sound Issues in Ubuntu

Post by pel »

Ok, I've finally found a solution.

By renaming libjsoundalsa.so

Code: Select all

$ mv /usr/lib/jvm/java-6-sun/jre/lib/amd64/libjsoundalsa.so \
 /usr/lib/jvm/java-6-sun/jre/lib/amd64/libjsoundalsa.so.rename


I finally got the sound working! Would be interesting to know why NOT using alsa would help with this problem though..
C. Blue
Dies in gote
Posts: 69
Joined: Thu Oct 07, 2010 4:45 am
Rank: EGF 1d
GD Posts: 0
KGS: CBlue
Has thanked: 29 times
Been thanked: 29 times

Re: KGS Sound Issues in Ubuntu

Post by C. Blue »

One more thing- it seems sometimes just padsp'ing a javaws call doesn't help.
The result will be that you can hear the 'ding' sounds from passing, but no stone clacking.

To fix this, it appears that using a static jar instead of webstart jnlp is the best way:

1) download the static client at
http://files.gokgs.com/javaBin/cgoban.jar
2) create custom application launcher or enter in a terminal:
padsp java -jar "/home/yourname/cgoban.jar"
or whereever you placed that cgoban.jar.

(To test in a 100% clear situation you could first restart your pulseaudio before launching cgoban, via 'pulseaudio -k'. Especially Flash as used in web browsers when you go to youtube or similar is notorious for causing trouble. Note that you'll have to restart all apps that use sound that were already running when you issue this command, though.)

That's it. It seems 'padsp javaws cgoban.jnlp' loses the pulseaudio wrapping in most cases, so try this if you haven't had luck so far ^^.
User avatar
Redbeard
Lives with ko
Posts: 269
Joined: Fri Apr 23, 2010 10:56 am
Rank: AGA 12k
GD Posts: 292
KGS: RedBeard
DGS: Akahige
Location: Seattle
Has thanked: 127 times
Been thanked: 123 times
Contact:

Re: KGS Sound Issues in Ubuntu

Post by Redbeard »

I had a similar problem running Debian. I posted my workaround here.

I found that Java was playing the MIDI sounds of KGS through OSS emulation/pulseaudio, but sending regular sound files directly to alsa and bypassing pulseaudio. Disabling the alsa library for Java would push all sound through OSS, which appears to be more compatible with PA.

What sound card/kernel module are you using? Do you have two sound cards or just one?
hermitek
Dies in gote
Posts: 27
Joined: Tue Jan 25, 2011 3:25 am
Rank: KGS 5k
GD Posts: 0
Has thanked: 14 times
Been thanked: 3 times

Re: KGS Sound Issues in Ubuntu

Post by hermitek »

I don't use pulseaudio at all. Earlier (when I was using 64bit Java 6 from Sun I think) I had issues with KGS locking audio driver for itself, but apart from that, sound was working. Right now I'm using 64bit icedtea 7 and there are no OSS/alsa driver issues… but placing stone sound and byo-yomi beeping doesn't work, everything else does (streaming audio, message announcement, I'm not sure about "pass" sound). But the interesting thing is that I have the same issues in Windows 8 with 64bit Java 7 from Oracle. So we should probably wait until Java 7 becomes official and wms will be hopefully forced to fix this.
User avatar
judicata
Lives in sente
Posts: 932
Joined: Wed Apr 21, 2010 12:55 pm
Rank: KGS 1k
GD Posts: 0
Universal go server handle: judicata
Location: New York, NY
Has thanked: 146 times
Been thanked: 150 times

Re: KGS Sound Issues in Ubuntu

Post by judicata »

Make sure system sounds aren't muted. It's silly, but muting the system alert sounds in the OS's settings can mute the byo-yomi and stone clicking sounds.
beans
Beginner
Posts: 15
Joined: Sun Jun 13, 2010 6:38 pm
Rank: KGS 5k
GD Posts: 0
KGS: beans
Has thanked: 5 times
Been thanked: 2 times

Re: KGS Sound Issues in Ubuntu

Post by beans »

Here's my 2 cents: I had success with jre6u31 and the following command in Ubuntu 10.10 and Zorin (based on Ubuntu 11.04)

Code: Select all

padsp /opt/jre1.6.0_31/bin/java -jar cgoban.jar


jre6u35 didn't work at all (sound-wise, that is) and aoss works in place of padsp in the above example.
A journey of a thousand miles starts with a single search for cheap flights.
Post Reply