Sunshine
Sunshine copied to clipboard
Running sunshine activates accessibility screen reader on some Linux distros
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 nightly release?
- [X] This issue is present in the nightly release
Describe the Bug
On nobara linux, which is a fedora 37 fork, the sunshine service fails to start, install and possibly be created at all. Running 'systemctl --user start sunshine' opens corectrl and activates the screen reader, stopping the service does not deactivate either. I have to go through the gnome settings/accessibility/ screeen reader shows to be disabled, but activating and deactivating stops the tts service.
My work around was to manually create/start/enable the service with an alternative name, sunshine1.service. This allowed the application to operate
Expected Behavior
No response
Additional Context
No response
Host Operating System
Linux
Operating System Version
Nobara 37
Architecture
64 bit
Sunshine commit or version
19.1
Package
Linux - rpm
GPU Type
AMD
GPU Model
rx6700xt
GPU Driver/Mesa Version
Mesa 23.0.2 - Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] (rev c5) Subsystem: XFX Limited Device 6606 Kernel driver in use: amdgpu Kernel modules: amdgpu --
Capture Method (Linux Only)
Defaults
Config
blank - There is nothing in this file -
location is ~./config/sunshine/sunshine.conf
Apps
No response
Relevant log output
[2023:05:23:12:05:03]: Info: Sunshine version: v0.19.1
[2023:05:23:12:05:03]: Error: Couldn't load cuda: -1
[2023:05:23:12:05:03]: Error: Environment variable WAYLAND_DISPLAY has not been defined
[2023:05:23:12:05:03]: Info: Detecting monitors
[2023:05:23:12:05:03]: Info: Detected monitor 0: DisplayPort-0, connected: true
[2023:05:23:12:05:03]: Info: Detected monitor 1: DisplayPort-1, connected: false
[2023:05:23:12:05:03]: Info: Detected monitor 2: DisplayPort-2, connected: false
[2023:05:23:12:05:03]: Info: Detected monitor 3: HDMI-A-0, connected: false
[2023:05:23:12:05:03]: Info: Detected monitor 4: HDMI-A-1-1, connected: false
[2023:05:23:12:05:03]: Info: Detected monitor 5: DisplayPort-1-3, connected: false
[2023:05:23:12:05:03]: Info: Detected monitor 6: DisplayPort-1-4, connected: false
[2023:05:23:12:05:03]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2023:05:23:12:05:03]: Info: Trying encoder [nvenc]
[2023:05:23:12:05:03]: Info: Screencasting with KMS
[2023:05:23:12:05:03]: Info: Found monitor for DRM screencasting
[2023:05:23:12:05:03]: Info: SDR color coding [Rec. 601]
[2023:05:23:12:05:03]: Info: Color range: [JPEG]
[2023:05:23:12:05:03]: Error: Failed to create a CUDA device: Operation not permitted
[2023:05:23:12:05:03]: Info: Screencasting with KMS
[2023:05:23:12:05:03]: Info: Found monitor for DRM screencasting
[2023:05:23:12:05:03]: Info: System tray created
[2023:05:23:12:05:03]: Info: SDR color coding [Rec. 601]
[2023:05:23:12:05:03]: Info: Color range: [JPEG]
[2023:05:23:12:05:03]: Error: Failed to create a CUDA device: Operation not permitted
[2023:05:23:12:05:03]: Info: Screencasting with KMS
[2023:05:23:12:05:03]: Info: Found monitor for DRM screencasting
[2023:05:23:12:05:03]: Info: SDR color coding [Rec. 601]
[2023:05:23:12:05:03]: Info: Color range: [JPEG]
[2023:05:23:12:05:03]: Error: Failed to create a CUDA device: Operation not permitted
[2023:05:23:12:05:03]: Info: Screencasting with KMS
[2023:05:23:12:05:03]: Info: Found monitor for DRM screencasting
[2023:05:23:12:05:03]: Info: SDR color coding [Rec. 601]
[2023:05:23:12:05:03]: Info: Color range: [JPEG]
[2023:05:23:12:05:03]: Error: Failed to create a CUDA device: Operation not permitted
[2023:05:23:12:05:03]: Info: Encoder [nvenc] failed
[2023:05:23:12:05:03]: Info: Trying encoder [vaapi]
[2023:05:23:12:05:03]: Info: Screencasting with KMS
[2023:05:23:12:05:03]: Info: Found monitor for DRM screencasting
[2023:05:23:12:05:03]: Info: SDR color coding [Rec. 601]
[2023:05:23:12:05:03]: Info: Color range: [JPEG]
[2023:05:23:12:05:03]: Info: Screencasting with KMS
[2023:05:23:12:05:03]: Info: Found monitor for DRM screencasting
[2023:05:23:12:05:03]: Info: SDR color coding [Rec. 601]
[2023:05:23:12:05:03]: Info: Color range: [JPEG]
[2023:05:23:12:05:03]: Info: Screencasting with KMS
[2023:05:23:12:05:03]: Info: Found monitor for DRM screencasting
[2023:05:23:12:05:03]: Info: SDR color coding [Rec. 601]
[2023:05:23:12:05:03]: Info: Color range: [JPEG]
[2023:05:23:12:05:03]: Info: Screencasting with KMS
[2023:05:23:12:05:03]: Info: Found monitor for DRM screencasting
[2023:05:23:12:05:03]: Info: SDR color coding [Rec. 601]
[2023:05:23:12:05:03]: Info: Color range: [JPEG]
[2023:05:23:12:05:03]: Info: Screencasting with KMS
[2023:05:23:12:05:03]: Info: Found monitor for DRM screencasting
[2023:05:23:12:05:03]: Info: SDR color coding [Rec. 601]
[2023:05:23:12:05:03]: Info: Color range: [JPEG]
[2023:05:23:12:05:03]: Info: Screencasting with KMS
[2023:05:23:12:05:03]: Info: Found monitor for DRM screencasting
[2023:05:23:12:05:03]: Info: SDR color coding [Rec. 709]
[2023:05:23:12:05:03]: Info: Color range: [JPEG]
[2023:05:23:12:05:03]: Info: Screencasting with KMS
[2023:05:23:12:05:03]: Info: Found monitor for DRM screencasting
[2023:05:23:12:05:03]: Info: SDR color coding [Rec. 709]
[2023:05:23:12:05:03]: Info: Color range: [JPEG]
[2023:05:23:12:05:03]: Warning: vaapi: hevc missing sps->vui parameters
[2023:05:23:12:05:03]: Warning: vaapi: hevc: replacing nalu prefix data
[2023:05:23:12:05:03]: Info:
[2023:05:23:12:05:03]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2023:05:23:12:05:03]: Info:
[2023:05:23:12:05:03]: Info: Found encoder vaapi: [h264_vaapi, hevc_vaapi]
[2023:05:23:12:05:03]: Info: Adding avahi service Sunshine
[2023:05:23:12:05:03]: Info: Configuration UI available at [https://localhost:47990]
[2023:05:23:12:05:04]: Info: Avahi service Sunshine successfully established.
[2023:05:23:12:05:12]: Info: Executing [Desktop]
[2023:05:23:12:05:12]: Info: CLIENT CONNECTED
[2023:05:23:12:05:12]: Info: Screencasting with KMS
[2023:05:23:12:05:12]: Info: Found monitor for DRM screencasting
[2023:05:23:12:05:12]: Info: SDR color coding [Rec. 709]
[2023:05:23:12:05:12]: Info: Color range: [MPEG]
[2023:05:23:12:05:12]: Info: Setting default sink to: [sink-sunshine-stereo]
[2023:05:23:12:05:12]: Info: Found default monitor by name: sink-sunshine-stereo.monitor
[2023:05:23:12:08:18]: Info: CLIENT DISCONNECTED
[2023:05:23:12:08:18]: Info: Setting default sink to: [alsa_output.pci-0000_10_00.6.analog-stereo]
This likely isn't going to result in any change to Sunshine, so closing. Fedora does not provide any package named sunshine
, but it appears that nobara does. I'm unable to find a website where I can search nobara packages though.
Same happens in ubuntu 22.04.
This likely isn't going to result in any change to Sunshine, so closing. Fedora does not provide any package named
sunshine
, but it appears that nobara does. I'm unable to find a website where I can search nobara packages though.
Same issue on Fedora 38. No, Fedora does not ship sunshine
, but this repo provides a fedora 37 and fedora 38 compatible rpm. I am using the sunshine-fedora-38-amd64.rpm
from the releases section of this repo. Starting up Sunshine causes several of my taskbar applications to act as if they've been clicked, launching their windows, and the screen reader activates.
I don't see how this is not a Sunshine problem. Is it possible to have this issue re-opened?
System info: OS: Fedora Linux 38 (Workstation Edition) x86_64 Kernel: 6.5.6-200.fc38.x86_64 Packages: 3336 (rpm), 43 (flatpak) Shell: bash 5.2.15 Resolution: 3840x2160 DE: GNOME 44.5 WM: Mutter WM Theme: Adwaita Theme: Adwaita [GTK2/3] Icons: Adwaita [GTK2/3] Terminal: gnome-terminal CPU: AMD Ryzen 7 5800X3D (16) @ 3.400GHz GPU: AMD ATI Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT Memory: 6459MiB / 31986MiB
I have this issue with the flatpak's systemd startup enabling screen reader. Manually running flatpak run dev.lizardbyte.app.Sunshine
does not invoke screen reader. So it's something specifically due to systemd's --user running it.
Just tried v0.21.0 of sunshine-fedora-38-amd64.rpm from releases and this issue still persists. Same behavior as I described above. I did not see any notes of this being fixed, but wanted to comment to indicate the issue is still active. Here are my current system deets:
OS: Fedora Linux 38 (Workstation Edition) x86_64
Kernel: 6.5.10-200.fc38.x86_64
Shell: bash 5.2.15
Resolution: 3840x2160
DE: GNOME 44.6
WM: Mutter
WM Theme: Adwaita
Theme: Adwaita [GTK2/3]
Icons: Adwaita [GTK2/3]
Terminal: gnome-terminal
CPU: AMD Ryzen 7 5800X3D (16) @ 3.400GHz
GPU: AMD ATI Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT
Memory: 5312MiB / 31986MiB
Note: I am running Wayland.
Edit: I wanted to 2nd what Nitrousoxide said... this issue is happening when starting sunshine via the systemd service. The service completely fails to start on boot, so I always have to start it manually. I start it with the command systemctl --user start sunshine.service
, it runs the screen reader and all of my legacy Tray icons act as if they've been clicked on... their app windows are opened. I have no idea what is triggering this, but it is something in sunshine's startup from systemd.
As an aside, for any here with the same issue, I simply run killall orca
from the terminal to turn the screenreader off after starting Sunshine instead of going to dig through menus to do it.
I think fedora has another service named sunshine
... not sure why as I think their sunshine service is actually running orca
?
This also happens on arch based systems using gnome. ran into it today. The toggle in accessibility does not even show it as toggled, but screen reader activates on user level systemd I am using the aur package
I've looked at ~/.config/systemd/user/sunshine.service
and found that it uses xdg-desktop-autostart.target
. I was pretty sure that I don't have this target, so to double check I ran systemctl list-units --type=target --all --user
and I couldn't find it, but I'm no systemd expert, so maybe I'm missing something. Anyways, I've rewritten this service file and now it seems to correctly start on boot without screaming at me:
[Unit]
Description=Sunshine is a self-hosted game stream host for Moonlight.
StartLimitIntervalSec=500
StartLimitBurst=5
After=graphical-session.target
[Service]
ExecStart=flatpak run dev.lizardbyte.sunshine
ExecStop=flatpak kill dev.lizardbyte.sunshine
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=default.target
Chiming in here that this has been an issue for me as well and @eaglesemanation's solution worked for me. I'm on Ubuntu 23.10. The issue cropped up when I swapped GPUs (Nvidia --> AMD) and reinstalled my OS. Under Nvidia and X11, this wasn't an issue I encountered (but have not gone further down that particular debug rabbit hole).
It also seems to cause some weird keyboard behaviour in Firefox. I found toggling "Screen Reader" on and off in Accessibility > Seeing works as a workaround.
never have i ever been jumpscared by systemctl
I've looked at
~/.config/systemd/user/sunshine.service
and found that it usesxdg-desktop-autostart.target
. I was pretty sure that I don't have this target, so to double check I ransystemctl list-units --type=target --all --user
and I couldn't find it, but I'm no systemd expert, so maybe I'm missing something. Anyways, I've rewritten this service file and now it seems to correctly start on boot without screaming at me:
This version of the systemd service file fixed the screen reader issue for me, but it still seemed to start Sunshine before the desktop was ready sometimes. I had the best luck adding a .desktop file to the ~/.config/autostart/dev.lizardbyte.app.Sunshine.desktop
for the flatpak
[Desktop Entry]
Version=1.0
Type=Application
Name=Sunshine
Comment=Self-hosted game stream host for Moonlight.
Categories=AudioVideo;
Icon=dev.lizardbyte.app.Sunshine
Exec=/usr/bin/systemctl --user start sunshine.service
Terminal=false
X-Flatpak=dev.lizardbyte.app.Sunshine
Since autostart files always wait for the compositor to be ready fully before starting up it's seemed like the most reliable way to ensure sunshine doesn't start too early, as adding a wait timer to the systemd entry may or may not be long enough on any given boot (without getting excessively long at least). By having the autostart .desktop file start the systemd service rather than the flatpak (or binary if installed via the package manager) you still get the benefits of systemd recovering from a crash of Sunlight while a simple direct run of the application would not.
Just chipping in to say that this issue is still occurring with Fedora 38. I'd rather not modify any files, as I have a tendency to destroy my system by doing so.
Just chipping in to say that this issue is still occurring with Fedora 38. I'd rather not modify any files, as I have a tendency to destroy my system by doing so.
This seems to work for me. It doesn't seem to invoke orca (the screen reader) on my testing. Adding ExecStartPre=/usr/bin/sleep 10
was needed on my end to make sure the desktop was setup enough for sunshine to not error out when starting. You may need to adjust the timing on that for your system.
[Unit]
Description=Sunshine is a self-hosted game stream host for Moonlight.
StartLimitIntervalSec=500
StartLimitBurst=5
[Service]
ExecStartPre=/usr/bin/sleep 10
ExecStart=/usr/bin/sunshine
ExecStop=/usr/bin/kill sunshine
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=graphical-session.target
We probably need to do something like this to check the users environment.
But instead of checking if X session is started, check if any supported DE is started.
https://superuser.com/a/1351489
If I read correctly this error is applicable when used in systemd to automatically launch during startup.
However, I have this error always, even if my system is fully started. I only start sunshine manually when needed, so I find it hard to believe its an error due to some dependency of desktop not fully started in my case.
Also on my system it only occurs when I use the Gnome GUI to start Sunshine. If I open it through a terminal it launches fine. So my guess is that its somehow related to 'how' its being started.
See also my issue here, which is closed due to being a duplicate, but contains a lot of info on my system.
I have the same Issue, and just like @Michael-Yongshi I'm starting sunshine manually from the GUI (Fedora 39).
It's really annoying so a fix of any sort would be highly appreciated.
Anyone is free to submit a PR
I have the same Issue, and just like @Michael-Yongshi I'm starting sunshine manually from the GUI (Fedora 39).
It's really annoying so a fix of any sort would be highly appreciated.
I use this as my service file, and it seems to avoid invoking orca (the TTS accessibility tool that the suggested service file always seems to invoke.
[Unit]
Description=Sunshine is a self-hosted game stream host for Moonlight.
StartLimitIntervalSec=500
StartLimitBurst=5
[Service]
ExecStartPre=/usr/bin/sleep 10
ExecStart=/usr/bin/sunshine
ExecStop=/usr/bin/kill sunshine
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=graphical-session.target
It is potentially not as robust since it's just sleeping for 10 seconds on boot to give the desktop enough time to finish starting rather than looking for a proper .target. However I've not found a good way stop it from starting up /usr/bin/orca
otherwise.
You can confirm it's orca that it's doing too by just running kill orca
after the tts feature starts, and it should stop it.
Perhaps running a script file that kills orca as part of starting up sunshine would work. I don't remember if I tried that.
I have the same issue on Ubuntu 22.04 .
I had found a solution some months ago and wrote it on the Discord channel, I will copy it here, maybe it can help the devs.
I've just had the same problem with Fedora 39. I resolved editing sunshine.service inside /usr/lib/systemd/user
The original file
[Unit]
Description=Sunshine is a self-hosted game stream host for Moonlight.
StartLimitIntervalSec=500
StartLimitBurst=5
PartOf=graphical-session.target
Wants=xdg-desktop-autostart.target
After=xdg-desktop-autostart.target
[Service]
ExecStart=/usr/bin/sunshine
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=xdg-desktop-autostart.target
I deleted the lines "PartOf", "Wants", "After", like it's showed in the example on https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/setup.html#install
[Unit]
Description=Sunshine is a self-hosted game stream host for Moonlight.
StartLimitIntervalSec=500
StartLimitBurst=5
[Service]
ExecStart=/usr/bin/sunshine
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=xdg-desktop-autostart.target
@AXL1994 great, it works for me too, thanks!
Same issue in ubuntu 2204. The desktop file is /usr/share/applications/sunshine.desktop
and it uses /usr/bin/env systemctl start --u sunshine
to start the service. As @AXL1994 's solution, it works! Thanks a lot!
I had found a solution some months ago and wrote it on the Discord channel, I will copy it here, maybe it can help the devs.
I've just had the same problem with Fedora 39. I resolved editing sunshine.service inside /usr/lib/systemd/user
The original file
[Unit] Description=Sunshine is a self-hosted game stream host for Moonlight. StartLimitIntervalSec=500 StartLimitBurst=5 PartOf=graphical-session.target Wants=xdg-desktop-autostart.target After=xdg-desktop-autostart.target [Service] ExecStart=/usr/bin/sunshine Restart=on-failure RestartSec=5s [Install] WantedBy=xdg-desktop-autostart.target
I deleted the lines "PartOf", "Wants", "After", like it's showed in the example on https://docs.lizardbyte.dev/projects/sunshine/en/latest/about/setup.html#install
[Unit] Description=Sunshine is a self-hosted game stream host for Moonlight. StartLimitIntervalSec=500 StartLimitBurst=5 [Service] ExecStart=/usr/bin/sunshine Restart=on-failure RestartSec=5s [Install] WantedBy=xdg-desktop-autostart.target
This fix works for me in ubuntu 24.04 Thanks
I'm getting the same issue in v2024.613.3910, using Fedora 40 and Gnome. Editing the systemd unit as noted by @AXL1994 resolved the issue