Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatpak application does not run and has an invalid icon #3560

Closed
2 tasks done
programmablereya opened this issue Jan 19, 2025 · 30 comments · Fixed by #3561
Closed
2 tasks done

Flatpak application does not run and has an invalid icon #3560

programmablereya opened this issue Jan 19, 2025 · 30 comments · Fixed by #3561
Assignees

Comments

@programmablereya
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is your issue described in the documentation?

  • I have read the documentation

Is your issue present in the latest beta/pre-release?

This issue is present in the latest pre-release

Describe the Bug

  1. Install sunshine_x86_64 from the v2025.118.151840 release.
  2. Try to execute the Sunshine application entry added by Flatpak.
  3. Nothing happens, and the application entry in the start screen has a missing icon.

Expected Behavior

The Sunshine application entry has the correct icon, and when clicked opens the user's default web browser to the Sunshine web UI.

Additional Context

The Icon= line in the .desktop file needs to have the .svg extension removed to be found (per desktop-file-validate; tested by removing it and verifying that it works).

Unclear what needs to be done to fix the Exec= line.

Host Operating System

Linux

Operating System Version

Pop! OS 22.04 LTS

Architecture

amd64/x86_64

Sunshine commit or version

v2025.118.151840

Package

Linux - flathub/flatpak

GPU Type

Intel

GPU Model

n/a

GPU Driver/Mesa Version

n/a

Capture Method

None

Config

n/a

Apps

n/a

Relevant log output

# reya @ kugane in ~
$ desktop-file-validate /var/lib/flatpak/exports/share/applications/dev.lizardbyte.app.Sunshine.desktop
/var/lib/flatpak/exports/share/applications/dev.lizardbyte.app.Sunshine.desktop: error: (will be fatal in the future): value "dev.lizardbyte.app.Sunshine.svg" for key "Icon" in group "Desktop Entry" is an icon name with an extension, but there should be no extension as described in the Icon Theme Specification if the value is not an absolute path
/var/lib/flatpak/exports/share/applications/dev.lizardbyte.app.Sunshine.desktop: hint: value "AudioVideo;Network;RemoteAccess;" for key "Categories" in group "Desktop Entry" contains more than one main category; application might appear more than once in the application menu

# reya @ kugane in ~ 
$ /usr/bin/flatpak run --branch=master --arch=x86_64 --command=dev.lizardbyte.app.Sunshine dev.lizardbyte.app.Sunshine 
bwrap: execvp dev.lizardbyte.app.Sunshine: No such file or directory

# reya @ kugane in ~ [0:29:55] 
$ /usr/bin/flatpak run --branch=master --arch=x86_64 --command=gio dev.lizardbyte.app.Sunshine launch /app/share/applications/dev.lizardbyte.app.Sunshine_terminal.desktop
gio: Unable to launch application ‘/app/share/applications/dev.lizardbyte.app.Sunshine_terminal.desktop’: Unable to find terminal required for application

# reya @ kugane in ~ [0:30:20] C:1
$ /usr/bin/flatpak run --branch=master --arch=x86_64 --command=gio dev.lizardbyte.app.Sunshine launch /app/share/applications/dev.lizardbyte.app.Sunshine_kms.desktop
gio: Unable to load application information for ‘/app/share/applications/dev.lizardbyte.app.Sunshine_kms.desktop‘
@programmablereya programmablereya changed the title Flatpak application does not run Flatpak application does not run and has an invalid icon Jan 19, 2025
@ReenigneArcher
Copy link
Member

Unclear what needs to be done to fix the Exec= line.

This is difficult since the UI port for Sunshine can be changed.

@ReenigneArcher
Copy link
Member

I put up a PR to address the svg issue. Can you test it once the build is complete?

@ReenigneArcher
Copy link
Member

I get these messages in the build log as well. Seems like the tray icon won't work properly either.

Finishing app
Not exporting share/applications/dev.lizardbyte.app.Sunshine_kms.desktop, non-allowed export filename
Not exporting share/applications/dev.lizardbyte.app.Sunshine_terminal.desktop, non-allowed export filename
Exporting share/applications/dev.lizardbyte.app.Sunshine.desktop
Not exporting share/icons/hicolor/scalable/status/sunshine-pausing.svg, non-allowed export filename
Not exporting share/icons/hicolor/scalable/status/sunshine-locked.svg, non-allowed export filename
Not exporting share/icons/hicolor/scalable/status/sunshine-playing.svg, non-allowed export filename
Not exporting share/icons/hicolor/scalable/status/sunshine-tray.svg, non-allowed export filename
Exporting share/icons/hicolor/scalable/apps/dev.lizardbyte.app.Sunshine.svg
Exporting share/metainfo/dev.lizardbyte.app.Sunshine.metainfo.xml
Please review the exported files and the metadata
Committing stage finish to cache
Exporting dev.lizardbyte.app.Sunshine to repo
WARNING: Binary not found for Exec line in /home/runner/work/Sunshine/Sunshine/build/build-sunshine/export/share/applications/dev.lizardbyte.app.Sunshine.desktop: dev.lizardbyte.app.Sunshine

@programmablereya
Copy link
Author

I can definitely test it - looks like the build didn't produce an artifact with the flatpak, though? Unless there's something that I'm missing about how to get hold of that!

@ReenigneArcher
Copy link
Member

@programmablereya thanks! The flatpak linter is complaining about the updated desktop file, hopefully I have satisfied that now. The build is in process again: https://github.com/LizardByte/Sunshine/actions/runs/12856505692/job/35843263796?pr=3561

@ReenigneArcher
Copy link
Member

ReenigneArcher commented Jan 19, 2025

Okay, the lint fails because "flatpak" is in the desktop file 🤷‍♂

https://docs.flathub.org/docs/for-app-authors/linter/#desktop-file-exec-has-flatpak-run

@ReenigneArcher
Copy link
Member

I think I have a solution. I will work on it in the next few days.

@ReenigneArcher
Copy link
Member

@programmablereya Okay, I think there is progress.

Still an issue with the status icons though. I might need to reach out to the flatpak people on that.

Finishing app
Exporting share/applications/dev.lizardbyte.app.Sunshine.desktop
Exporting share/icons/hicolor/scalable/apps/dev.lizardbyte.app.Sunshine.svg
Not exporting share/icons/hicolor/scalable/status/sunshine-tray.svg, non-allowed export filename
Not exporting share/icons/hicolor/scalable/status/sunshine-locked.svg, non-allowed export filename
Not exporting share/icons/hicolor/scalable/status/sunshine-pausing.svg, non-allowed export filename
Not exporting share/icons/hicolor/scalable/status/sunshine-playing.svg, non-allowed export filename
Exporting share/metainfo/dev.lizardbyte.app.Sunshine.metainfo.xml
Please review the exported files and the metadata
Committing stage finish to cache
Exporting dev.lizardbyte.app.Sunshine to repo

Can you test it? https://github.com/LizardByte/Sunshine/actions/runs/12871812955?pr=3561

If possible can you test both the standard method, and the kms method? For reference this is the new desktop file: https://github.com/LizardByte/Sunshine/pull/3561/files#diff-8c2ac7ddc3d85265d96ca5c2e2f05a27175a062427b4b35d7ea517d68450eb64

@ReenigneArcher
Copy link
Member

ReenigneArcher commented Jan 20, 2025

Actually, this should help with the status icons. I'll get that taken care of shortly. https://docs.flatpak.org/en/latest/manifests.html#file-renaming

flatpak/flatpak#5468

@ReenigneArcher
Copy link
Member

New build with icons fixed. https://github.com/LizardByte/Sunshine/actions/runs/12873769335?pr=3561

I will wait until I get confirmation that this works before merging.

@programmablereya
Copy link
Author

(Keep reading - a problem came up while I was writing this)

Beautiful! Icons work perfectly - no need to open the admin UI as long as the tray icon appears. (Presumably not having a valid icon is what was tripping it up and making the tray icon fail to appear before.) Thanks for getting this set up!

Sunshine icon in the launcher
Sunshine icon in the tray

... Hmm. Perhaps I speak too soon. A minute or so after being started, it seems to crash. There's no output in the logs that suggests what exactly is going wrong; the exit code is 137, which would suggest it's being killed - but by whomst? There's no log of it being killed by OOM, and that would make little sense unless the Flatpak has a very low memory ceiling - there's still 57GB of RAM open out of 62.4GB, and Sunshine never used more than ~0.2% of it, per htop.

Installing the .deb version on the same machine and running that doesn't cause this problem; it lasts just fine.

Logs from the first run I did in the terminal:

# reya @ kugane in ~ [14:08:19]                                                                                       
$ flatpak run dev.lizardbyte.app.Sunshine
[2025-01-20 14:10:44.237]: Info: Sunshine version: 0.0.0.0a3cdb995ab04358422f8c79ec6868b215ba51a1                     
[2025-01-20 14:10:44.237]: Info: Package Publisher: LizardByte                                                        
[2025-01-20 14:10:44.237]: Info: Publisher Website: https://app.lizardbyte.dev                                        
[2025-01-20 14:10:44.237]: Info: Get support: https://app.lizardbyte.dev/support                                      
Cannot load libcuda.so.1                                                                                              
[2025-01-20 14:10:44.238]: Error: Couldn't load cuda: -1                                                              
[2025-01-20 14:10:44.238]: Error: Failed to gain CAP_SYS_ADMIN                                                        
[2025-01-20 14:10:44.239]: Info: /dev/dri/card1 -> i915                                                               
[2025-01-20 14:10:44.239]: Error: Failed to gain CAP_SYS_ADMIN                                                        
[2025-01-20 14:10:44.239]: Error: Couldn't get handle for DRM Framebuffer [281]: Probably not permitted               
[2025-01-20 14:10:44.239]: Error: 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                             
[2025-01-20 14:10:44.239]: Error: Environment variable WAYLAND_DISPLAY has not been defined 
[2025-01-20 14:10:44.239]: Info: Detecting displays
[2025-01-20 14:10:44.261]: Info: Detected display: eDP-1 (id: 0)eDP-1 connected: true                                 
[2025-01-20 14:10:44.261]: Info: Detected display: DP-1 (id: 1)DP-1 connected: false                                  
[2025-01-20 14:10:44.261]: Info: Detected display: DP-2 (id: 2)DP-2 connected: false                                  
[2025-01-20 14:10:44.261]: Info: Detected display: HDMI-1 (id: 3)HDMI-1 connected: false                              
[2025-01-20 14:10:44.261]: Info: Detected display: DP-3 (id: 4)DP-3 connected: false                                  
[2025-01-20 14:10:44.287]: Warning: Gamepad ds5 is disabled due to Permission denied                                  
[2025-01-20 14:10:44.287]: Info: // Testing for available encoders, this may generate errors. You can safely ignore th
ose errors. //                                                                                                        
[2025-01-20 14:10:44.287]: Info: Trying encoder [nvenc]                                                               
[2025-01-20 14:10:44.287]: Info: Screencasting with X11                                                               
[2025-01-20 14:10:44.288]: Info: Creating encoder [h264_nvenc]                                                        
[2025-01-20 14:10:44.288]: Info: Color coding: SDR (Rec. 601)                                                         
[2025-01-20 14:10:44.288]: Info: Color depth: 8-bit                                                                   
[2025-01-20 14:10:44.288]: Info: Color range: JPEG                                                                    
Cannot load libcuda.so.1                                                                                              
[2025-01-20 14:10:44.288]: Error: Couldn't load cuda: -1                                                              
[2025-01-20 14:10:44.288]: Info: Creating encoder [h264_nvenc]                                                        
[2025-01-20 14:10:44.288]: Info: Color coding: SDR (Rec. 601)                                                         
[2025-01-20 14:10:44.288]: Info: Color depth: 8-bit                                                                   
[2025-01-20 14:10:44.288]: Info: Color range: JPEG                                                                    
Cannot load libcuda.so.1                                                                                              
[2025-01-20 14:10:44.288]: Error: Couldn't load cuda: -1                                                              
[2025-01-20 14:10:44.288]: Info: Encoder [nvenc] failed                                                               
[2025-01-20 14:10:44.288]: Info: Trying encoder [vaapi]                                                               
[2025-01-20 14:10:44.288]: Info: Screencasting with X11                                                               
[2025-01-20 14:10:44.290]: Info: Creating encoder [h264_vaapi]                                                        
[2025-01-20 14:10:44.290]: Info: Color coding: SDR (Rec. 601)                                                         
[2025-01-20 14:10:44.290]: Info: Color depth: 8-bit                                                                   
[2025-01-20 14:10:44.290]: Info: Color range: JPEG                                                                    
libva info: VA-API version 1.19.0                                                                                     
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so                                             
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/iHD_drv_video.so                          
libva info: Found init function __vaDriverInit_1_19                                                                   
libva info: va_openDriver() returns 0                                                                                 
[2025-01-20 14:10:44.311]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 23.4.3 ()                 
[2025-01-20 14:10:44.311]: Info: Using normal encoding mode                                                           
[2025-01-20 14:10:44.311]: Info: Using VBR with single frame VBV size                                                 
Gtk-Message: 14:10:44.323: Failed to load module "canberra-gtk-module"                                                
Gtk-Message: 14:10:44.325: Failed to load module "canberra-gtk-module"                                                
[2025-01-20 14:10:44.328]: Info: System tray created                                                                  
[2025-01-20 14:10:44.352]: Info: Creating encoder [hevc_vaapi]                                                        
[2025-01-20 14:10:44.352]: Info: Color coding: SDR (Rec. 601)                                                         
[2025-01-20 14:10:44.352]: Info: Color depth: 8-bit                                                                   
[2025-01-20 14:10:44.352]: Info: Color range: JPEG                                                                    
libva info: VA-API version 1.19.0                                                                                     
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so                                             
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/iHD_drv_video.so                          
libva info: Found init function __vaDriverInit_1_19                                                                   
libva info: va_openDriver() returns 0                                                                                 
[2025-01-20 14:10:44.364]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 23.4.3 ()                 
[2025-01-20 14:10:44.364]: Info: Using normal encoding mode                                                           
[2025-01-20 14:10:44.364]: Info: Using VBR with single frame VBV size                                                 
[2025-01-20 14:10:44.411]: Info: Creating encoder [av1_vaapi]                                                         
[2025-01-20 14:10:44.411]: Info: Color coding: SDR (Rec. 601)                                                         
[2025-01-20 14:10:44.411]: Info: Color depth: 8-bit                                                                   
[2025-01-20 14:10:44.411]: Info: Color range: JPEG                                                                    
libva info: VA-API version 1.19.0                                                                                     
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so                                             
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/iHD_drv_video.so 
libva info: Found init function __vaDriverInit_1_19
libva info: va_openDriver() returns 0
[2025-01-20 14:10:44.420]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 23.4.3 ()
[2025-01-20 14:10:44.420]: Info: Using normal encoding mode
[2025-01-20 14:10:44.420]: Info: Using VBR with single frame VBV size
[2025-01-20 14:10:44.420]: Warning: [av1_vaapi @ 0x5ca7528e1140] Multiple slices were requested but this codec does not support controlling slices.
[2025-01-20 14:10:44.464]: Info: Screencasting with X11
[2025-01-20 14:10:44.464]: Info: Creating encoder [hevc_vaapi]
[2025-01-20 14:10:44.464]: Info: Color coding: SDR (Rec. 709)
[2025-01-20 14:10:44.464]: Info: Color depth: 10-bit
[2025-01-20 14:10:44.464]: Info: Color range: JPEG
libva info: VA-API version 1.19.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_19
libva info: va_openDriver() returns 0
[2025-01-20 14:10:44.474]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 23.4.3 ()
[2025-01-20 14:10:44.474]: Info: Using normal encoding mode
[2025-01-20 14:10:44.474]: Info: Using VBR with single frame VBV size
[2025-01-20 14:10:44.516]: Info: Creating encoder [av1_vaapi]
[2025-01-20 14:10:44.516]: Info: Color coding: SDR (Rec. 709)
[2025-01-20 14:10:44.516]: Info: Color depth: 10-bit
[2025-01-20 14:10:44.516]: Info: Color range: JPEG
libva info: VA-API version 1.19.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_19
libva info: va_openDriver() returns 0
[2025-01-20 14:10:44.525]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 23.4.3 ()
[2025-01-20 14:10:44.525]: Info: Using normal encoding mode
[2025-01-20 14:10:44.525]: Info: Using VBR with single frame VBV size
[2025-01-20 14:10:44.525]: Warning: [av1_vaapi @ 0x5ca7528e1140] Multiple slices were requested but this codec does not support controlling slices.
[2025-01-20 14:10:44.565]: Info: 
[2025-01-20 14:10:44.565]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025-01-20 14:10:44.565]: Info: 
[2025-01-20 14:10:44.565]: Info: Found H.264 encoder: h264_vaapi [vaapi]
[2025-01-20 14:10:44.565]: Info: Found HEVC encoder: hevc_vaapi [vaapi]
[2025-01-20 14:10:44.565]: Info: Found AV1 encoder: av1_vaapi [vaapi]
[2025-01-20 14:10:44.571]: Info: Configuration UI available at [https://localhost:47990]
[2025-01-20 14:10:44.571]: Info: Adding avahi service kugane
[2025-01-20 14:10:45.506]: Info: Avahi service kugane successfully established.

# reya @ kugane in ~ [14:11:27] C:137
$ 

The Debug version doesn't work at all (unless I'm misunderstanding its purpose):

# reya @ kugane in ~ [14:12:34] 
$ flatpak install Downloads/sunshine_debug_x86_64.flatpak 


        ID                                        Branch         Op         Remote              Download
 1. [✓] dev.lizardbyte.app.Sunshine.Debug         master         i          debug-origin        0 bytes

Installation complete.

# reya @ kugane in ~ [14:15:50] C:1
$ flatpak run --command=additional-install.sh dev.lizardbyte.app.Sunshine.Debug
bwrap: execvp additional-install.sh: No such file or directory

# reya @ kugane in ~ [14:16:23] C:1
$ flatpak run dev.lizardbyte.app.Sunshine.Debug                          
bwrap: execvp /bin/sh: No such file or directory

And running again with a fresh install (with the Debug flatpak still installed) and making sure to do the additional-install first...

# reya @ kugane in ~ [14:16:39]
$ flatpak install Downloads/sunshine_x86_64.flatpak                                                                   
                                                                                                                      
dev.lizardbyte.app.Sunshine permissions:                                                                              
    ipc                      network                         fallback-x11          pulseaudio                         
    wayland                  x11                             devices               file access [1]                    
    dbus access [2]          system dbus access [3]                                                                   
                                                                                                                      
    [1] home                                                                                                          
    [2] org.freedesktop.Flatpak                                                                                       
    [3] org.freedesktop.Avahi                                                                                         
                                                                                                                      
                                                                                                                      
        ID                                   Branch         Op         Remote                   Download              
 1. [✓] dev.lizardbyte.app.Sunshine          master         i          sunshine1-origin         0 bytes               
                                                                                                                      
Installation complete.                                                                                                
                                                                                                                      
# reya @ kugane in ~ [14:17:42]                                                                                       
$ flatpak run --command=additional-install.sh dev.lizardbyte.app.Sunshine                                             
Sunshine User Service has been installed.                                                                             
Use [systemctl --user enable sunshine] once to autostart Sunshine on login.                                           
Configuring mouse permission.                                                                                         
Restart computer for mouse permission to take effect.                                                                 
                                                                                                                      
# reya @ kugane in ~ [14:17:49]                                                                                       
$ systemctl --user enable sunshine                                                                                    
Removed /home/reya/.config/systemd/user/xdg-desktop-autostart.target.wants/sunshine.service.                          
Created symlink /home/reya/.config/systemd/user/xdg-desktop-autostart.target.wants/sunshine.service → /home/reya/.conf
ig/systemd/user/sunshine.service.                                                                                     
                                                                                                                      
# reya @ kugane in ~ [14:18:01]                                                                                       
$ flatpak run dev.lizardbyte.app.Sunshine                                                                             
[2025-01-20 14:19:14.513]: Info: Sunshine version: 0.0.0.0a3cdb995ab04358422f8c79ec6868b215ba51a1                     
[2025-01-20 14:19:14.513]: Info: Package Publisher: LizardByte                                                        
[2025-01-20 14:19:14.513]: Info: Publisher Website: https://app.lizardbyte.dev                                        
[2025-01-20 14:19:14.513]: Info: Get support: https://app.lizardbyte.dev/support                                      
Cannot load libcuda.so.1                                                                                              
[2025-01-20 14:19:14.514]: Error: Couldn't load cuda: -1                                                              
[2025-01-20 14:19:14.514]: Error: Failed to gain CAP_SYS_ADMIN                                                        
[2025-01-20 14:19:14.514]: Info: /dev/dri/card1 -> i915                                                               
[2025-01-20 14:19:14.514]: Error: Failed to gain CAP_SYS_ADMIN                                                        
[2025-01-20 14:19:14.514]: Error: Couldn't get handle for DRM Framebuffer [283]: Probably not permitted               
[2025-01-20 14:19:14.514]: Error: 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
[2025-01-20 14:19:14.514]: Error: Environment variable WAYLAND_DISPLAY has not been defined
[2025-01-20 14:19:14.514]: Info: Detecting displays
[2025-01-20 14:19:14.525]: Info: Detected display: eDP-1 (id: 0)eDP-1 connected: true
[2025-01-20 14:19:14.525]: Info: Detected display: DP-1 (id: 1)DP-1 connected: false
[2025-01-20 14:19:14.525]: Info: Detected display: DP-2 (id: 2)DP-2 connected: false
[2025-01-20 14:19:14.525]: Info: Detected display: HDMI-1 (id: 3)HDMI-1 connected: false
[2025-01-20 14:19:14.525]: Info: Detected display: DP-3 (id: 4)DP-3 connected: false
[2025-01-20 14:19:14.541]: Warning: Gamepad ds5 is disabled due to Permission denied                          [36/271]
[2025-01-20 14:19:14.541]: Info: // Testing for available encoders, this may generate errors. You can safely ignore th
ose errors. //
[2025-01-20 14:19:14.541]: Info: Trying encoder [nvenc]
[2025-01-20 14:19:14.541]: Info: Screencasting with X11
[2025-01-20 14:19:14.545]: Info: Creating encoder [h264_nvenc]
[2025-01-20 14:19:14.545]: Info: Color coding: SDR (Rec. 601)
[2025-01-20 14:19:14.545]: Info: Color depth: 8-bit
Cannot load libcuda.so.1
[2025-01-20 14:19:14.545]: Info: Color range: JPEG
[2025-01-20 14:19:14.545]: Error: Couldn't load cuda: -1
Cannot load libcuda.so.1
[2025-01-20 14:19:14.545]: Info: Creating encoder [h264_nvenc]
[2025-01-20 14:19:14.545]: Info: Color coding: SDR (Rec. 601)
[2025-01-20 14:19:14.545]: Info: Color depth: 8-bit
[2025-01-20 14:19:14.545]: Info: Color range: JPEG
[2025-01-20 14:19:14.545]: Error: Couldn't load cuda: -1
[2025-01-20 14:19:14.545]: Info: Encoder [nvenc] failed
[2025-01-20 14:19:14.545]: Info: Trying encoder [vaapi]
[2025-01-20 14:19:14.545]: Info: Screencasting with X11
[2025-01-20 14:19:14.546]: Info: Creating encoder [h264_vaapi]
[2025-01-20 14:19:14.546]: Info: Color coding: SDR (Rec. 601)
[2025-01-20 14:19:14.546]: Info: Color depth: 8-bit
[2025-01-20 14:19:14.546]: Info: Color range: JPEG
libva info: VA-API version 1.19.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_19
libva info: va_openDriver() returns 0
[2025-01-20 14:19:14.558]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 23.4.3 ()
[2025-01-20 14:19:14.558]: Info: Using normal encoding mode 
[2025-01-20 14:19:14.558]: Info: Using VBR with single frame VBV size
Gtk-Message: 14:19:14.572: Failed to load module "canberra-gtk-module"
Gtk-Message: 14:19:14.572: Failed to load module "canberra-gtk-module"
[2025-01-20 14:19:14.574]: Info: System tray created
[2025-01-20 14:19:14.597]: Info: Creating encoder [hevc_vaapi]
[2025-01-20 14:19:14.597]: Info: Color coding: SDR (Rec. 601)
[2025-01-20 14:19:14.597]: Info: Color depth: 8-bit
[2025-01-20 14:19:14.597]: Info: Color range: JPEG
libva info: VA-API version 1.19.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_19
libva info: va_openDriver() returns 0
[2025-01-20 14:19:14.620]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 23.4.3 ()
[2025-01-20 14:19:14.620]: Info: Using normal encoding mode 
[2025-01-20 14:19:14.620]: Info: Using VBR with single frame VBV size
[2025-01-20 14:19:14.673]: Info: Creating encoder [av1_vaapi]
[2025-01-20 14:19:14.673]: Info: Color coding: SDR (Rec. 601)
[2025-01-20 14:19:14.673]: Info: Color depth: 8-bit
[2025-01-20 14:19:14.673]: Info: Color range: JPEG
libva info: VA-API version 1.19.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_19
libva info: va_openDriver() returns 0
[2025-01-20 14:19:14.683]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 23.4.3 ()
[2025-01-20 14:19:14.683]: Info: Using normal encoding mode 
[2025-01-20 14:19:14.683]: Info: Using VBR with single frame VBV size
[2025-01-20 14:19:14.683]: Warning: [av1_vaapi @ 0x5cbaf37558c0] Multiple slices were requested but this codec does no
t support controlling slices. 
[2025-01-20 14:19:14.734]: Info: Screencasting with X11
[2025-01-20 14:19:14.735]: Info: Creating encoder [hevc_vaapi]
[2025-01-20 14:19:14.735]: Info: Color coding: SDR (Rec. 709)
2025-01-20 14:19:14.735]: Info: Color depth: 10-bit
[2025-01-20 14:19:14.735]: Info: Color range: JPEG
libva info: VA-API version 1.19.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_19
libva info: va_openDriver() returns 0
[2025-01-20 14:19:14.745]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 23.4.3 ()
[2025-01-20 14:19:14.745]: Info: Using normal encoding mode
[2025-01-20 14:19:14.745]: Info: Using VBR with single frame VBV size
[2025-01-20 14:19:14.791]: Info: Creating encoder [av1_vaapi]
[2025-01-20 14:19:14.791]: Info: Color coding: SDR (Rec. 709)
[2025-01-20 14:19:14.791]: Info: Color depth: 10-bit
[2025-01-20 14:19:14.791]: Info: Color range: JPEG
libva info: VA-API version 1.19.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/intel-vaapi-driver/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_19
libva info: va_openDriver() returns 0
[2025-01-20 14:19:14.801]: Info: vaapi vendor: Intel iHD driver for Intel(R) Gen Graphics - 23.4.3 ()
[2025-01-20 14:19:14.801]: Info: Using normal encoding mode
[2025-01-20 14:19:14.801]: Info: Using VBR with single frame VBV size
[2025-01-20 14:19:14.801]: Warning: [av1_vaapi @ 0x5cbaf37558c0] Multiple slices were requested but this codec does not support controlling slices.
[2025-01-20 14:19:14.837]: Info: 
[2025-01-20 14:19:14.837]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025-01-20 14:19:14.837]: Info: 
[2025-01-20 14:19:14.837]: Info: Found H.264 encoder: h264_vaapi [vaapi]
[2025-01-20 14:19:14.837]: Info: Found HEVC encoder: hevc_vaapi [vaapi]
[2025-01-20 14:19:14.837]: Info: Found AV1 encoder: av1_vaapi [vaapi]
[2025-01-20 14:19:14.840]: Info: Adding avahi service kugane
[2025-01-20 14:19:14.840]: Info: Configuration UI available at [https://localhost:47990]
[2025-01-20 14:19:15.776]: Info: Avahi service kugane successfully established.

# reya @ kugane in ~ [14:21:42] C:137
$ 

@programmablereya
Copy link
Author

Scratch that, I think I figured out what it is - it's the gnome run-in-background killer. Apparently that remembers the choice you make and happily murders any new process started from that flatpak later. All good!

@programmablereya
Copy link
Author

programmablereya commented Jan 20, 2025 via email

@ReenigneArcher
Copy link
Member

Awesome! I will get it merged, and hopefully get a patch release out in a few days (probably going to wait to see if anything else up comes up with the latest stable).

@ReenigneArcher
Copy link
Member

Just to verify... did you also test the kms version? I am not too familiar with how this works, but supposedly there is a kms entry in the desktop file. I think it requires right clicking on the main application?

@programmablereya
Copy link
Author

I think it requires right clicking on the main application?

Can confirm, this worked! :) I had to use the other application launcher but I did find it!

Just to verify... did you also test the kms version? I am not too familiar with how this works, but supposedly there is a kms entry in the desktop file.

The KMS version doesn't seem to start at all - the Run in Terminal option does start Sunshine, but it does not open a terminal. So I can't see the KMS version's debug log. Going to crack open the desktop file by hand and try to start it from a terminal to see what's going wrong.

@ReenigneArcher
Copy link
Member

I guess it might not work because it needs sudo.

@programmablereya
Copy link
Author

Seems correct, yeah!

# reya @ kugane in ~ [15:29:29] 
$ /usr/bin/flatpak run --branch=master --arch=x86_64 --command=sunshine-kms.sh dev.lizardbyte.app.Sunshine
Sunshine is already running, opening the web interface...

# reya @ kugane in ~ [15:29:31] 
$ /usr/bin/flatpak run --branch=master --arch=x86_64 --command=sunshine-kms.sh dev.lizardbyte.app.Sunshine
/app/bin/sunshine-kms.sh: line 7: sudo: command not found

# reya @ kugane in ~ [15:29:38] C:127
$ 

@ReenigneArcher
Copy link
Member

Thanks for confirming. I'll remove that part for now.

@programmablereya
Copy link
Author

I can file a separate bug for this, but the service doesn't work, actually:

Jan 20 15:51:34 kugane systemd[1731]: Starting Self-hosted game stream host for Moonlight...
Jan 20 15:51:39 kugane systemd[1731]: Started Self-hosted game stream host for Moonlight.
Jan 20 15:51:39 kugane systemd[20823]: sunshine.service: Failed to locate executable dev.lizardbyte.app.Sunshine: No such file or directory
Jan 20 15:51:39 kugane systemd[20823]: sunshine.service: Failed at step EXEC spawning dev.lizardbyte.app.Sunshine: No such file or directory
Jan 20 15:51:39 kugane systemd[1731]: sunshine.service: Main process exited, code=exited, status=203/EXEC
Jan 20 15:51:39 kugane systemd[1731]: sunshine.service: Failed with result 'exit-code'.
Jan 20 15:51:45 kugane systemd[1731]: sunshine.service: Scheduled restart job, restart counter is at 1.
Jan 20 15:51:45 kugane systemd[1731]: Stopped Self-hosted game stream host for Moonlight.

@ReenigneArcher
Copy link
Member

No need to file a new bug. I'll get it addressed in this PR.

@ReenigneArcher
Copy link
Member

For the service issue, can you try this one? https://github.com/LizardByte/Sunshine/actions/runs/12876265412?pr=3561

@programmablereya
Copy link
Author

Alas, no dice:

Jan 20 17:46:03 kugane systemd[1731]: Starting Self-hosted game stream host for Moonlight...
Jan 20 17:46:08 kugane systemd[1731]: Started Self-hosted game stream host for Moonlight.
Jan 20 17:46:08 kugane systemd[58008]: sunshine.service: Failed to locate executable /app/bin/sunshine: No such file >
Jan 20 17:46:08 kugane systemd[58008]: sunshine.service: Failed at step EXEC spawning /app/bin/sunshine: No such file>
Jan 20 17:46:08 kugane systemd[1731]: sunshine.service: Main process exited, code=exited, status=203/EXEC
Jan 20 17:46:08 kugane systemd[1731]: sunshine.service: Failed with result 'exit-code'.
Jan 20 17:46:13 kugane systemd[1731]: sunshine.service: Scheduled restart job, restart counter is at 1.

Install logs (installed over the previous flatpak):

# reya @ kugane in ~ [17:13:59]                                                                                       
$ flatpak install Downloads/sunshine_x86_64.flatpak                                                                   
                                                                                                                      
dev.lizardbyte.app.Sunshine permissions:                                                                              
    ipc                      network                         fallback-x11          pulseaudio                         
    wayland                  x11                             devices               file access [1]                    
    dbus access [2]          system dbus access [3]                                                                   
                                                                                                                      
    [1] home                                                                                                          
    [2] org.freedesktop.Flatpak                                                                                       
    [3] org.freedesktop.Avahi                                                                                         
                                                                                                                      
                                                                                                                      
        ID                                   Branch         Op         Remote                   Download              
 1. [✓] dev.lizardbyte.app.Sunshine          master         i          sunshine1-origin         0 bytes               
                                                                                                                      
Installation complete.                                                                                                

# reya @ kugane in ~ [17:45:50] 
$ flatpak install Downloads/sunshine_x86_64.flatpak     

# reya @ kugane in ~ [17:45:52] C:130
$ flatpak run --command=additional-install.sh dev.lizardbyte.app.Sunshine
Sunshine User Service has been installed.
Use [systemctl --user enable sunshine] once to autostart Sunshine on login.
Configuring mouse permission. 
Restart computer for mouse permission to take effect.

# reya @ kugane in ~ [17:45:57] 
$ systemctl --user enable --now sunshine

@ReenigneArcher
Copy link
Member

@programmablereya
Copy link
Author

Tragically not u_u Heck!!

Jan 20 18:26:26 kugane systemd[1731]: Starting Self-hosted game stream host for Moonlight...
Jan 20 18:26:31 kugane systemd[1731]: Started Self-hosted game stream host for Moonlight.
Jan 20 18:26:31 kugane systemd[82898]: sunshine.service: Failed to locate executable sunshine: No such file or directory
Jan 20 18:26:31 kugane systemd[82898]: sunshine.service: Failed at step EXEC spawning sunshine: No such file or directory
Jan 20 18:26:31 kugane systemd[1731]: sunshine.service: Main process exited, code=exited, status=203/EXEC
Jan 20 18:26:31 kugane systemd[1731]: sunshine.service: Failed with result 'exit-code'.
Jan 20 18:26:37 kugane systemd[1731]: sunshine.service: Scheduled restart job, restart counter is at 1.
Jan 20 18:26:37 kugane systemd[1731]: Stopped Self-hosted game stream host for Moonlight.

@ReenigneArcher
Copy link
Member

ReenigneArcher commented Jan 20, 2025

I really have no idea then. This exec statement should be identical to the current flathub version (still on v0.23.1 due to a flathub build bot issue).

@ReenigneArcher
Copy link
Member

I have one thing to try.

@ReenigneArcher
Copy link
Member

Can you edit the service file to this and see if it works? I don't think we need to wait for the build from GitHub for this.

ExecStart=flatpak run --command=sunshine dev.lizardbyte.app.Sunshine

@programmablereya
Copy link
Author

Success!! That did it!

@ReenigneArcher
Copy link
Member

I was initially confused and was thinking flatpak controlled the service like they do with the desktop file.

Thanks for your patience and testing everything. This fix should be merged shortly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants