LizardByte / LizardByte/Sunshine

wayland: monitor_t enumeration requires xdg_output

Open
#5,406 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
41.3k
Forks
2.1k
Avg merge
23h 47m
Merged PRs (30d)
124

Description

### 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

Currently, when using portalgrab, the Wayland monitor enumeration depends on the xdg-output protocol, which may not be available on every compositor (gamescope is the one I'm testing). This _is_ a common protocol nowadays, but all it's really necessary for is handling high-DPI scenarios; basic compositors like gamescope don't do any desktop scaling so the information you get from the wl_output callbacks is enough to get the full display information.

The gamescope stream is being acquired via [`xdg-desktop-portal-gamescope`](https://github.com/Jovian-Experiments/xdg-desktop-portal-gamescope).

### Expected Behavior

Sunshine acquires the gamescope Wayland display and enumerates monitors using only wl_output callback data.

### Additional Context

_No response_

### Host Operating System

Linux

### Operating System Version

Fedora 44

### Architecture

amd64/x86_64

### Package

Linux - Fedora Copr

### GPU Type

AMD

### GPU Model

7900XTX

### GPU Driver/Mesa Version

26.1.4

### Capture Method

XDG Portal Grab (FreeBSD/Linux)

### Apps

```json

```

### Log output

```shell
[2026-07-12 20:03:55.605]: Info: Sunshine version: 2026.712.43005 commit: 3377f7a73f8768518430f4c771987153fcd77b77
[2026-07-12 20:03:55.605]: Info: Package Publisher: LizardByte
[2026-07-12 20:03:55.605]: Info: Publisher Website: https://app.lizardbyte.dev
[2026-07-12 20:03:55.605]: Info: Get support: https://app.lizardbyte.dev/support
[2026-07-12 20:03:55.605]: Info: config: 'capture' = portal
[2026-07-12 20:03:55.605]: Info: config: 'encoder' = vaapi
[2026-07-12 20:03:55.605]: Info: config: 'output_name' = 0
[2026-07-12 20:03:55.607]: Info: [portalgrab] Loaded portal restore token from disk
[2026-07-12 20:03:55.660]: Info: Trying encoder [vaapi]
[2026-07-12 20:03:55.661]: Info: [misc] drop_elevated_privileges succeeded in dropping capabilities
[2026-07-12 20:03:55.661]: Info: Screencasting with XDG portal
[2026-07-12 20:03:55.661]: Info: [misc] drop_elevated_privileges succeeded in dropping capabilities
[2026-07-12 20:03:55.661]: Info: [pipewire] Requested frame rate [60fps]
[2026-07-12 20:03:55.661]: Info: [wayland] Found display [gamescope-0]
[2026-07-12 20:03:55.681]: Info: [portalgrab] Loaded portal restore token from disk
[2026-07-12 20:03:55.683]: Error: [portalgrab] Could not create RemoteDesktop session: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop
[2026-07-12 20:03:55.687]: Info: [wayland] Found display [gamescope-0]
[2026-07-12 20:03:55.688]: Info: [wayland] Found interface: zwp_linux_dmabuf_v1(2) version 4
[2026-07-12 20:03:55.688]: Info: [wayland] Found interface: wl_output(21) version 4
[2026-07-12 20:03:55.688]: Error: [wayland] Missing Wayland wire XDG_OUTPUT
[2026-07-12 20:03:55.688]: Warning: [portalgrab] Ignoring stream without proper resolution on pipewire node 50
[2026-07-12 20:03:55.690]: Error: [portalgrab] No streams found on portal. portal_t setup failed.
[2026-07-12 20:03:55.690]: Error: [pipewire] Could not find display with name: '0'
[2026-07-12 20:03:55.890]: Info: Screencasting with XDG portal
[2026-07-12 20:03:55.890]: Info: [pipewire] Requested frame rate [60fps]
[2026-07-12 20:03:55.890]: Info: [wayland] Found display [gamescope-0]
[2026-07-12 20:03:55.902]: Info: [portalgrab] Loaded portal restore token from disk
[2026-07-12 20:03:55.903]: Error: [portalgrab] Could not create RemoteDesktop session: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop
[2026-07-12 20:03:55.906]: Info: [wayland] Found display [gamescope-0]
[2026-07-12 20:03:55.906]: Info: [wayland] Found interface: zwp_linux_dmabuf_v1(2) version 4
[2026-07-12 20:03:55.906]: Info: [wayland] Found interface: wl_output(21) version 4
[2026-07-12 20:03:55.906]: Error: [wayland] Missing Wayland wire XDG_OUTPUT
[2026-07-12 20:03:55.906]: Warning: [portalgrab] Ignoring stream without proper resolution on pipewire node 50
[2026-07-12 20:03:55.907]: Error: [portalgrab] No streams found on portal. portal_t setup failed.
[2026-07-12 20:03:55.907]: Error: [pipewire] Could not find display with name: '0'
[2026-07-12 20:03:56.108]: Info: Encoder [vaapi] failed
[2026-07-12 20:03:56.108]: Error: Couldn't find any working encoder matching [vaapi]
[2026-07-12 20:03:56.108]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2026-07-12 20:03:56.108]: Info: Trying encoder [nvenc]
[2026-07-12 20:03:56.108]: Info: Screencasting with XDG portal
[2026-07-12 20:03:56.108]: Info: [pipewire] Requested frame rate [60fps]
[2026-07-12 20:03:56.108]: Info: [wayland] Found display [gamescope-0]
[2026-07-12 20:03:56.120]: Info: [portalgrab] Loaded portal restore token from disk
[2026-07-12 20:03:56.121]: Error: [portalgrab] Could not create RemoteDesktop session: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop
[2026-07-12 20:03:56.125]: Info: [wayland] Found display [gamescope-0]
[2026-07-12 20:03:56.125]: Info: [wayland] Found interface: zwp_linux_dmabuf_v1(2) version 4
[2026-07-12 20:03:56.125]: Info: [wayland] Found interface: wl_output(21) version 4
[2026-07-12 20:03:56.125]: Error: [wayland] Missing Wayland wire XDG_OUTPUT
[2026-07-12 20:03:56.125]: Warning: [portalgrab] Ignoring stream without proper resolution on pipewire node 50
[2026-07-12 20:03:56.126]: Error: [portalgrab] No streams found on portal. portal_t setup failed.
[2026-07-12 20:03:56.126]: Error: [pipewire] Could not find display with name: '0'
[2026-07-12 20:03:56.327]: Info: Screencasting with XDG portal
[2026-07-12 20:03:56.327]: Info: [pipewire] Requested frame rate [60fps]
[2026-07-12 20:03:56.327]: Info: [wayland] Found display [gamescope-0]
[2026-07-12 20:03:56.339]: Info: [portalgrab] Loaded portal restore token from disk
[2026-07-12 20:03:56.341]: Error: [portalgrab] Could not create RemoteDesktop session: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop
[2026-07-12 20:03:56.344]: Info: [wayland] Found display [gamescope-0]
[2026-07-12 20:03:56.344]: Info: [wayland] Found interface: zwp_linux_dmabuf_v1(2) version 4
[2026-07-12 20:03:56.344]: Info: [wayland] Found interface: wl_output(21) version 4
[2026-07-12 20:03:56.344]: Error: [wayland] Missing Wayland wire XDG_OUTPUT
[2026-07-12 20:03:56.344]: Warning: [portalgrab] Ignoring stream without proper resolution on pipewire node 50
[2026-07-12 20:03:56.345]: Error: [portalgrab] No streams found on portal. portal_t setup failed.
[2026-07-12 20:03:56.345]: Error: [pipewire] Could not find display with name: '0'
[2026-07-12 20:03:56.546]: Info: Encoder [nvenc] failed
[2026-07-12 20:03:56.546]: Info: Trying encoder [vulkan]
[2026-07-12 20:03:56.546]: Info: Screencasting with XDG portal
[2026-07-12 20:03:56.546]: Info: [pipewire] Requested frame rate [60fps]
[2026-07-12 20:03:56.546]: Info: [wayland] Found display [gamescope-0]
[2026-07-12 20:03:56.559]: Info: [portalgrab] Loaded portal restore token from disk
[2026-07-12 20:03:56.560]: Error: [portalgrab] Could not create RemoteDesktop session: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop
[2026-07-12 20:03:56.564]: Info: [wayland] Found display [gamescope-0]
[2026-07-12 20:03:56.564]: Info: [wayland] Found interface: zwp_linux_dmabuf_v1(2) version 4
[2026-07-12 20:03:56.564]: Info: [wayland] Found interface: wl_output(21) version 4
[2026-07-12 20:03:56.564]: Error: [wayland] Missing Wayland wire XDG_OUTPUT
[2026-07-12 20:03:56.564]: Warning: [portalgrab] Ignoring stream without proper resolution on pipewire node 50
[2026-07-12 20:03:56.565]: Error: [portalgrab] No streams found on portal. portal_t setup failed.
[2026-07-12 20:03:56.565]: Error: [pipewire] Could not find display with name: '0'
[2026-07-12 20:03:56.766]: Info: Screencasting with XDG portal
[2026-07-12 20:03:56.766]: Info: [pipewire] Requested frame rate [60fps]
[2026-07-12 20:03:56.766]: Info: [wayland] Found display [gamescope-0]
[2026-07-12 20:03:56.778]: Info: [portalgrab] Loaded portal restore token from disk
[2026-07-12 20:03:56.780]: Error: [portalgrab] Could not create RemoteDesktop session: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop
[2026-07-12 20:03:56.783]: Info: [wayland] Found display [gamescope-0]
[2026-07-12 20:03:56.783]: Info: [wayland] Found interface: zwp_linux_dmabuf_v1(2) version 4
[2026-07-12 20:03:56.783]: Info: [wayland] Found interface: wl_output(21) version 4
[2026-07-12 20:03:56.783]: Error: [wayland] Missing Wayland wire XDG_OUTPUT
[2026-07-12 20:03:56.783]: Warning: [portalgrab] Ignoring stream without proper resolution on pipewire node 50
[2026-07-12 20:03:56.785]: Error: [portalgrab] No streams found on portal. portal_t setup failed.
[2026-07-12 20:03:56.785]: Error: [pipewire] Could not find display with name: '0'
[2026-07-12 20:03:56.985]: Info: Encoder [vulkan] failed
[2026-07-12 20:03:56.985]: Info: Trying encoder [software]
[2026-07-12 20:03:56.985]: Info: Screencasting with XDG portal
[2026-07-12 20:03:56.985]: Info: [pipewire] Requested frame rate [60fps]
[2026-07-12 20:03:56.985]: Info: [wayland] Found display [gamescope-0]
[2026-07-12 20:03:56.997]: Info: [portalgrab] Loaded portal restore token from disk
[2026-07-12 20:03:56.998]: Error: [portalgrab] Could not create RemoteDesktop session: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop
[2026-07-12 20:03:57.002]: Info: [wayland] Found display [gamescope-0]
[2026-07-12 20:03:57.002]: Info: [wayland] Found interface: zwp_linux_dmabuf_v1(2) version 4
[2026-07-12 20:03:57.002]: Info: [wayland] Found interface: wl_output(21) version 4
[2026-07-12 20:03:57.002]: Error: [wayland] Missing Wayland wire XDG_OUTPUT
[2026-07-12 20:03:57.002]: Warning: [portalgrab] Ignoring stream without proper resolution on pipewire node 50
[2026-07-12 20:03:57.003]: Error: [portalgrab] No streams found on portal. portal_t setup failed.
[2026-07-12 20:03:57.003]: Error: [pipewire] Could not find display with name: '0'
[2026-07-12 20:03:57.204]: Info: Screencasting with XDG portal
[2026-07-12 20:03:57.204]: Info: [pipewire] Requested frame rate [60fps]
[2026-07-12 20:03:57.204]: Info: [wayland] Found display [gamescope-0]
[2026-07-12 20:03:57.216]: Info: [portalgrab] Loaded portal restore token from disk
[2026-07-12 20:03:57.217]: Error: [portalgrab] Could not create RemoteDesktop session: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop
[2026-07-12 20:03:57.221]: Info: [wayland] Found display [gamescope-0]
[2026-07-12 20:03:57.221]: Info: [wayland] Found interface: zwp_linux_dmabuf_v1(2) version 4
[2026-07-12 20:03:57.221]: Info: [wayland] Found interface: wl_output(21) version 4
[2026-07-12 20:03:57.221]: Error: [wayland] Missing Wayland wire XDG_OUTPUT
[2026-07-12 20:03:57.221]: Warning: [portalgrab] Ignoring stream without proper resolution on pipewire node 50
[2026-07-12 20:03:57.222]: Error: [portalgrab] No streams found on portal. portal_t setup failed.
[2026-07-12 20:03:57.222]: Error: [pipewire] Could not find display with name: '0'
[2026-07-12 20:03:57.423]: Info: Encoder [software] failed
[2026-07-12 20:03:57.423]: Fatal: Unable to find display or encoder during startup.
[2026-07-12 20:03:57.423]: Fatal: Please ensure your manually chosen GPU and monitor are connected and powered on.
[2026-07-12 20:03:57.423]: Error: Video failed to find working encoder
[2026-07-12 20:03:57.424]: Info: Starting system tray
[2026-07-12 20:03:57.425]: Info: Adding avahi service flibitDemon
[2026-07-12 20:03:57.429]: Info: Configuration UI available at [https://localhost:47990]
[2026-07-12 20:03:57.432]: Warning: Failed to create system tray
[2026-07-12 20:03:57.432]: Info: Starting main loop
[2026-07-12 20:03:57.432]: Error: System tray is not initialized
[2026-07-12 20:03:57.432]: Info: Main loop has exited
[2026-07-12 20:03:58.427]: Info: Avahi service flibitDemon successfully established.
[2026-07-12 20:24:28.012]: Error: Client failure: Daemon connection failed
[2026-07-12 20:24:32.837]: Info: Terminate handler called
```

### Online logs

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Wayland monitor enumeration used by portalgrab, focusing on the wl_output and xdg-output handling shown in the logs. Verify the behavior with a compositor such as gamescope; done means monitor enumeration succeeds from wl_output callback data when xdg-output is unavailable, while existing high-DPI handling remains supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
desktop-dev, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.