Life In 19x19
http://prod.lifein19x19.com/

KGS Sound Issues in Ubuntu
http://prod.lifein19x19.com/viewtopic.php?f=24&t=2723
Page 1 of 2

Author:  jaliz [ Thu Dec 30, 2010 10:06 pm ]
Post subject:  KGS Sound Issues in Ubuntu

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:
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:
name@name:~$ update-alternatives --list java
/usr/lib/jvm/java-6-sun/jre/bin/java


Code:
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.

Author:  Dusk Eagle [ Thu Dec 30, 2010 10:59 pm ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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?

Author:  nagano [ Thu Dec 30, 2010 11:09 pm ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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?

Author:  jaliz [ Fri Dec 31, 2010 12:28 am ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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.

Author:  jaliz [ Fri Dec 31, 2010 1:25 am ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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.

Author:  jts [ Fri Dec 31, 2010 6:59 am ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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: )

Author:  clemi [ Fri Dec 31, 2010 11:19 am ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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

Author:  judicata [ Fri Dec 31, 2010 2:04 pm ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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.

Author:  jaliz [ Fri Dec 31, 2010 5:45 pm ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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.

Author:  jaliz [ Fri Dec 31, 2010 5:47 pm ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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.

Author:  C. Blue [ Fri Dec 31, 2010 6:41 pm ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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:
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:
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:
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:
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:
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.

Author:  nagano [ Fri Dec 31, 2010 6:50 pm ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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?

Author:  jaliz [ Fri Dec 31, 2010 10:18 pm ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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:
pulseaudio -k


and then

Code:
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.

Author:  C. Blue [ Fri Dec 31, 2010 10:29 pm ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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).

Author:  jaliz [ Fri Dec 31, 2010 10:31 pm ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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.

Author:  flOvermind [ Mon Jan 03, 2011 4:49 am ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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...

Author:  judicata [ Mon Jan 03, 2011 10:39 am ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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:
#!/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.

Author:  pel [ Mon Apr 25, 2011 9:55 am ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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.

Author:  judicata [ Mon Apr 25, 2011 10:48 am ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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.

Author:  pel [ Mon Apr 25, 2011 11:58 am ]
Post subject:  Re: KGS Sound Issues in Ubuntu

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.

Page 1 of 2 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/