Skip to content

[BUG] Cursor rendering lost on desktop browsers after tab sleep - restored only by mobile client reconnect (Wayland/NVIDIA) #220

@corvidica

Description

@corvidica

Current Behavior

When using the webtop in Wayland mode (PIXELFLUX_WAYLAND=true) with NVIDIA GPU passthrough, the mouse cursor becomes invisible on all desktop browsers after the browser tab goes to sleep or is backgrounded. Cursor input continues to function correctly (clicks, hover states, interactions all work), but the cursor is not rendered visually.

The issue persists across:

  • Multiple desktop browsers (Microsoft Edge, Firefox)
  • Incognito/private windows
  • Changing stream resolution or quality settings in the Selkies sidebar
  • Opening a new browser session on the same desktop

The cursor is only restored by connecting from a mobile browser (tested: Microsoft Edge on iOS). Once the mobile client connects and disconnects, the cursor renders correctly again on all desktop browsers.

The cursor also will render and function normally while in 'Gaming Mode'. This acts as a work around, but this does not restore the cursor after exiting Gaming Mode.

Expected Behavior

The mouse cursor should remain visible after a browser tab goes to sleep or loses focus, and should be restorable without requiring a mobile client connection or full container restart.

Steps to Reproduce

  1. Launch the webtop container in Wayland mode (PIXELFLUX_WAYLAND=true) with NVIDIA GPU
  2. Launch webtop w
  3. Connect from a desktop browser (Edge or Firefox)
  4. Allow the browser tab to go to sleep / background the tab for an extended period
  5. Return to the tab — cursor is invisible but input still functions
  6. Open the webtop URL in a mobile browser (e.g. Edge on iOS)
  7. Observe cursor is restored on the mobile session
  8. Switch back to the desktop browser — cursor now renders correctly, but the cursor appearance differs from the original (e.g. changes cursor theme or type (cursor and not a pointer)), suggesting the mobile connection triggers a cursor reinitialization rather than restoring the previous cursor state.

Environment

  • Image: lscr.io/linuxserver/webtop:ubuntu-kde (custom Dockerfile build)
  • Host OS: Ubuntu 6.8.0-101 x86_64
  • Docker version: Docker version 29.2.1
  • GPU: NVIDIA (passthrough via deploy.resources.reservations.devices)
  • Desktop Environment: KDE Plasma (Wayland or CPU Only)
  • Streaming backend: Selkies (svc-selkies)
  • Client browsers affected: Microsoft Edge (desktop), Firefox (desktop)
  • Client browser NOT affected: Microsoft Edge (iOS)

Relevant Environment Variables

Wayland

PIXELFLUX_WAYLAND=true
DRINODE=/dev/dri/renderD128
DRI_NODE=/dev/dri/renderD128
NVIDIA_VISIBLE_DEVICES=all
NVIDIA_DRIVER_CAPABILITIES=all
WLR_NO_HARDWARE_CURSORS=1

CPU

PIXELFLUX_WAYLAND=true
WLR_NO_HARDWARE_CURSORS=1
WLR_RENDERER=pixman

Additional Context

  • WLR_NO_HARDWARE_CURSORS=1 no change
  • Enabling CSS cursors via the Selkies sidebar (use_browser_cursors) actually triggers the issue immediately rather than fixing it
  • Restarting the container restores the cursor, suggesting Selkies session state is not fully reset on reconnect
  • The fact that a mobile client connection restores cursor rendering for all subsequent desktop clients suggests the mobile connection triggers a cursor stream reinitialization path that desktop reconnects do not
  • Cursor input (clicks, hover states) continues to function correctly throughout — this is purely a rendering issue

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions