Skip to content

[REQUEST] keep virtual controller when suspending the session #597

Description

@tm-frs

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 use Sunshine to play games using the emulated controller, and i suspend (not stop) the current session, that virtual controller seems to be removed and re-created when I resume the session. However, this leads to Steam or any/most games I have open at that time to "loose" the controller, so I have to re-start these apps after resuming the session.

Expected Behavior

It would be really nice if the virtual controller was preserved upon suspending the session, such that it just remains there not outputting anything, and being re-used when resuming the session, so you don't have to reopen Steam and anything else that was using the controller.

Additional Context

using sunshine-git from lizardbyte-beta pacman repo

Host Operating System

Linux

Operating System Version

Arch Linux, Kernel 6.12.4-zen1-1-zen

Architecture

amd64/x86_64

Sunshine commit or version

v2024.1214.152703

Package

Linux - LizardByte/pacman-repo

GPU Type

NVIDIA

GPU Model

GeForce RTX 3060

GPU Driver/Mesa Version

nvidia-open-dkms 565.77-2

Capture Method

KMS (Linux)

Config

gamepad = switch
nvenc_preset = 4
channels = 2
address_family = both
output_name = 0
origin_pin_allowed = lan
external_ip = [my ip]

Apps

No response

Relevant log output

[2024-12-16 17:22:55.299]: Info: Sunshine version: v2024.1214.152703
[2024-12-16 17:22:55.299]: Info: Package Publisher: LizardByte
[2024-12-16 17:22:55.299]: Info: Publisher Website: https://app.lizardbyte.dev
[2024-12-16 17:22:55.299]: Info: Get support: https://app.lizardbyte.dev/support
[...]
starting session:
[2024-12-16 17:23:02.889]: Info: Executing Do Cmd: [bash /home/timof/.config/sunshine/prepare_stream.sh]
[2024-12-16 17:23:04.001]: Info: Executing Do Cmd: [bash /home/timof/.config/sunshine/kscreen-scripts/kscreen-doctor_setup-sunshine.sh && kscreen-doctor output.HDMI-A-1.mode.1920x1080@60 output.HDMI-A-1.hdr.disable]
[2024-12-16 17:23:04.730]: Info: Executing [Desktop]
[2024-12-16 17:23:04.890]: Info: New streaming session started [active sessions: 1]
[2024-12-16 17:23:05.023]: Info: CLIENT CONNECTED
[...] session started
virtual controller device is created:
[2024-12-16 17:23:05.168]: Info: Gamepad 0 will be Nintendo Pro controller (manual selection)
[2024-12-16 17:23:05.168]: Warning: Gamepad 0 has motion sensors, but they are not usable when emulating a joypad different from DS5
[...]
suspending session:
[2024-12-16 17:23:32.223]: Info: CLIENT DISCONNECTED
[...]
re-connectig, resuming session:
[2024-12-16 17:23:37.710]: Info: CLIENT CONNECTED
[...] session resumed
another new controller device is created:
[2024-12-16 17:23:37.861]: Info: Gamepad 0 will be Nintendo Pro controller (manual selection)
[2024-12-16 17:23:37.861]: Warning: Gamepad 0 has motion sensors, but they are not usable when emulating a joypad different from DS5
[...]
terminating session:
[2024-12-16 17:24:30.425]: Info: CLIENT DISCONNECTED
[2024-12-16 17:24:30.427]: Info: Setting default sink to: [alsa_output.pci-0000_00_1f.3.analog-stereo-headphones]
[2024-12-16 17:24:33.255]: Info: Executing Undo Cmd: [bash /home/timof/.config/sunshine/kscreen-scripts/kscreen-doctor_setup-default.sh]
[2024-12-16 17:24:34.536]: Info: Executing Undo Cmd: [bash /home/timof/.config/sunshine/finalize_stream.sh]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions