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

Gyro sensors are not working for Sunshine on Linux #3618

Closed
2 tasks done
mdbott opened this issue Jan 31, 2025 · 5 comments
Closed
2 tasks done

Gyro sensors are not working for Sunshine on Linux #3618

mdbott opened this issue Jan 31, 2025 · 5 comments

Comments

@mdbott
Copy link

mdbott commented Jan 31, 2025

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

When I connect to the latest beta release (also tested with prior releases of sunshine on linux) the remote connection works and the virtual gamepad connects to the remote session, however enabling the 2 options

  • Allow use of gamepad motion sensors
  • Emulate gamepad montion sensor support
    only has the effect of changing the emulated device to report as a DS4/5 device. No motion sensor data is received.

The same test with the exact same hardware with the server running window 11 does provide motion sensor data as expected.
Server: Lenovo Legion 7 running CachyOS with latest sunshine beta pkg from https://github.com/LizardByte/pacman-repo
client: Google Pixel 7 pro running lestet moonlight client v12.1 from play store

Expected Behavior

Motion sensor data should be provided to the session.

Additional Context

I have installed the sdl-jstest utility and this is the output when the client is connected
./sdl2-jstest -l
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
Found 1 joystick(s)

Joystick Name: 'DualSense Wireless Controller'
Joystick GUID: 030057564c050000e60c000000006800
Joystick Number: 0
Number of Axes: 6
Number of Buttons: 13
Number of Hats: 1
Number of Balls: 0
GameControllerConfig:
Name: 'DualSense Wireless Controller'
Mapping: '030057564c050000e60c000000006800,*,a:b0,b:b1,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b5,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,touchpad:b11,misc1:b12,crc:5657,platform:Linux,'

Also the virtual gamepad shows up in chrome with the website https://hardwaretester.com/gamepad/

Host Operating System

Linux

Operating System Version

CachyOS 12/24 updated to latest

Architecture

amd64/x86_64

Sunshine commit or version

sunshine --verison 2025-02-01 00:16:13.598

Package

Linux - LizardByte/pacman-repo

GPU Type

NVIDIA

GPU Model

RTX 4090 mobile

GPU Driver/Mesa Version

570.86.16-2/24.3.4-2

Capture Method

KMS (Linux)

Config

~/.config/sunshine/sunshine.conf is 0 bytes. Not sure where the config is stored.

Apps

n/a

Relevant log output

[2025-02-01 00:27:15.714]: Warning: Sunshine is configured to change resolution automatically, but the "Optimize game settings" is not set in the client! Resolution will not be changed.
[2025-02-01 00:27:15.714]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-02-01 00:27:15.714]: Info: Trying encoder [nvenc]
[2025-02-01 00:27:15.714]: Info: Screencasting with KMS
[2025-02-01 00:27:15.714]: Info: /dev/dri/card0 -> nvidia-drm
[2025-02-01 00:27:15.714]: Info: Found monitor for DRM screencasting
[2025-02-01 00:27:15.714]: Info: Found connector ID [106]
[2025-02-01 00:27:15.714]: Info: Found cursor plane [53]
[2025-02-01 00:27:15.715]: Info: Creating encoder [h264_nvenc]
[2025-02-01 00:27:15.715]: Info: Color coding: SDR (Rec. 601)
[2025-02-01 00:27:15.715]: Info: Color depth: 8-bit
[2025-02-01 00:27:15.715]: Info: Color range: JPEG
[2025-02-01 00:27:16.019]: Info: Creating encoder [hevc_nvenc]
[2025-02-01 00:27:16.019]: Info: Color coding: SDR (Rec. 601)
[2025-02-01 00:27:16.019]: Info: Color depth: 8-bit
[2025-02-01 00:27:16.019]: Info: Color range: JPEG
[2025-02-01 00:27:16.289]: Info: Creating encoder [av1_nvenc]
[2025-02-01 00:27:16.289]: Info: Color coding: SDR (Rec. 601)
[2025-02-01 00:27:16.289]: Info: Color depth: 8-bit
[2025-02-01 00:27:16.289]: Info: Color range: JPEG
[2025-02-01 00:27:16.558]: Info: Screencasting with KMS
[2025-02-01 00:27:16.558]: Info: /dev/dri/card0 -> nvidia-drm
[2025-02-01 00:27:16.558]: Info: Found monitor for DRM screencasting
[2025-02-01 00:27:16.558]: Info: Found connector ID [106]
[2025-02-01 00:27:16.558]: Info: Found cursor plane [53]
[2025-02-01 00:27:16.558]: Info: Creating encoder [hevc_nvenc]
[2025-02-01 00:27:16.558]: Info: Color coding: SDR (Rec. 709)
[2025-02-01 00:27:16.558]: Info: Color depth: 10-bit
[2025-02-01 00:27:16.558]: Info: Color range: JPEG
[2025-02-01 00:27:16.829]: Info: Creating encoder [av1_nvenc]
[2025-02-01 00:27:16.829]: Info: Color coding: SDR (Rec. 709)
[2025-02-01 00:27:16.829]: Info: Color depth: 10-bit
[2025-02-01 00:27:16.829]: Info: Color range: JPEG
[2025-02-01 00:27:17.100]: Info: 
[2025-02-01 00:27:17.100]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025-02-01 00:27:17.100]: Info: 
[2025-02-01 00:27:17.100]: Info: Found H.264 encoder: h264_nvenc [nvenc]
[2025-02-01 00:27:17.100]: Info: Found HEVC encoder: hevc_nvenc [nvenc]
[2025-02-01 00:27:17.100]: Info: Found AV1 encoder: av1_nvenc [nvenc]
[2025-02-01 00:27:17.262]: Info: New streaming session started [active sessions: 1]
[2025-02-01 00:27:17.305]: Info: CLIENT CONNECTED
[2025-02-01 00:27:17.358]: Info: /dev/dri/card0 -> nvidia-drm
[2025-02-01 00:27:17.358]: Info: Found display [wayland-0]
[2025-02-01 00:27:17.359]: Info: Found interface: zxdg_output_manager_v1(31) version 3
[2025-02-01 00:27:17.359]: Info: Found interface: wl_output(65) version 4
[2025-02-01 00:27:17.359]: Info: Resolution: 2560x1600
[2025-02-01 00:27:17.359]: Info: Offset: 0x0
[2025-02-01 00:27:17.359]: Info: Logical size: 1707x1067
[2025-02-01 00:27:17.359]: Info: Name: eDP-1
[2025-02-01 00:27:17.359]: Info: Found monitor: BOE 0x0C8B/0x00000068
[2025-02-01 00:27:17.359]: Info: -------- Start of KMS monitor list --------
[2025-02-01 00:27:17.359]: Info: Monitor 0 is eDP-1: BOE 0x0C8B/0x00000068
[2025-02-01 00:27:17.359]: Info: --------- End of KMS monitor list ---------
[2025-02-01 00:27:17.359]: Info: Screencasting with KMS
[2025-02-01 00:27:17.359]: Info: /dev/dri/card0 -> nvidia-drm
[2025-02-01 00:27:17.359]: Info: Found monitor for DRM screencasting
[2025-02-01 00:27:17.359]: Info: Found connector ID [106]
[2025-02-01 00:27:17.359]: Info: Found cursor plane [53]
[2025-02-01 00:27:17.359]: Info: Creating encoder [hevc_nvenc]
[2025-02-01 00:27:17.359]: Info: Color coding: SDR (Rec. 709)
[2025-02-01 00:27:17.359]: Info: Color depth: 8-bit
[2025-02-01 00:27:17.359]: Info: Color range: MPEG
[2025-02-01 00:27:17.743]: Info: Setting default sink to: [sink-sunshine-stereo]
[2025-02-01 00:27:17.743]: Info: Found default monitor by name: sink-sunshine-stereo.monitor
[2025-02-01 00:27:17.755]: Info: Opus initialized: 48 kHz, 2 channels, 512 kbps (total), LOWDELAY
[2025-02-01 00:27:32.144]: Info: Gamepad 0 will be DualShock 5 controller (auto-selected by motion sensor presence)
[2025-02-01 00:27:32.144]: Warning: Gamepad 0 is emulating a DualShock 5 controller, but the client gamepad doesn't have a touchpad
@ReenigneArcher
Copy link
Member

sunshine --verison 2025-02-01 00:16:13.598

This is not a Sunshine version.

@mdbott
Copy link
Author

mdbott commented Jan 31, 2025

The sunshine package version is v2025.130.210222-1 for the lizardbyte-beta/sunshine-git aur package.

@ReenigneArcher
Copy link
Member

Alright... I can help the packagers fix the version in Sunshine if they reach out here.

@mdbott
Copy link
Author

mdbott commented Jan 31, 2025

Looking again at the symptoms I was seeing I think it is the same issue as
#3468
with the controller appearing with no motion sensor inputs. I downloaded and tested the custom AUR package referenced in that issue and, with the addition of the uhid udev rule, I am able to see motion sensor output from my virtual controller.
Thank you, I think this ticket can be closed as fixed.

@mdbott mdbott closed this as completed Jan 31, 2025
@ReenigneArcher
Copy link
Member

Thanks for following up. Should be merged soon

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

No branches or pull requests

2 participants