runelite icon indicating copy to clipboard operation
runelite copied to clipboard

Runelite locks /dev/snd

Open BartWillems opened this issue 7 years ago • 48 comments

When I start Runelite before any other application, it locks my sound devices. Because of this, I can't play youtube videos, vlc can't output sound, ...

I always have to make sure that either Firefox or vlc is started first.

I'm using pulseaudio 11.1, Linux 4.16.12 and OpenJDK 8 on Arch Linux

BartWillems avatar May 31 '18 14:05 BartWillems

I use Arch btw

BartWillems avatar May 31 '18 14:05 BartWillems

Are you sure you have pulseaudio set-up correctly?

deathbeam avatar May 31 '18 15:05 deathbeam

My pulseaudio is indeed set-up correctly.

Recently I read some old arch forum entry about someone with the same issue. It was because some sun library tries to put a lock on the device in stead of talking to the sound server. I would link it, but I can't find it anymore...

Here is another link to someone who has the same issue, but in 2010: https://ubuntuforums.org/archive/index.php/t-1445507.html

BartWillems avatar May 31 '18 15:05 BartWillems

I've also experienced this with Arch Linux but not with Ubuntu.

ghost avatar Jun 01 '18 07:06 ghost

I solved this by installing "pulseaudio-alsa".

(Please do not close this as it's still a bug)

The problem was that runelite directly communicates with Alsa, thus locking your sound device. Pulseaudio-alsa acts like an alsa wrapper, so that miss-behaving programs(like runelite in this case) can't connect to alsa, but pass to pulseaudio.

BartWillems avatar Jun 04 '18 15:06 BartWillems

I am having the same problem on Arch.

jachymb avatar Mar 10 '20 11:03 jachymb

I may be experiencing the same thing when running the snap inside Fedora 31. I'm running the default sound configs. The behaviour I'm seeing is that pulseaudio crashes, but ALSA seems to continue working. I can tell that ALSA is working because Runescape sound effects continue playing. Oddly, the Runelite notifications and in-game music do not continue playing.

brainard52 avatar Apr 01 '20 07:04 brainard52

As a workaround for people who are experiencing this, please take a look at man padsp. It's not a permanent fix because the issue is allegedly not with Runelite or OSRS and is something that should be reported to system maintainers.

EDIT: launching runelite via padsp did not resolve the issue as I initially thought.

brainard52 avatar Apr 01 '20 19:04 brainard52

Workaround is using BT headset for other audio. This just seems to hijack only speakers and audio jack

HirschBerge avatar Apr 09 '20 22:04 HirschBerge

install pulseaudio-alsa

abextm avatar Apr 09 '20 22:04 abextm

install pulseaudio-alsa

Already installed. Does not impact the bug

HirschBerge avatar Apr 09 '20 22:04 HirschBerge

then your pulseadio is configured wrong or you have hit a different odd jvm behavior.

abextm avatar Apr 09 '20 22:04 abextm

Nothing seems wrong with pulseaudio. Installed runelite through the AUR, it's deps are messed up btw. Could be causing some of the issue as I had to install some things manually.

HirschBerge avatar Apr 09 '20 22:04 HirschBerge

Try the appimage from runelite.net, we don't support the aur version

abextm avatar Apr 09 '20 22:04 abextm

Could also just try the jar. Once the jar is in ~/Downloads, you can use this to install a Desktop file to show up in most desktop managers https://github.com/brainard52/RuneLite-Jar-Installer

brainard52 avatar Apr 09 '20 23:04 brainard52

I encountered this issue on Pop!_OS with openjdk-14. Installing alsa or pulseaudio-utils did not fix the issue. Running the AppImage yielded no sound, while running the AppImage with padsp yielded sound, but locked all devices.

The workaround for me was to use snap to install & run runelite: https://snapcraft.io/runelite

  1. sudo apt update && sudo apt install snapd
  2. sudo snap install runelite
  3. Launch runelite with snap run runelite

dipshit avatar Apr 19 '20 18:04 dipshit

This is gonna sound stupid, but for anyone else with this issue, make sure the audio is playing out of the right device.

dginovker avatar Jan 13 '21 04:01 dginovker

If anyone is having this issue and uses pipewire in place of pulseaudio, I can confirm that pipewire-alsa fixes this.

fuzxi avatar Apr 16 '21 04:04 fuzxi

Uninstalling droidcam made sound work for me

edisionnano avatar Jun 25 '21 14:06 edisionnano

@fuzxi is pipewire-alsa still working for you? For me I get lots of crackle whenever runelite is open.

TheGreatestJannet avatar Sep 18 '21 18:09 TheGreatestJannet

@TheGreatestJannet Yes, it still works fine for me. No audio issues. Currently using version 1:0.3.35-1 of pipewire and pipewire-alsa.

fuzxi avatar Sep 18 '21 23:09 fuzxi

~~For those of you with pipewire but installing pipewire-alsa did not resolve the issue, installing wireplumber and uninstalling pulseaudio-alsa resolved the issue for me.~~

Installing wireplumber does not resolve the issue.

hankjordan avatar May 05 '22 21:05 hankjordan

For those of you with pipewire but installing pipewire-alsa did not resolve the issue, installing wireplumber and uninstalling pulseaudio-alsa resolved the issue for me.

I do have wireplumber installed and do not have pulseaudio-alsa installed. Yet still no sound.

sangoku116 avatar May 06 '22 02:05 sangoku116

For those of you with pipewire but installing pipewire-alsa did not resolve the issue, installing wireplumber and uninstalling pulseaudio-alsa resolved the issue for me.

I do have wireplumber installed and do not have pulseaudio-alsa installed. Yet still no sound.

Of course, right after I posted this I started having issues again. wireplumber does not solve the problem.

Here are some of the installed packages from my working machine:

alsa-card-profiles
alsa-firmware
alsa-lib
alsa-oss
alsa-plugins
alsa-topology-conf
alsa-ucm-conf
alsa-utils
pipewire
pipewire-alsa
pipewire-jack
pipewire-media-session
pipewire-pulse
pipewire-v4l2
pipewire-x11-bell
pipewire-zeroconf
polkit
realtime-privileges
rtkit
sof-firmware

The current user is also a member of the realtime group.

I agree with you in #14345, pipewire should be a separate issue.

hankjordan avatar May 06 '22 14:05 hankjordan

Weird. I was having this issue as well with almost exactly the set up above. I uninstalled pulseaudio-alsa and now I'm no longer having the issue. This is with using pipewire-media-session instead of wireplumber

Lindenk avatar May 08 '22 20:05 Lindenk

Okay, I've managed to fix this issue on the device that was still having an issue.

I believe Runelite Flatpak's version of Java is outdated.

Installing Runelite from AUR and updating JRE to openjdk 18.0.1.1 resolves my sound issue entirely.

hankjordan avatar May 24 '22 00:05 hankjordan

Okay, I've managed to fix this issue on the device that was still having an issue.

I believe Runelite Flatpak's version of Java is outdated.

Installing Runelite from AUR and updating JRE to openjdk 18.0.1.1 resolves my sound issue entirely.

Just tried this and no luck on my end. Runelite is the only application unable to output any sounds despite trying out everything that was mentioned as working in this post.

sangoku116 avatar May 24 '22 00:05 sangoku116

@sangoku116 Please tell me the result from running java --version. If you are on Arch/Manjaro, please also show me the output of archlinux-java get.

hankjordan avatar May 24 '22 00:05 hankjordan

@sangoku116 Please tell me the result from running java --version. If you are on Arch/Manjaro, please also show me the output of archlinux-java get. java --version

openjdk 18.0.1.1 2022-04-22
OpenJDK Runtime Environment (build 18.0.1.1+2)
OpenJDK 64-Bit Server VM (build 18.0.1.1+2, mixed mode)

archlinux-java get java-18-openjdk

sangoku116 avatar May 24 '22 00:05 sangoku116

@sangoku116 Well, hmm. Are you certain Runelite is running with the updated version of Java?

XXXX-XX-XX XX:XX:XX [main] INFO net.runelite.launcher.JvmLauncher - Running [/usr/lib/jvm/java-18-openjdk/bin/java ... should appear somewhere in your runelite log.

If it is running with the updated version it may be related to installed packages. Note, contrary to my earlier post I am not running Wireplumber on this device. Here are mine:

alsa-card-profiles 1:0.3.51-1
alsa-firmware 1.2.4-2
alsa-lib 1.2.6.1-1
alsa-oss 1.1.8-4
alsa-plugins 1:1.2.6-3
alsa-topology-conf 1.2.5.1-1
alsa-ucm-conf 1.2.6.3-1
alsa-utils 1.2.6-1
java-runtime-common 3-3
jre-openjdk 18.0.1.u10-1
jre-openjdk-headless 18.0.1.u10-1
pipewire 1:0.3.51-1
pipewire-alsa 1:0.3.51-1
pipewire-jack 1:0.3.51-1
pipewire-media-session 1:0.4.1-1
pipewire-pulse 1:0.3.51-1
pipewire-v4l2 1:0.3.51-1
polkit 0.120-5
realtime-privileges 4-1
rtkit 0.13-1
runelite 1:2.4.2-1
sof-firmware 2.1.1-1

Also make sure you are launching Runelite via java -jar /usr/share/java/runelite/RuneLite.jar just to rule out any issues with the AUR install, a malformed .desktop file or accidently running the Flatpak.

hankjordan avatar May 24 '22 00:05 hankjordan