Sunshine icon indicating copy to clipboard operation
Sunshine copied to clipboard

Transition away from ViGEmBus

Open Danfun64 opened this issue 1 year ago • 7 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Is your issue described in the documentation?

  • [x] 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

As of v2025.110.45857, running Sunshine without ViGEmBus installed gives a fatal error on how it's required for gamepad support. ViGEmBus has been discontinued for about 13 months, and it doesn't appear that a proper successor or fork exists for it. I'm not sure if any viable, currently supported alternatives exist, but I don't feel thrilled about installing an unsupported driver that may not work with newer versions of Windows. I'm not sure if there are any solutions to this issue, but I am hopeful that an alternative can be found.

Expected Behavior

No response

Additional Context

I am running a laptop with a dgpu. It appears Sunshine has selected the igpu as default. It's not important to the issue at hand.

Host Operating System

Windows

Operating System Version

24H2 (OS Build 26100.2605)

Architecture

amd64/x86_64

Sunshine commit or version

v2025.110.45857

Package

Windows - portable (not recommended)

GPU Type

Intel

GPU Model

Intel(R) Iris(R) Xe Graphics

GPU Driver/Mesa Version

32.0.101.6078

Capture Method

None

Config


Apps


Relevant log output

[2025-01-10 15:22:56.503]: Info: Sunshine version: v2025.110.45857
[2025-01-10 15:22:56.503]: Info: Package Publisher: LizardByte
[2025-01-10 15:22:56.503]: Info: Publisher Website: https://app.lizardbyte.dev
[2025-01-10 15:22:56.503]: Info: Get support: https://app.lizardbyte.dev/support
[2025-01-10 15:22:56.503]: Info: Provided workaround settings for SettingsManager:
{
  "hdr_blank_delay": null
}
[2025-01-10 15:22:56.507]: Info: Currently available display devices:
[
  {
    "device_id": "{25bbf281-ae3b-53da-97ba-46e0f54e533d}",
    "display_name": "\\\\.\\DISPLAY1",
    "friendly_name": "",
    "info": {
      "hdr_state": "Disabled",
      "origin_point": {
        "x": 0,
        "y": 0
      },
      "primary": true,
      "refresh_rate": {
        "type": "rational",
        "value": {
          "denominator": 237536,
          "numerator": 28508000
        }
      },
      "resolution": {
        "height": 1080,
        "width": 1920
      },
      "resolution_scale": {
        "type": "rational",
        "value": {
          "denominator": 100,
          "numerator": 100
        }
      }
    }
  },
  {
    "device_id": "{a552746a-2d07-5da8-a245-efcaa58a9be4}",
    "display_name": "\\\\.\\DISPLAY2",
    "friendly_name": "VX1755",
    "info": {
      "hdr_state": "Disabled",
      "origin_point": {
        "x": 1920,
        "y": 0
      },
      "primary": false,
      "refresh_rate": {
        "type": "rational",
        "value": {
          "denominator": 247500,
          "numerator": 29700000
        }
      },
      "resolution": {
        "height": 1080,
        "width": 1920
      },
      "resolution_scale": {
        "type": "rational",
        "value": {
          "denominator": 100,
          "numerator": 100
        }
      }
    }
  }
]
[2025-01-10 15:22:56.661]: Info: nvprefs: No need to modify application profile settings
[2025-01-10 15:22:56.661]: Info: nvprefs: Changed OGL_CPL_PREFER_DXPRESENT to OGL_CPL_PREFER_DXPRESENT_PREFER_ENABLED for base profile
[2025-01-10 15:22:56.756]: Info: Compiling shaders...
[2025-01-10 15:22:56.794]: Info: System tray created
[2025-01-10 15:22:57.146]: Info: Compiled shaders
[2025-01-10 15:22:57.154]: Fatal: ViGEmBus is not installed or running. You must install ViGEmBus for gamepad support!
[2025-01-10 15:22:57.154]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-01-10 15:22:57.155]: Info: Trying encoder [nvenc]
[2025-01-10 15:22:57.333]: Info: ddprobe.exe 1  --verify-frame-capture returned 0x00000000
[2025-01-10 15:22:57.333]: Info: Set GPU preference: 1
[2025-01-10 15:22:57.391]: Info:
Device Description : Intel(R) Iris(R) Xe Graphics
Device Vendor ID   : 0x00008086
Device Device ID   : 0x000046A6
Device Video Mem   : 128 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 16226 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 3840x1080
[2025-01-10 15:22:57.391]: Info: Active GPU has HAGS disabled
[2025-01-10 15:22:57.391]: Info: Using realtime GPU priority
[2025-01-10 15:22:57.391]: Info:
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.589844,0.349609]
Green Primary      : [0.330078,0.554688]
Blue Primary       : [0.15332,0.119141]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2025-01-10 15:22:57.392]: Info: Desktop resolution [1920x1080]
[2025-01-10 15:22:57.392]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2025-01-10 15:22:57.392]: Info: Display refresh rate [120.015Hz]
[2025-01-10 15:22:57.392]: Info: Requested frame rate [60fps]
[2025-01-10 15:22:57.392]: Info: Encoder [nvenc] is not supported on this GPU
[2025-01-10 15:22:57.413]: Info: Trying encoder [quicksync]
[2025-01-10 15:22:57.462]: Info:
Device Description : Intel(R) Iris(R) Xe Graphics
Device Vendor ID   : 0x00008086
Device Device ID   : 0x000046A6
Device Video Mem   : 128 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 16226 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 3840x1080
[2025-01-10 15:22:57.463]: Info: Active GPU has HAGS disabled
[2025-01-10 15:22:57.463]: Info: Using realtime GPU priority
[2025-01-10 15:22:57.463]: Info:
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.589844,0.349609]
Green Primary      : [0.330078,0.554688]
Blue Primary       : [0.15332,0.119141]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2025-01-10 15:22:57.464]: Info: Desktop resolution [1920x1080]
[2025-01-10 15:22:57.464]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2025-01-10 15:22:57.464]: Info: Display refresh rate [120.015Hz]
[2025-01-10 15:22:57.464]: Info: Requested frame rate [60fps]
[2025-01-10 15:22:57.464]: Info: Creating encoder [h264_qsv]
[2025-01-10 15:22:57.464]: Info: Color coding: SDR (Rec. 601)
[2025-01-10 15:22:57.464]: Info: Color depth: 8-bit
[2025-01-10 15:22:57.464]: Info: Color range: JPEG
[2025-01-10 15:22:57.679]: Info: Creating encoder [hevc_qsv]
[2025-01-10 15:22:57.680]: Info: Color coding: SDR (Rec. 601)
[2025-01-10 15:22:57.680]: Info: Color depth: 8-bit
[2025-01-10 15:22:57.680]: Info: Color range: JPEG
[2025-01-10 15:22:57.917]: Info: Creating encoder [av1_qsv]
[2025-01-10 15:22:57.917]: Info: Color coding: SDR (Rec. 601)
[2025-01-10 15:22:57.917]: Info: Color depth: 8-bit
[2025-01-10 15:22:57.917]: Info: Color range: JPEG
[2025-01-10 15:22:58.079]: Error: [av1_qsv @ 00000213e7f78f00] Current codec type is unsupported
[2025-01-10 15:22:58.079]: Error: [av1_qsv @ 00000213e7f78f00] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters.
[2025-01-10 15:22:58.081]: Error: Could not open codec [av1_qsv]: Function not implemented
[2025-01-10 15:22:58.143]: Info:
Device Description : Intel(R) Iris(R) Xe Graphics
Device Vendor ID   : 0x00008086
Device Device ID   : 0x000046A6
Device Video Mem   : 128 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 16226 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 3840x1080
[2025-01-10 15:22:58.143]: Info: Active GPU has HAGS disabled
[2025-01-10 15:22:58.143]: Info: Using realtime GPU priority
[2025-01-10 15:22:58.143]: Info:
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.589844,0.349609]
Green Primary      : [0.330078,0.554688]
Blue Primary       : [0.15332,0.119141]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2025-01-10 15:22:58.143]: Info: Desktop resolution [1920x1080]
[2025-01-10 15:22:58.143]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2025-01-10 15:22:58.143]: Info: Display refresh rate [120.015Hz]
[2025-01-10 15:22:58.144]: Info: Requested frame rate [60fps]
[2025-01-10 15:22:58.144]: Info: Creating encoder [hevc_qsv]
[2025-01-10 15:22:58.144]: Info: Color coding: SDR (Rec. 709)
[2025-01-10 15:22:58.144]: Info: Color depth: 10-bit
[2025-01-10 15:22:58.144]: Info: Color range: JPEG
[2025-01-10 15:22:58.393]: Info:
[2025-01-10 15:22:58.394]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025-01-10 15:22:58.394]: Info:
[2025-01-10 15:22:58.394]: Info: Found H.264 encoder: h264_qsv [quicksync]
[2025-01-10 15:22:58.394]: Info: Found HEVC encoder: hevc_qsv [quicksync]
[2025-01-10 15:22:58.436]: Info: Open the Web UI to set your new username and password and getting started
[2025-01-10 15:22:58.436]: Info: File C:\Users\Danfun360\Downloads\Temp\Sunshine\config\sunshine_state.json doesn't exist
[2025-01-10 15:22:58.451]: Info: Configuration UI available at [https://localhost:47990]
[2025-01-10 15:22:59.222]: Info: Registered Sunshine mDNS service
[2025-01-10 15:23:15.138]: Info: Web UI: [127.0.0.1] -- not authorized
[2025-01-10 15:23:28.712]: Info: New credentials have been created
[2025-01-10 15:23:33.738]: Info: Web UI: [127.0.0.1] -- not authorize

Danfun64 avatar Jan 10 '25 20:01 Danfun64

We are still using Vigembus, because there are no open source alternatives.

There's an official feature request here: https://github.com/orgs/LizardByte/discussions/506

ReenigneArcher avatar Jan 10 '25 20:01 ReenigneArcher

We are still using Vigembus, because there are no open source alternatives.

There's an official feature request here: https://github.com/orgs/LizardByte/discussions/506

Shouldn't we remove the fatal error requiring Vigembus when it isn't properly supported, at least? Sunshine seems to work fine without it. Running Steam seem to have built-in controller support for example.

snusstofilen avatar Apr 19 '25 14:04 snusstofilen

It's still properly supported and you still need it (unless Steam is doing some magic for steam games).

ReenigneArcher avatar Apr 19 '25 15:04 ReenigneArcher

It's still properly supported and you still need it (unless Steam is doing some magic for steam games).

I tried it out, Vigembus works fine even though it's old. Is it possible to incorporate the source code into Sunshine? So that we can keep it up-to-date and do any modifications if so would be needed?

snusstofilen avatar Apr 19 '25 18:04 snusstofilen

There is a goal to revive the project.

Initial work would be to just get it building again: https://github.com/LizardByte/Virtual-Gamepad-Emulation-Bus/pull/3

That would still not be enough to distribute it with Sunshine as kernel drivers are required to be signed, and this type of signing key can only be obtained by a legal business entity (which we are not one yet).

If we can get it to build and add any useful new features (such as Xbox One, PS5, or Nintendo Switch game-pad emulation), I will consider incorporating LB so we can obtain the necessary singing keys.

ReenigneArcher avatar Apr 19 '25 18:04 ReenigneArcher

There is a goal to revive the project.

Initial work would be to just get it building again: LizardByte/Virtual-Gamepad-Emulation-Bus#3

That would still not be enough to distribute it with Sunshine as kernel drivers are required to be signed, and this type of signing key can only be obtained by a legal business entity (which we are not one yet).

If we can get it to build and add any useful new features (such as Xbox One, PS5, or Nintendo Switch game-pad emulation), I will consider incorporating LB so we can obtain the necessary singing keys.

If it's not signed, you have to put Windows in test mode, I think, is that it? And then no one will do it. Currently, Vigembus is signed. Can't the person who developed it integrate your changes into their code to get it signed?

moi952 avatar Apr 29 '25 13:04 moi952

They are not interested in maintaining it, otherwise it would still be active and accepting PRs.

Anyway, like I said... if our fork gets to a point where it has benefits over the currently released version, I will take care of the code signing stuff, until that point there is no benefit.

ReenigneArcher avatar Apr 29 '25 16:04 ReenigneArcher

It seems this issue hasn't had any activity in the past 90 days. If it's still something you'd like addressed, please let us know by leaving a comment. Otherwise, to help keep our backlog tidy, we'll be closing this issue in 10 days. Thanks!

LizardByte-bot avatar Jul 29 '25 10:07 LizardByte-bot

Closing as we don't track feature requests in the issues.

roadmap: https://github.com/LizardByte/roadmap/issues/10 feature request: https://github.com/orgs/LizardByte/discussions/506

ReenigneArcher avatar Jul 29 '25 12:07 ReenigneArcher