Skip to content

Fix Wayland detection and display server reporting #490

Closed

Description

@suparious

Summary

FastFetch's documentation explicitly calls out that neofetch's Wayland support "never actually worked." We should audit and fix our Wayland detection to provide accurate display server information.

Background

From FastFetch's FAQ:

"Fastfetch is more accurate. For example, neofetch never actually supports the Wayland protocol."

This is a credibility issue - users running Wayland compositors (Sway, Hyprland, GNOME on Wayland, KDE Plasma Wayland) may be getting inaccurate information.

Research Findings

FastFetch handles Wayland detection by:

  1. Checking $WAYLAND_DISPLAY environment variable
  2. Detecting the actual compositor (wlroots-based, mutter, kwin_wayland, etc.)
  3. Properly reporting resolution via Wayland protocols rather than xrandr

Areas to Investigate

  1. Display Server Detection (get_wm() function area)

    • Does $WAYLAND_DISPLAY get properly detected?
    • Are XWayland scenarios handled correctly?
  2. Resolution Detection (get_resolution() function area)

    • xrandr doesn't work under pure Wayland
    • Need alternative methods (wlr-randr, wayland-info, compositor-specific)
  3. Window Manager Detection

    • Detect Wayland-native compositors (Sway, Hyprland, river, etc.)
    • Distinguish between X11 and Wayland sessions for hybrid setups

Acceptance Criteria

  • $WAYLAND_DISPLAY is checked before falling back to X11 methods
  • Wayland compositors are correctly identified by name
  • Resolution detection works without xrandr on pure Wayland
  • XWayland apps running under Wayland don't cause false X11 detection
  • Add tests/documentation for Wayland detection

References

Activity

  1. suparious commented on Feb 1, 2026

    @suparious
    OwnerAuthor

    Fixed in c674552 - Improved Wayland support:

    Resolution detection: Added native Wayland resolution methods:

    • wlr-randr for wlroots compositors (Sway, Hyprland, river, etc.)
    • kscreen-doctor for KDE Plasma Wayland
    • wayland-info as generic fallback

    WM detection: Added 10 modern Wayland compositors:
    cage, cagebreak, cosmic-comp, dwl, gamescope, labwc, mutter, niri, phoc, and lowercase hyprland variant

    The code now properly attempts Wayland-native tools before falling back to DRM/sysfs.

  2. added a commit that references this issue on Feb 1, 2026
    c674552
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhigh priority

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions