Linux audio issues on flatpak intellij build
See original GitHub issueIssue details
Running fresh libgdx project in IntelliJ IDEA Community seems to have some issues with audio. After following guide from https://libgdx.com/wiki/start/a-simple-game audio does not work. note that fedora, by default, ships with pipewire instead if pulseaudio, and that may be the main problem.
Reproduction steps/code
- Install all system updates
- Install IntelliJ IDEA Community from flatpak
- download gdx-setup.jar
- Install java-18-openjdk and use it run gdx-setup.jar (built in jdk doesnt work for some reason)
- unmark Android platform and click Generate
- open the generated project with intellij, wait for setup process
- Add Configuration > Add new > Application
- JRE > java 17 corretto-17 (can also use jre 18, no difference)
- module classpath > [name].desktop.main
- Main class > com.mygdx.game.DesktopLauncher
- Apply, OK
- Shift-10 (Run) (The error messages appears)
- follow https://libgdx.com/wiki/start/a-simple-game guide fully (The audio doesn’t work)
Version of libGDX and/or relevant dependencies
[Gdx version] 1.11.0
Stacktrace
Executing ':desktop:DesktopLauncher.main()'...
> Task :core:compileJava UP-TO-DATE
> Task :core:processResources NO-SOURCE
> Task :core:classes UP-TO-DATE
> Task :core:jar UP-TO-DATE
> Task :desktop:compileJava UP-TO-DATE
> Task :desktop:processResources UP-TO-DATE
> Task :desktop:classes UP-TO-DATE
> Task :desktop:DesktopLauncher.main()
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
ALSA lib ../../pulse/pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused
Please select the affected platforms
- Linux Fedora 36 VM
- Linux MInt VM (Not tested yet)
- Linux Ubuntu VM (Not tested yet)
Issue Analytics
- State:
- Created a year ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
PulseAudio is not accessible from programs run from IDEA ...
What steps will reproduce the issue? Open IDEA Terminal; Run any audio tool, forcing it to use PulseAudio backend; The application cannot connect...
Read more >Provide a Flatpak as software package — for Linux systems
Flatpak is a technology for building, distributing, installing and running applications – primarily targeted at the Linux desktop.
Read more >PulseAudio is crackling continiously while Intellij IDEA ...
I've got this issue for the first time ~1.5 years ago. Closing Android Studio (IDEA) while playing audio directly to ALSA device:.
Read more >Linux Version can't find Intellij installed via Flatpak - YouTrack
install the toolbox and then the install an IntelliJ version via SNAP, FLATPAK, deb, etc. . The toolbox should automatically (or manually!) detect...
Read more >Flatpak Is Not the Future | Hacker News
Docker has the same issue, and didn't really solve it with its layered filesystem (you always need several dependencies, but you can't merge ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Taking multable tests with non flatpak builds of intellij seems that everything is working. In short this is a flatpak intellij issue, not libgdx.
Yeah from debugging a bit in discord, this seems to be a general issue with flatpack and it seems like that there’s some missing configs for it to work.
Basically from what I can see the PA client tries to connect too the PA server socket in a wrong location and you’d need to tell it to connect to the proper one. No clue how though.