Skip to content

[Discussion] Support for creating, applying, and switching modes in Wayland #102

Open
@syboxez

Description

@syboxez

This is a continuation of the discussion started here: libretro/RetroArch#17197

I was successfully able to implement a fully-agnostic method for switching modes in Linux, regardless of environment, so long as DRM is being used and edid_override and trigger_hotplug are both available as a proof of concept in BASH. This works quite well on my hardware, and switching is quite fast, but there's the obvious downside of requiring root access.

Currently, my setup includes a sudoers ruleset that automatically grants my user root access upon execution of specific scripts I wrote in /usr/local/bin, with the main meat of it being the script included in the PR linked above, and the other parts being specific to my setup (switching to custom EDIDs instead of resetting to default EDID provided by my displays along with scripts to enable/disable various displays before/after starting RetroArch).

IMO requiring the user to create a sudoers rule is a bit undesirable, not to mention requiring root access is a security concern. The issue here is that Wayland does not provide a standard to follow for compositors to allow for the use of custom modelines. There is an unstable, wlroots-exclusive protocol called wlr-output-management-unstable-v1 that allows for limited definitions of custom modelines (only allowing for HRes x VRes @ VFreq, or at least that's what wlr-randr allows for), but neither KDE (KWin) nor GNOME (Mutter) support that protocol, which limits use to less-popular desktops/WMs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions