Sunshine
Sunshine copied to clipboard
Flatpak does not work on KDE Wayland
Is there an existing issue for this?
- [x] I have searched the existing issues
Is your issue described in the documentation?
- [x] I have read the documentation
Is your issue present in the latest beta/pre-release?
Unable to test because of using the Flatpak version
Describe the Bug
Similar to see in #3668 which was closed without being solved AFAIK, Sunshine fails to detect an existing running PulseAudio instance.
As a result nothing works and I get a non-functional Sunshine.
This is a KDE Plasma 6.3 Wayland session within SDDM. Pulseaudio & PipeWire are launched by KDE.
This pops up instead when I run sudo -i PULSE_SERVER=unix:/run/user/$(id -u $whoami)/pulse/native flatpak run dev.lizardbyte.app.Sunshine
bwrap: Can't find source path /run/user/1000/pulse/native: Permission denied
Expected Behavior
The application should run correctly and not error out.
Additional Context
Running the app without this prevents KMS from working.
Host Operating System
Linux
Operating System Version
CachyOS (Arch Linux) using the Flatpak from Flathub
Architecture
amd64/x86_64
Sunshine commit or version
v2025.122.141614
Package
Linux - flathub/flatpak
GPU Type
NVIDIA
GPU Model
Nvidia RTX 4090
GPU Driver/Mesa Version
Nvidia-Open 575.57.08-2
Capture Method
None (because I cannot get KMS working at all).
Config
Apps
Relevant log output
Error: Couldn't get handle for DRM Framebuffer [145]: Probably not permitted
[2025-06-08 12:36:31.859]: Fatal: You must run [sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))] for KMS display capture to work!
If you installed from AppImage or Flatpak, please refer to the official documentation:
https://docs.lizardbyte.dev/projects/sunshine/latest/md_docs_2getting__started.html#linux
BTW, this is weird that this was reported over 5 months ago and was never fixed nor the developers ever checking on it apart from a bot closing the issue as stale.
I get the exact same error. I though it was because I am running Bluefin which has a read-only file system. But I think there is something wrong with the flatpak.
Yeah, I tried on multiple Arch based distros and Bazzite (which is also image-based like Bluefin), and the same thing happens; the app doesn't work.
Given Fedora is dropping the XOrg session of GNOME (which happened back in Fedora 40) and full out removing it from the repos in Fedora 43, I think this is important for Sunshine to fix as soon as they can.
Yeah, I tried on multiple Arch based distros and Bazzite (which is also image-based like Bluefin), and the same thing happens; the app doesn't work.
Bazzite already has a native version of Sunshine installed in the image. So if you were to use Bazzite as host you should use the pre-installed version of Sunshine over the flatpak.
Bazzite already has a native version of Sunshine installed in the image. So if you were to use Bazzite as host you should use the pre-installed version of Sunshine over the Flatpak.
Interesting, though I don't use Bazzite at the moment, so unfortunately, I am affected and cannot use Sunshine...
With the gradual removal of X11 on some distros, is this bug not going to start causing lots of sunshine users to stop working? Currently I face this bug and have to switch to X11 every time I want to stream my games.
With the gradual removal of X11 on some distros, is this bug not going to start causing lots of sunshine users to stop working? Currently I face this bug and have to switch to X11 every time I want to stream my games.
Until they fix it, yes. It doesn't work at all in wayland.
The flatpak will not work with immutable desktops that use Wayland. If we have a package for your distro that is a better option than the flatpak.
The flatpak will not work with immutable desktops that use Wayland. If we have a package for your distro that is a better option than the flatpak.
CachyOS and Bluefin get the same error. CachyOS is not immutable and Bluefin is immutable. So what is the problem?
CachyOS and Bluefin get the same error. CachyOS is not immutable and Bluefin is immutable. So what is the problem?
This is very strange indeed. I hope this project is updated to work with Wayland properly, because I don't want to add another repo to my /etc/pacman.conf and risk breakages.
The Flatpak will not work with immutable distros that use Wayland.
That's not a good thing; Bazzite is becoming very popular as a gaming distro, and Fedora Silverblue/Kionite, which Bazzite is based off of, is Wayland only as of Fedora 43.
The same will happen to the upcoming releases of Ubuntu (25.10) and OpenSUSE Leap (16); they're moving to Wayland only. IMO, this needs to be fixed because otherwise, Sunshine is basically at a dead-end.
Flatpak has never been recommended for Sunshine if a native package is available due to the sand-boxing limitations that they are not going to let us break through.
I don't want to add another repo to my /etc/pacman.conf and risk breakages.
That's your choice, but we provide multiple options to install pre-built packages on Arch: https://docs.lizardbyte.dev/projects/sunshine/latest/md_docs_2getting__started.html#archlinux
Bazzite is becoming very popular as a gaming distro, and Fedora Silverblue/Kionite, which Bazzite is based off of
Use rpm for fedora based distors, they work with immutable distros. https://docs.lizardbyte.dev/projects/sunshine/latest/md_docs_2getting__started.html#fedora
Our deb packages also work fine on LTS releases, or you can self compile for non LTS versions.
IMO, this needs to be fixed because otherwise, Sunshine is basically at a dead-end.
I agree it would be nice if everything worked with Flatpak, then we could drop all the individual packages. I don't see that happening anytime soon though, since this has been a limitation since the flatpak package was introduced and so far no one has tried to fix it.
Feel free to make a PR if you have a fix.
Is this just a problem with Flatpak or does this problem also persist when using the rpm or deb and Wayland?
Flatpak and AppImage.
Proposed solutions here #3327 and here #2507.
And yet another reason why I wish this would be available in Debian's repository too! Even more now, since Moonlight is preparing for that: https://github.com/moonlight-stream/moonlight-qt/issues/1109#issuecomment-2897149287 And it's sad to have only one when you need to administer multiple computers of your family and friends and want that each one of them is fully capable to stream or view+control the stream of others.
Hi, is there any progress towards a solution?
It seems this issue hasn't had any activity in the past 90 days. If it's still something you'd like addressed, please let us know by leaving a comment. Otherwise, to help keep our backlog tidy, we'll be closing this issue in 10 days. Thanks!
I have this exact same issue, On Ubuntu 24.10 with kde plasma wayland. the command for wayland to work won't work because it cannot access the user folder, under sudo. sudo -i PULSE_SERVER=unix:/run/user/$(id -u $whoami)/pulse/native flatpak run dev.lizardbyte.app.Sunshine bwrap: Can't find source path /run/user/1000/pulse/native: Permission denied