Page 1 of 2

KGS Sound Issues in Ubuntu

Posted: Thu Dec 30, 2010 10:06 pm
by jaliz
I have an issue with sound with CGoban under Ubuntu that I could not find any other specific topics about. My stone clicking sound works perfectly, even if I have music playing in the background, but no other sound works (the private message sound, the warning beeping sound for low time, or audio lectures by others like dsaun).

I am using Ubuntu 10.10.

My relevant CGoban preferences look correctly set:

Code: Select all

Warn by... Both
Sound Enabled CHECK
Sound for: All games
Alarm for games? CHECK


I have completely removed openjdk.

I am using sun java.

Code: Select all

name@name:~$ update-alternatives --list java
/usr/lib/jvm/java-6-sun/jre/bin/java


Code: Select all

name@name:~$ java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Server VM (build 17.1-b03, mixed mode)


I placed padsp before javaws. I also tried aoss, it gave me the same problem.

Does anybody have any idea what to do? Thanks.

Re: KGS Sound Issues in Ubuntu

Posted: Thu Dec 30, 2010 10:59 pm
by Dusk Eagle
I'm using Kubuntu 10.10, and I'm having a similar yet different problem. The stone clicking sound doesn't work, and the low-time-in-byo-yomi sound only works for one period before it quits working. Audio reviews work however. It's been this way ever since I got my new computer and with it the upgraded operating system. I wonder if it has to do with the version of java shipped in the Ubuntu repositories?

Re: KGS Sound Issues in Ubuntu

Posted: Thu Dec 30, 2010 11:09 pm
by nagano
I'm afraid I don't use Ubuntu, so I can't really help. Question: does Linux do a very good job running virtual Windows?

Re: KGS Sound Issues in Ubuntu

Posted: Fri Dec 31, 2010 12:28 am
by jaliz
nagano wrote:I'm afraid I don't use Ubuntu, so I can't really help. Question: does Linux do a very good job running virtual Windows?


To save money I never bought Windows for this computer and I do not want to use an illegal copy so this isn't an option for me. :sad:

I am trying to find a solution that does not involve virtualization.

Re: KGS Sound Issues in Ubuntu

Posted: Fri Dec 31, 2010 1:25 am
by jaliz
Dusk Eagle wrote:I'm using Kubuntu 10.10, and I'm having a similar yet different problem. The stone clicking sound doesn't work, and the low-time-in-byo-yomi sound only works for one period before it quits working. Audio reviews work however. It's been this way ever since I got my new computer and with it the upgraded operating system. I wonder if it has to do with the version of java shipped in the Ubuntu repositories?


Using the instructions at http://sites.google.com/site/easylinuxtipsproject/java#TOC-Install-JRE-32-bit-, I tried it with java update 23, 1.6.0_23. It made no difference and my problems are still here.

Re: KGS Sound Issues in Ubuntu

Posted: Fri Dec 31, 2010 6:59 am
by jts
I also use kgs on ubuntu with sun java, and the sound is similarly whimsical. Sometimes the clicking stones sound works great, sometimes I won't hear it for days. Also, since the last upgrade (to 10? I can't really recall what I'm on now) kgs disconnects like crazy. I've come to the conclusion that java is not great and ubuntu isn't so hot either, and that eventually I'm going to have to go back to windows. (utterly unrelated: there also seems to be a new format for wmv that vlc can't read :sad: )

Re: KGS Sound Issues in Ubuntu

Posted: Fri Dec 31, 2010 11:19 am
by clemi
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

Re: KGS Sound Issues in Ubuntu

Posted: Fri Dec 31, 2010 2:04 pm
by judicata
Although this isn't very helpful, I have the current implementation of Ubuntu and all of my sound works with KGS (using Sun java). Let me know if you want me to check some settings or something.

Re: KGS Sound Issues in Ubuntu

Posted: Fri Dec 31, 2010 5:45 pm
by jaliz
judicata wrote:Although this isn't very helpful, I have the current implementation of Ubuntu and all of my sound works with KGS (using Sun java). Let me know if you want me to check some settings or something.


Can I ask for what version of java you are using and how you start up cgoban? For me, I use a luancher with the command "padsp javaws http://files.gokgs.com/javaBin/cgoban.jnlp"

Did it always work for you or do you remember doing anything special? One of things I was thinking about trying was going through the older java versions and seeing if one of them maybe worked.

Re: KGS Sound Issues in Ubuntu

Posted: Fri Dec 31, 2010 5:47 pm
by jaliz
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.

Re: KGS Sound Issues in Ubuntu

Posted: Fri Dec 31, 2010 6:41 pm
by C. Blue
There is a problem in the execution chain of Java's 'javaws' command, which will usually cut off sound! So first off, please instead of (what I assume you're doing):

Code: Select all

padsp javaws cgoban.jnlp

instead dive into your .java hidden folder and locate your CGoban deployment, then execute it locally from the app cache, instead of online webstart version, like this:

Code: Select all

padsp java -jar /home/yourname/.java/deployment/cache/6.0/38/2c4b005d-94c13ee9

Where you replace 'yourname' by your name. The actual folder number (here "38") and CGoban file name (here "2c4...ee9") have to be replaced to meet your installation, they differ on different PCs. To locate your deployment, just look for a file that is about 1.5 MB in size, it's CGoban (in my example it is the "2c4...ee9" named file).

If that still doesn't give you sound, the reason would most likely be that either another application reserved the device (unlikely for any standard Ubuntu 10 app though), or (much more likely) caused pulseaudio problems (VLC and web browsers are notorious for this, especially in combination). In another posting I already mentioned to shut down all apps that use sound, like media players and web browsers, then try again.
Make sure the apps really have terminated, open a terminal and type for example:

Code: Select all

ps -ef | grep chromium-browser

assuming you closed a Chromium web browser previously. The command should not return any more running chromium-browser process. In case one of the programs hangs and refuses to terminate, ie still shows up in the 'ps' command, you can force-kill it like this:

Code: Select all

killall -9 chromium-browser

where '-9' means 'force-kill'. There is no way an app can resist this, the OS will wipe it out. Usually this is only required for VLC or web browsers, if at all.

Usually, after terminating any app that was responsible for messing up sound, you can restart it right away and it'll peacefully coexist with CGoban (thanks to 'padsp'), until it decides to mess up pulseaudio again, several hours/days later, depending on factors such as system load.

Now, if you tried terminating or restarting apps, then executing the 'padsp java -jar..' line above, and still get no sound, it might be that you missed terminating the right app.
In this case, we can just try a brute-force approach to just test the concept if we can in ANY way just get sound out of CGoban:

Code: Select all

pulseaudio -k

This will kill and automatically restart the pulseaudio daemon. Running this command will kill all connections of currently running apps to the pulseaudio server, thereby disabling their sound capabilities (and possibly worse) until they are restarted, so this is an ugly thing to do.
However, after this command you'll be sure to have a "clean" pulseaudio server running, ready to accept your 'padsp java -jar..' call, so give it a try to see if it finally works.

Re: KGS Sound Issues in Ubuntu

Posted: Fri Dec 31, 2010 6:50 pm
by nagano
jaliz wrote:
nagano wrote:I'm afraid I don't use Ubuntu, so I can't really help. Question: does Linux do a very good job running virtual Windows?


To save money I never bought Windows for this computer and I do not want to use an illegal copy so this isn't an option for me. :sad:

I am trying to find a solution that does not involve virtualization.


Actually what I meant was, I am interested in eventually switching to Linux, but still need to be able to run certain Windows programs. 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?

Re: KGS Sound Issues in Ubuntu

Posted: Fri Dec 31, 2010 10:18 pm
by jaliz
C. Blue wrote:There is a problem in the execution chain of Java's 'javaws' command, which will usually cut off sound!


Thanks for the advice, but unfortunately it's still the same situation for me. :sad:

I restarted, made sure that everything was closed, ran:

Code: Select all

pulseaudio -k


and then

Code: Select all

padsp java -jar ~/.java/deployment/cache/6.0/28/3f4b305c-1f549a25


and tried to play a game and send some PM's. I still can't hear the low time beep warning sound and I still can't hear PM tells. It seems like the only thing I can hear still is the stone clicking sound.

Re: KGS Sound Issues in Ubuntu

Posted: Fri Dec 31, 2010 10:29 pm
by C. Blue
jaliz wrote:I still can't hear the low time beep warning sound and I still can't hear PM tells. It seems like the only thing I can hear still is the stone clicking sound.


Aw, that's pretty odd since we've gone to quite a basic testing level with this. I'm out of ideas then, except for testing it on different hardware, sorry. :(
Or, if you're up for some crazy stuff, try ossproxyd (search for OSSproxy on sourceforge.net).

Re: KGS Sound Issues in Ubuntu

Posted: Fri Dec 31, 2010 10:31 pm
by jaliz
nagano wrote:Actually what I meant was, I am interested in eventually switching to Linux, but still need to be able to run certain Windows programs. 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?


I've never tried it that way, only the other way around. In the past I ran VirtualBox on Windows to run Ubuntu and it was very good, but there was a big performance hit for me so I stopped. The only Windows program I use right now (GomPlayer to watch starcraft 2 games) works fine with WINE, but I know there are many applications that have some issues (like the dialogue boxes or text not displaying).

With something like VirtualBox, I think you may have some issues playing certain games or doing some tasks that require high performance, but I don't know a lot about this topic or what your needs are.