Sunshine icon indicating copy to clipboard operation
Sunshine copied to clipboard

"Segmentation fault" On start

Open Keylessboi opened this issue 3 years ago • 1 comments

Describe the Bug

Im am new to linux and all I know is that it is probably tied to having an AMD gpu or mesa drivers.

Expected Behavior

No response

Additional Context

No response

Host Operating System

Linux

Operating System Version

Pop_Os! By system76

Architecture

64 bit

Sunshine Version

0.14.1

GPU Type

AMD

GPU Model

RX 5500 XT

GPU Driver/Mesa Version

22.2.1 or 4.6 (OPENGL)

Capture Method (Linux Only)

Unsure

Relevant log output

[2022:10:15:17:17:01]: Error: Couldn't initialize cuda: CUDA_ERROR_NO_DEVICE:no CUDA-capable device is detected
[2022:10:15:17:17:01]: Error: Environment variable WAYLAND_DISPLAY has not been defined
[2022:10:15:17:17:01]: Info: Detecting connected monitors
[2022:10:15:17:17:01]: Info: //////////////////////////////////////////////////////////////////
[2022:10:15:17:17:01]: Info: //                                                              //
[2022:10:15:17:17:01]: Info: //   Testing for available encoders, this may generate errors.  //
[2022:10:15:17:17:01]: Info: //   You can safely ignore those errors.                        //
[2022:10:15:17:17:01]: Info: //                                                              //
[2022:10:15:17:17:01]: Info: //////////////////////////////////////////////////////////////////
[2022:10:15:17:17:01]: Info: Trying encoder [nvenc]
[2022:10:15:17:17:01]: Info: Screencasting with KMS
[2022:10:15:17:17:01]: Info: Found monitor for DRM screencasting
[2022:10:15:17:17:01]: Info: Color coding [Rec. 601]
[2022:10:15:17:17:01]: Info: Color range: [JPEG]
[2022:10:15:17:17:03]: Error: Failed to create a CUDA device: Unknown error occurred
[2022:10:15:17:17:03]: Info: Screencasting with KMS
[2022:10:15:17:17:03]: Info: Found monitor for DRM screencasting
[2022:10:15:17:17:03]: Info: Color coding [Rec. 601]
[2022:10:15:17:17:03]: Info: Color range: [JPEG]
[2022:10:15:17:17:05]: Error: Failed to create a CUDA device: Unknown error occurred
[2022:10:15:17:17:05]: Info: Screencasting with KMS
[2022:10:15:17:17:05]: Info: Found monitor for DRM screencasting
[2022:10:15:17:17:05]: Info: Color coding [Rec. 601]
[2022:10:15:17:17:05]: Info: Color range: [JPEG]
[2022:10:15:17:17:08]: Error: Failed to create a CUDA device: Unknown error occurred
[2022:10:15:17:17:08]: Info: Screencasting with KMS
[2022:10:15:17:17:08]: Info: Found monitor for DRM screencasting
[2022:10:15:17:17:08]: Info: Color coding [Rec. 601]
[2022:10:15:17:17:08]: Info: Color range: [JPEG]
[2022:10:15:17:17:10]: Error: Failed to create a CUDA device: Unknown error occurred
[2022:10:15:17:17:10]: Info: Encoder [nvenc] failed
[2022:10:15:17:17:10]: Info: Trying encoder [vaapi]
[2022:10:15:17:17:10]: Info: Screencasting with KMS
[2022:10:15:17:17:10]: Info: Found monitor for DRM screencasting
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
libva info: VA-API version 1.14.0
[2022:10:15:17:17:10]: Info: Color coding [Rec. 601]
[2022:10:15:17:17:10]: Info: Color range: [JPEG]
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
Segmentation fault

Keylessboi avatar Oct 15 '22 21:10 Keylessboi

I'm also having a similar issue on Fedora 36. My setup is also using AMD-based GPU (R7 260X).

Cannot load libcuda.so.1
[2022:11:19:21:29:50]: Error: Couldn't load cuda: -1
[2022:11:19:21:29:50]: Warning: Couldn't expose some properties for card: /dev/dri/card0
[2022:11:19:21:29:50]: Error: Environment variable WAYLAND_DISPLAY has not been defined
[2022:11:19:21:29:50]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2022:11:19:21:29:50]: Info: Trying encoder [nvenc]
[2022:11:19:21:29:50]: Info: Screencasting with KMS
[2022:11:19:21:29:50]: Warning: Couldn't expose some properties for card: /dev/dri/card0
[2022:11:19:21:29:50]: Info: Found monitor for DRM screencasting
[2022:11:19:21:29:50]: Info: Color coding [Rec. 601]
[2022:11:19:21:29:50]: Info: Color range: [JPEG]
[2022:11:19:21:29:50]: Error: Failed to create a CUDA device: Unknown error occurred
[2022:11:19:21:29:50]: Info: Screencasting with KMS
[2022:11:19:21:29:50]: Warning: Couldn't expose some properties for card: /dev/dri/card0
[2022:11:19:21:29:50]: Info: Found monitor for DRM screencasting
[2022:11:19:21:29:50]: Info: Color coding [Rec. 601]
[2022:11:19:21:29:50]: Info: Color range: [JPEG]
[2022:11:19:21:29:50]: Error: Failed to create a CUDA device: Unknown error occurred
[2022:11:19:21:29:50]: Info: Screencasting with KMS
[2022:11:19:21:29:50]: Warning: Couldn't expose some properties for card: /dev/dri/card0
[2022:11:19:21:29:50]: Info: Found monitor for DRM screencasting
[2022:11:19:21:29:50]: Info: Color coding [Rec. 601]
[2022:11:19:21:29:50]: Info: Color range: [JPEG]
[2022:11:19:21:29:50]: Error: Failed to create a CUDA device: Unknown error occurred
[2022:11:19:21:29:50]: Info: Screencasting with KMS
[2022:11:19:21:29:50]: Warning: Couldn't expose some properties for card: /dev/dri/card0
[2022:11:19:21:29:50]: Info: Found monitor for DRM screencasting
[2022:11:19:21:29:50]: Info: Color coding [Rec. 601]
[2022:11:19:21:29:50]: Info: Color range: [JPEG]
[2022:11:19:21:29:50]: Error: Failed to create a CUDA device: Unknown error occurred
[2022:11:19:21:29:50]: Info: Encoder [nvenc] failed
[2022:11:19:21:29:50]: Info: Trying encoder [vaapi]
[2022:11:19:21:29:50]: Info: Screencasting with KMS
[2022:11:19:21:29:50]: Warning: Couldn't expose some properties for card: /dev/dri/card0
[2022:11:19:21:29:50]: Info: Found monitor for DRM screencasting
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib64/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
[2022:11:19:21:29:50]: Info: Color coding [Rec. 601]
[2022:11:19:21:29:50]: Info: Color range: [JPEG]
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib64/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
libva info: VA-API version 1.14.0
[2022:11:19:21:29:50]: Info: Screencasting with KMS
libva info: Trying to open /usr/lib64/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_14
[2022:11:19:21:29:50]: Warning: Couldn't expose some properties for card: /dev/dri/card0
[2022:11:19:21:29:50]: Info: Found monitor for DRM screencasting
Segmentation fault (core dumped)

EDIT: @Keylessboi, I appended radeon.si_support=0 radeon.cik_support=0 amdgpu.si_support=1 amdgpu.cik_support=1 to the "GRUB_CMDLINE_LINUX" line in /etc/default/grub to force the amdgpu driver over the radeon driver. After grub2-mkconfig and a reboot, Sunshine started working. Perhaps for your GPU generation, this is what you need to do?

cj0nes avatar Nov 20 '22 03:11 cj0nes

This issue is stale because it has been open for 90 days with no activity. Comment or remove the stale label, otherwise this will be closed in 10 days.

LizardByte-bot avatar Feb 18 '23 10:02 LizardByte-bot

This issue was closed because it has been stalled for 10 days with no activity.

LizardByte-bot avatar Feb 28 '23 10:02 LizardByte-bot