Skip to content

Conversation

@schwar3kat
Copy link
Contributor

@schwar3kat schwar3kat commented Jan 18, 2026

Description

Some boards supported by Armbian have limited or unstable GPU/Wayland driver support, resulting in unreliable Wayland desktop sessions. Disabling Wayland through desktop- or display-manager–specific mechanisms introduces fragmentation, increases maintenance burden, and is difficult to keep consistent across desktops and upgrades.

This PR introduces a new opt-in board-level extension that masks Wayland desktop sessions in a desktop-agnostic and upgrade-safe manner. Wayland sessions are masked by placing empty marker files with matching names in /usr/local/share/wayland-sessions/, which takes precedence over /usr/share/wayland-sessions/.

Session masking was intentionally chosen over native desktop or display-manager disable methods to provide a single, consistent mechanism across all desktop environments, avoid desktop-specific configuration logic, and allow easy reversal without rebuilds or package changes.

Default behavior is unchanged unless the extension is explicitly enabled.

Implementation

A new extension is added:

extensions/wayland-sessions-mask.sh

The extension runs during post_post_debootstrap_tweaks and masks all existing Wayland session definitions using filesystem precedence, without removing or modifying packaged files.

Usage

Enable in board configuration:

enable_extension "wayland-sessions-mask"

Impact

  • Opt-in only (no default behavior changes)
  • Desktop- and display-manager–agnostic
  • Upgrade-safe (no modification of packaged files)
  • Easily reversible
  • Board-level policy control

How Has This Been Tested?

Tested on Radxa E54C using vendor images for both Ubuntu Noble and Debian Trixie:

Ubuntu Noble

  • GNOME desktop (Wayland sessions present)
    Result: Wayland sessions masked; desktop operates using X11.

  • Cinnamon desktop (Experimental Wayland session present)
    Result: Wayland session masked; desktop operates using X11.

  • XFCE desktop (no Wayland sessions)
    Result: No change; extension exits without effect.

  • Minimal image (no desktop)
    Result: No change; extension exits without effect.

Debian Trixie

  • GNOME desktop (Wayland sessions present)
    Result: Wayland sessions masked; desktop operates using X11.

  • Cinnamon desktop (Experimental Wayland session present)
    Result: Wayland session masked; desktop operates using X11.

  • XFCE desktop (Wayland session present)
    Result: Wayland session xfce-wayland.desktop masked; desktop operates using X11.

  • Minimal image (no desktop)
    Result: No change; extension exits without effect.

These tests confirm that the extension:

  • Only affects images with existing Wayland session definitions
  • Does not impact non-Wayland desktops or non-desktop images
  • Is safe to enable at the board level across distributions and image variants

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

Summary by CodeRabbit

Release Notes

  • New Features
    • Added an extension script that masks Wayland desktop sessions, enabling you to selectively hide specific session definitions from system availability.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 18, 2026

📝 Walkthrough

Walkthrough

A new Bash extension script is added that masks Wayland desktop session definitions by creating empty marker files in /usr/local/share/wayland-sessions to shadow existing desktop sessions in /usr/share/wayland-sessions.

Changes

Cohort / File(s) Summary
New Wayland Sessions Masking Extension
extensions/wayland-sessions-mask.sh
New script implementing post_post_debootstrap_tweaks__wayland_sessions_mask function. Checks for source session directory existence, creates destination directory, iterates through .desktop files, and creates corresponding empty marker files to mask sessions. Includes guard logic and informational alerts.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 With whiskers twitched and paws so quick,
I've masked those sessions, quite the trick!
Empty markers hop in place,
Where Wayland sessions used to race. 🌾✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add board-level extension to mask Wayland desktop sessions' accurately describes the main change: adding a new extension script to mask Wayland sessions at the board level.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added 02 Milestone: First quarter release size/small PR with less then 50 lines Needs review Seeking for review Framework Framework components labels Jan 18, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 18, 2026

Note

Docstrings generation - SUCCESS
Generated docstrings for this pull request at #9269

coderabbitai bot added a commit that referenced this pull request Jan 18, 2026
Docstrings generation was requested by @schwar3kat.

* #9268 (comment)

The following files were modified:

* `extensions/wayland-sessions-mask.sh`
@github-actions github-actions bot added the Ready to merge Reviewed, tested and ready for merge label Jan 21, 2026
@github-actions
Copy link
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions bot removed the Needs review Seeking for review label Jan 21, 2026
@igorpecovnik igorpecovnik merged commit 9684645 into armbian:main Jan 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

02 Milestone: First quarter release Framework Framework components Ready to merge Reviewed, tested and ready for merge size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

3 participants