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

No mouse and no keyboard using inputtino on headless computer #3569

Open
2 tasks done
brknkfr opened this issue Jan 20, 2025 · 8 comments
Open
2 tasks done

No mouse and no keyboard using inputtino on headless computer #3569

brknkfr opened this issue Jan 20, 2025 · 8 comments

Comments

@brknkfr
Copy link

brknkfr commented Jan 20, 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

After upgrading to v2025.118.151840 on a debian bookworm system (amd64) with a nvidia gpu, the mouse disappeared and is not reacting when connecting to sunshine with a Moonlight client. I use the AppImage as the sunshine debian package doesn't seem to be that stable.

Workarounds I tried:

  • Start with capture = x11, no change.
  • Plugging in a "real" usb mouse into the computer, no change.
  • Pluggin in a "real" usb keyboard into the computer, no change

Everything worked fine in version 0.23.1.

The computer is a headless server running Xorg and with a dummy HDMI plug.

Expected Behavior

Mouse should be visible an working. Keyboard should be working.

Additional Context

No response

Host Operating System

Linux

Operating System Version

Debian bookworm

Architecture

amd64/x86_64

Sunshine commit or version

v2025.118.151840

Package

Linux - AppImage

GPU Type

Nvidia

GPU Model

Nvidia RTX 3090

GPU Driver/Mesa Version

nvidia version 535.216.01 / mesa 24.2.8

Capture Method

NvFBC (Linux)

Config

encoder = nvenc
min_threads = 8
address_family = both
adapter_name = /dev/dri/renderD129
resolutions = [
    1920x1080,
    2560x1080,
    2560x1440,
    3440x1440,
    1920x1200,
    3840x2160,
    3840x1600
]
fps = [60,90,120]
controller = disabled
native_pen_touch = disabled

Apps

{
  "env": {
    "PATH": "$(PATH):$(HOME)/.local/bin"
  },
  "apps": [
    {
      "name": "Desktop",
      "image-path": "desktop.png"
    },
    {
      "name": "Low Res Desktop",
      "image-path": "desktop.png",
      "prep-cmd": [
        {
          "do": "xrandr --output HDMI-1 --mode 1920x1080",
          "undo": "xrandr --output HDMI-1 --mode 1920x1200"
        }
      ]
    },
    {
      "name": "Steam Big Picture",
      "detached": [
        "setsid steam steam://open/bigpicture"
      ],
      "image-path": "steam.png"
    }
  ]
}

Relevant log output

The relevant log is probably this one:

[2025-01-20 21:13:16.686]: Warning: Unable to create virtual mouse: No such file or directory
[2025-01-20 21:13:16.686]: Warning: Unable to create virtual keyboard: No such file or directory

Full startup log until connection.

[native_pen_touch] -- [disabled]
[controller] -- [disabled]
[fps] -- [[60,90,120]]
[resolutions] -- [[
    1920x1080,
    2560x1080,
    2560x1440,
    3440x1440,
    1920x1200,
    3840x2160,
    3840x1600
]]
[adapter_name] -- [/dev/dri/renderD129]
[address_family] -- [both]
[min_threads] -- [8]
[encoder] -- [nvenc]
[global_prep_cmd] -- [[{"do":"/home/steam/bin/environment.sh","undo":""}]]
[high_resolution_scrolling] -- [disabled]
Warning: Unrecognized configurable option [fps]
Warning: Unrecognized configurable option [resolutions]
[2025-01-20 21:13:16.210]: Info: Sunshine version: v2025.118.151840
[2025-01-20 21:13:16.210]: Info: Package Publisher: LizardByte
[2025-01-20 21:13:16.210]: Info: Publisher Website: https://app.lizardbyte.dev
[2025-01-20 21:13:16.210]: Info: Get support: https://app.lizardbyte.dev/support
Using Vulkan device index 1
Using Vulkan device index 1
[2025-01-20 21:13:16.326]: Info: System tray created
[2025-01-20 21:13:16.527]: Info: Found [1] outputs
[2025-01-20 21:13:16.527]: Info: Virtual Desktop: 1920x1080
[2025-01-20 21:13:16.527]: Info: XrandR: available
[2025-01-20 21:13:16.527]: Info: -- Output --
[2025-01-20 21:13:16.527]: Info:   Resolution: 1920x1080
[2025-01-20 21:13:16.527]: Info:   Offset: 0x0
[2025-01-20 21:13:16.536]: Error: Couldn't release NvFBC context from current thread: 
[2025-01-20 21:13:16.536]: Info: Detecting displays
[2025-01-20 21:13:16.678]: Info: Detected display: HDMI-0 (id: 0)HDMI-0 connected: true
[2025-01-20 21:13:16.678]: Info: Detected display: DP-0 (id: 1)DP-0 connected: false
[2025-01-20 21:13:16.678]: Info: Detected display: DP-1 (id: 2)DP-1 connected: false
[2025-01-20 21:13:16.679]: Info: Detected display: DP-2 (id: 3)DP-2 connected: false
[2025-01-20 21:13:16.679]: Info: Detected display: DP-3 (id: 4)DP-3 connected: false
[2025-01-20 21:13:16.679]: Info: Detected display: DP-4 (id: 5)DP-4 connected: false
[2025-01-20 21:13:16.679]: Info: Detected display: DP-5 (id: 6)DP-5 connected: false
[2025-01-20 21:13:16.686]: Warning: Unable to create virtual mouse: No such file or directory
[2025-01-20 21:13:16.686]: Warning: Unable to create virtual keyboard: No such file or directory
[2025-01-20 21:13:16.686]: Warning: Gamepad xone is disabled due to No such file or directory
[2025-01-20 21:13:16.686]: Warning: Gamepad ds5 is disabled due to No such file or directory
[2025-01-20 21:13:16.686]: Warning: Gamepad switch is disabled due to No such file or directory
[2025-01-20 21:13:16.686]: Warning: No gamepad input is available
[2025-01-20 21:13:16.686]: Info: Trying encoder [nvenc]
[2025-01-20 21:13:16.686]: Info: Screencasting with NvFBC
Using Vulkan device index 1
Using Vulkan device index 1
[2025-01-20 21:13:16.869]: Info: Creating encoder [h264_nvenc]
[2025-01-20 21:13:16.869]: Info: Color coding: SDR (Rec. 601)
[2025-01-20 21:13:16.869]: Info: Color depth: 8-bit
[2025-01-20 21:13:16.869]: Info: Color range: JPEG
[2025-01-20 21:13:16.953]: Info: Creating encoder [hevc_nvenc]
[2025-01-20 21:13:16.953]: Info: Color coding: SDR (Rec. 601)
[2025-01-20 21:13:16.953]: Info: Color depth: 8-bit
[2025-01-20 21:13:16.953]: Info: Color range: JPEG
[2025-01-20 21:13:16.972]: Info: Creating encoder [av1_nvenc]
[2025-01-20 21:13:16.973]: Info: Color coding: SDR (Rec. 601)
[2025-01-20 21:13:16.973]: Info: Color depth: 8-bit
[2025-01-20 21:13:16.973]: Info: Color range: JPEG
[2025-01-20 21:13:16.974]: Warning: [av1_nvenc @ 0x557de5204780] Codec not supported
[2025-01-20 21:13:16.974]: Error: [av1_nvenc @ 0x557de5204780] Provided device doesn't support required NVENC features
[2025-01-20 21:13:16.974]: Error: Could not open codec [av1_nvenc]: Function not implemented
[2025-01-20 21:13:16.983]: Error: Couldn't release NvFBC context from current thread: 
[2025-01-20 21:13:16.983]: Info: Screencasting with NvFBC
Using Vulkan device index 1
Using Vulkan device index 1
[2025-01-20 21:13:17.154]: Info: Creating encoder [hevc_nvenc]
[2025-01-20 21:13:17.154]: Info: Color coding: SDR (Rec. 709)
[2025-01-20 21:13:17.155]: Info: Color depth: 10-bit
[2025-01-20 21:13:17.155]: Info: Color range: JPEG
[2025-01-20 21:13:17.169]: Error: cuda::cuda_t doesn't support any format other than AV_PIX_FMT_NV12
[2025-01-20 21:13:17.184]: Error: Couldn't release NvFBC context from current thread: 
[2025-01-20 21:13:17.184]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-01-20 21:13:17.184]: Info: 
[2025-01-20 21:13:17.184]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025-01-20 21:13:17.184]: Info: 
[2025-01-20 21:13:17.184]: Info: Found H.264 encoder: h264_nvenc [nvenc]
[2025-01-20 21:13:17.184]: Info: Found HEVC encoder: hevc_nvenc [nvenc]
[2025-01-20 21:13:17.188]: Info: Adding avahi service steam
[2025-01-20 21:13:17.203]: Info: Configuration UI available at [https://localhost:47990]
[2025-01-20 21:13:18.186]: Info: Avahi service steam successfully established.
[2025-01-20 21:13:23.974]: Info: Trying encoder [nvenc]
[2025-01-20 21:13:23.974]: Info: Screencasting with NvFBC
Using Vulkan device index 1
Using Vulkan device index 1
[2025-01-20 21:13:24.172]: Info: Creating encoder [h264_nvenc]
[2025-01-20 21:13:24.172]: Info: Color coding: SDR (Rec. 601)
[2025-01-20 21:13:24.172]: Info: Color depth: 8-bit
[2025-01-20 21:13:24.172]: Info: Color range: JPEG
[2025-01-20 21:13:24.201]: Info: Creating encoder [hevc_nvenc]
[2025-01-20 21:13:24.201]: Info: Color coding: SDR (Rec. 601)
[2025-01-20 21:13:24.201]: Info: Color depth: 8-bit
[2025-01-20 21:13:24.201]: Info: Color range: JPEG
[2025-01-20 21:13:24.226]: Info: Creating encoder [av1_nvenc]
[2025-01-20 21:13:24.226]: Info: Color coding: SDR (Rec. 601)
[2025-01-20 21:13:24.226]: Info: Color depth: 8-bit
[2025-01-20 21:13:24.226]: Info: Color range: JPEG
[2025-01-20 21:13:24.229]: Warning: [av1_nvenc @ 0x7faa70be4900] Codec not supported
[2025-01-20 21:13:24.229]: Error: [av1_nvenc @ 0x7faa70be4900] Provided device doesn't support required NVENC features
[2025-01-20 21:13:24.229]: Error: Could not open codec [av1_nvenc]: Function not implemented
[2025-01-20 21:13:24.243]: Error: Couldn't release NvFBC context from current thread: 
[2025-01-20 21:13:24.243]: Info: Screencasting with NvFBC
Using Vulkan device index 1
Using Vulkan device index 1
[2025-01-20 21:13:24.420]: Info: Creating encoder [hevc_nvenc]
[2025-01-20 21:13:24.420]: Info: Color coding: SDR (Rec. 709)
[2025-01-20 21:13:24.420]: Info: Color depth: 10-bit
[2025-01-20 21:13:24.420]: Info: Color range: JPEG
[2025-01-20 21:13:24.430]: Error: cuda::cuda_t doesn't support any format other than AV_PIX_FMT_NV12
[2025-01-20 21:13:24.446]: Error: Couldn't release NvFBC context from current thread: 
[2025-01-20 21:13:24.446]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-01-20 21:13:24.446]: Info: 
[2025-01-20 21:13:24.446]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025-01-20 21:13:24.446]: Info: 
[2025-01-20 21:13:24.446]: Info: Found H.264 encoder: h264_nvenc [nvenc]
[2025-01-20 21:13:24.446]: Info: Found HEVC encoder: hevc_nvenc [nvenc]
[2025-01-20 21:13:24.449]: Info: Executing Do Cmd: [/home/steam/bin/environment.sh]
[2025-01-20 21:13:24.457]: Info: Executing Do Cmd: [/home/steam/bin/environment.sh]
[2025-01-20 21:13:24.469]: Info: Executing [Desktop]
[2025-01-20 21:13:24.476]: Info: New streaming session started [active sessions: 1]
[2025-01-20 21:13:24.477]: Warning: Unable to create virtual touch screen: No such file or directory
[2025-01-20 21:13:24.477]: Warning: Unable to create virtual pen tablet: No such file or directory
[2025-01-20 21:13:24.483]: Info: CLIENT CONNECTED
Using Vulkan device index 1
Using Vulkan device index 1
[2025-01-20 21:13:24.686]: Info: Found [1] outputs
[2025-01-20 21:13:24.687]: Info: Virtual Desktop: 1920x1080
[2025-01-20 21:13:24.687]: Info: XrandR: available
[2025-01-20 21:13:24.687]: Info: -- Output --
[2025-01-20 21:13:24.687]: Info:   Resolution: 1920x1080
[2025-01-20 21:13:24.687]: Info:   Offset: 0x0
[2025-01-20 21:13:24.700]: Error: Couldn't release NvFBC context from current thread: 
[2025-01-20 21:13:24.700]: Info: Screencasting with NvFBC
Using Vulkan device index 1
Using Vulkan device index 1
[2025-01-20 21:13:24.981]: Info: Setting default sink to: [sink-sunshine-stereo]
[2025-01-20 21:13:24.981]: Info: Found default monitor by name: sink-sunshine-stereo.monitor
[2025-01-20 21:13:25.003]: Info: Opus initialized: 48 kHz, 2 channels, 512 kbps (total), LOWDELAY
[2025-01-20 21:13:25.137]: Info: Creating encoder [hevc_nvenc]
[2025-01-20 21:13:25.137]: Info: Color coding: SDR (Rec. 601)
[2025-01-20 21:13:25.137]: Info: Color depth: 8-bit
[2025-01-20 21:13:25.137]: Info: Color range: MPEG
@brknkfr
Copy link
Author

brknkfr commented Jan 20, 2025

Starting with debug, I see actions of the mouse, but nothing is responding.

@brknkfr brknkfr changed the title No mouse in v2025.118.151840 No mouse and no keyboard in v2025.118.151840 Jan 21, 2025
@brknkfr
Copy link
Author

brknkfr commented Jan 22, 2025

The relevant logs are probably those:

[2025-01-20 21:13:16.686]: Warning: Unable to create virtual mouse: No such file or directory
[2025-01-20 21:13:16.686]: Warning: Unable to create virtual keyboard: No such file or directory

Did something change with the handling of the mouse and keyboard?

Updated issue with information: The computer is a headless server running Xorg.

@ReenigneArcher
Copy link
Member

We use inputtino now for input, it's been in beta for > 6 months.

@brknkfr brknkfr changed the title No mouse and no keyboard in v2025.118.151840 No mouse and no keyboard in v2025.118.151840 on headless computer Jan 23, 2025
@ReenigneArcher ReenigneArcher changed the title No mouse and no keyboard in v2025.118.151840 on headless computer No mouse and no keyboard using inputtino on headless computer Jan 23, 2025
@Dregu
Copy link

Dregu commented Jan 23, 2025

Can't really help with Xorg or Debian, but here's my true headless Sway nvidia sunshine setup running on Arch. The configs include several workarounds I needed to get input devices working. It has absolutely no need for dummy plugs, keyboards or anything else plugged in to the host (ok maybe power and ethernet). The Sway virtual output can use any ludicrous resolution out of the box and I have finished several fps games on this at 1440p120 with no issues. I've been running this for 2 months, still working perfectly on v2025.118.151840.

It would be very neat though if headless setups could work without these libinput hacks and had the possibility of only capturing the specific client input devices in a contained environment, not all system input like my setup. Something like that would maybe enable multi-seat without any virtualization and containers...

@DRFR33MAN24
Copy link

I'm running xfce desktop in xvfb and getting a similar thing:
warning: unable to create virtual xbox one controller: no such file or directory

@Slacker101
Copy link

I'm running xfce desktop in xvfb and getting a similar thing: warning: unable to create virtual xbox one controller: no such file or directory

Similar on Ubuntu, I made another issue about it.

@DRFR33MAN24
Copy link

Apparently it's possible to solve this issue as other streaming servers compatible with moonlight already solved it, but it's a rabbit hole especially with x11, the problem is sunshine is not designed to run in headless mode, but if you really want to see how its made check "wolf"

https://games-on-whales.github.io/wolf/stable/dev/fake-udev.html

https://games-on-whales.github.io/wolf/stable/dev/wayland.html

@Slacker101
Copy link

Apparently it's possible to solve this issue as other streaming servers compatible with moonlight already solved it, but it's a rabbit hole especially with x11, the problem is sunshine is not designed to run in headless mode, but if you really want to see how its made check "wolf"

https://games-on-whales.github.io/wolf/stable/dev/fake-udev.html

https://games-on-whales.github.io/wolf/stable/dev/wayland.html

Mine actually isn't headless, I have a PiKVM attached to it and get the same issues.

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

5 participants