question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Linux audio issues on flatpak intellij build

See original GitHub issue

Issue 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

  1. Install all system updates
  2. Install IntelliJ IDEA Community from flatpak
  3. download gdx-setup.jar
  4. Install java-18-openjdk and use it run gdx-setup.jar (built in jdk doesnt work for some reason)
  5. unmark Android platform and click Generate
  6. open the generated project with intellij, wait for setup process
  7. Add Configuration > Add new > Application
  8. JRE > java 17 corretto-17 (can also use jre 18, no difference)
  9. module classpath > [name].desktop.main
  10. Main class > com.mygdx.game.DesktopLauncher
  11. Apply, OK
  12. Shift-10 (Run) (The error messages appears)
  13. 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:closed
  • Created a year ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Adomas-beep-boop-maggotscommented, May 21, 2022

Taking multable tests with non flatpak builds of intellij seems that everything is working. In short this is a flatpak intellij issue, not libgdx.

0reactions
lyze237commented, May 21, 2022

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.

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found