Skip to content

Conversation

Copy link

Copilot AI commented Nov 15, 2025

Description of Changes

BSV Desktop AppImage failed to display on Wayland systems due to GPU initialization failures (drmGetDevices2() has not found any devices). Application processes would start but the GUI window would not appear.

Changes

electron/main.ts - Added Linux display server configuration:

  • Disable GPU sandbox (--disable-gpu-sandbox) for AppImage/containerized GPU access
  • Enable WaylandWindowDecorations feature for Wayland window management
  • Auto-detect display server with X11 fallback:
    if (process.platform === 'linux') {
      app.commandLine.appendSwitch('--disable-gpu-sandbox');
      app.commandLine.appendSwitch('--enable-features', 'WaylandWindowDecorations');
      
      // Force X11 if user explicitly requested or Wayland unavailable
      if (process.env.GDK_BACKEND === 'x11' || process.env.DISPLAY && !process.env.WAYLAND_DISPLAY) {
        app.commandLine.appendSwitch('--ozone-platform', 'x11');
      }
    }

README.md - Document Wayland/X11 support and manual override via GDK_BACKEND=x11

Behavior

  • Wayland systems: Try Wayland, fallback to X11 on initialization failure
  • X11-only systems: Use X11 automatically
  • User override: Respect GDK_BACKEND=x11 environment variable
  • macOS/Windows: No changes

Linked Issues / Tickets

Closes issue regarding BSV Desktop not displaying on Wayland environments.

Testing Procedure

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have updated CHANGELOG.md with my changes
  • I have run npm run doc and npm run lint one final time before requesting a review
  • I have fixed all linter errors to ensure these changes are compliant with ts-standard
  • I have run npm version patch so that my changes will trigger a new version to be released when they are merged

Checklist:

  • Build process verified (TypeScript compilation successful)
  • CodeQL security scan passed (0 alerts)
  • No new dependencies added
  • Manual testing on Wayland system required
  • Manual testing on X11-only system required
Original prompt

This section details on the original issue you should resolve

<issue_title>BSV Desktop doesn't display on Wayland - requires X11 workaround</issue_title>
<issue_description># BSV Desktop doesn't display on Wayland - requires X11 workaround

Description

BSV Desktop AppImage fails to display properly when running in a Wayland environment. The application starts successfully (processes are running, HTTP server is listening), but the GUI window is not visible.

Steps to Reproduce

  1. Run BSV Desktop on a Linux system with Wayland:
    ./BSV-Desktop-0.8.13.AppImage --appimage-extract-and-run
  2. Application processes start and HTTP server listens
  3. GUI window does not appear despite processes running

Expected Behavior

BSV Desktop should detect and work with the available display server (Wayland or X11) without requiring manual configuration.

Actual Behavior

  • Application processes start successfully
  • HTTP server initializes correctly
  • GUI window is not visible/displayed
  • Logs show Wayland-related errors: drmGetDevices2() has not found any devices

Workaround

Force X11 display mode by setting environment variables and using the --ozone-platform=x11 flag:

export DISPLAY=:0
unset WAYLAND_DISPLAY
export GDK_BACKEND=x11
./BSV-Desktop-0.8.13.AppImage --appimage-extract-and-run --ozone-platform=x11

Environment

  • OS: Linux (kernel 6.6.88)
  • Display Server: Wayland with X11 compatibility layer
  • BSV Desktop Version: 0.8.13
  • Application Format: AppImage

Additional Information

  • X11 displays are available (X0, X1 in /tmp/.X11-unix/)
  • Electron renderer process shows --ozone-platform=wayland when launched normally
  • No errors preventing startup, but GUI simply doesn't appear
  • Workaround successfully displays the application when forcing X11

Proposed Solution

  1. Improve display server detection/fallback logic
  2. Add better error messaging when display initialization fails
  3. Consider adding a command-line flag or environment variable to explicitly choose display backend
  4. Test and fix Wayland support, or provide clear documentation on X11 requirement

Logs

When running normally, logs show:

[ERROR:ui/ozone/platform/wayland/common/drm_render_node_path_finder.cc:45] drmGetDevices2() has not found any devices: No such file or directory (2)
[ERROR:components/viz/service/main/viz_main_impl.cc:189] Exiting GPU process due to errors during initialization

The application continues running but GUI is not displayed.</issue_description>

<agent_instructions>Use this bug report to modify the linux specific build process or electron config such that it works with a broader array of display servers.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 15, 2025 17:51
- Add Linux-specific Electron command-line switches
- Disable GPU sandbox for AppImage/snap compatibility
- Enable WaylandWindowDecorations feature
- Auto-detect display server (Wayland/X11) with fallback
- Respect user's explicit X11 environment settings

Co-authored-by: sirdeggen <[email protected]>
Document Wayland/X11 support and manual override instructions

Co-authored-by: sirdeggen <[email protected]>
Copilot AI changed the title [WIP] Fix BSV Desktop display issue in Wayland environment Fix Wayland display server compatibility for Linux AppImage Nov 15, 2025
Copilot AI requested a review from sirdeggen November 15, 2025 17:59
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

Successfully merging this pull request may close these issues.

BSV Desktop doesn't display on Wayland - requires X11 workaround

2 participants