Made by rpmn0ise https://rpmn0ise.neocities.org/
[2022] X11 Configuration Struggles [OBSOLETE] — Old Notes on Multi-Monitor Positioning Before the Transition to Wayland
Introduction: A Journey Through X11 Multi-Monitor Configuration
Back in 2022, configuring X11 for multi-monitor setups was a challenge for many Linux users. While Wayland promised to simplify and modernize the display server architecture, X11 was still the dominant choice for managing display and input, especially in complex setups involving multiple monitors.
This blog entry captures my own experience during this transition period—struggling with multi-monitor positioning in X11. Although many of the techniques discussed here are now considered obsolete due to the rise of Wayland, they provide a useful snapshot of the landscape before the paradigm shift. These notes document the various problems I encountered, the workarounds I applied, and the tools I used.
The Problem: Multi-Monitor Chaos in X11
Positioning Monitors
One of the most common challenges with X11 was the inconsistent handling of monitor positioning. For users with multi-monitor setups, X11 offered no native or uniform way of specifying monitor positions relative to one another, which often led to issues with mouse cursor movement, window placement, and resolution scaling.
On one hand, Xrandr provided basic functionality for configuring display outputs, but its syntax was cumbersome, and misconfigurations would often lead to screen flickers, misaligned edges, or, in the worst case, an inaccessible desktop.
Example Configuration Problem
For instance, I had a three-monitor setup:
- Primary monitor: 1080p, centered in the middle.
- Left monitor: 1080p, positioned on the left of the primary.
- Right monitor: 1440p, positioned on the right of the primary.
Setting this up in X11 involved using xrandr commands to manually adjust each screen's position and resolution. While the basic functionality worked, the real issues arose when it came to screen-edge alignment and cursor movement between displays.
Step 1: Using Xrandr for Basic Configuration
Xrandr was the primary tool to configure monitor positioning in X11. Here's an example of how I would position the screens:
This command tells X11 that HDMI-1 should be positioned to the left of the primary screen eDP-1, and HDMI-2 to the right. While functional, Xrandr had its drawbacks:
- The configuration had to be reapplied manually after each reboot, or through a startup script.
- The position could be changed, but it wasn't precise. If one monitor had a different scaling factor (e.g., a 1440p display next to a 1080p), it was difficult to perfectly align them, causing the mouse cursor to jump or get stuck at the borders.
Step 2: Configuring with .xprofile and Display Managers
Persistent Configuration via .xprofile
I placed my Xrandr commands in the .xprofile file, which is executed at the start of an X11 session. This helped to make sure that the configurations were applied automatically at boot time. This step was necessary to prevent the inconvenience of manually running xrandr after logging in.
This helped, but it didn't completely solve the problem. X11 still required manual tweaks for monitor resolutions and scaling factors after changes to the setup or even system updates.
Step 3: The Quest for Better Alignment and Precision
One of the most frustrating problems was ensuring that the edges of monitors aligned perfectly. While xrandr allowed me to set the position of monitors relative to one another, it didn’t provide an easy way to ensure the monitors were physically aligned in a way that matched their true positioning in real life.
Using arandr
To make the process easier, I turned to arandr, a graphical front-end for xrandr. Arandr provided a simple drag-and-drop interface for monitor positioning, making it easier to visualize and adjust the layout. However, it still had its shortcomings:
- It only worked with X11; Wayland could not be configured in the same way.
- Like
xrandr, the configuration was not persistent without saving and reapplying the settings manually.
Despite these drawbacks, it provided a more user-friendly approach to configuring multi-monitor setups compared to command-line methods.
Step 4: Handling Screen Flicker and Resolution Scaling
Another major issue with multi-monitor setups in X11 was screen flickering when switching between monitors or changing resolutions. This was particularly noticeable when using scaling on HiDPI displays (e.g., 4K monitors alongside 1080p ones). X11 had trouble correctly scaling content across different monitors with different pixel densities.
For example:
- The primary 1080p display might work fine with no scaling.
- The 1440p display on the right, however, required a scaling factor of 1.5x, which made it difficult for X11 to properly manage the output without visual glitches.
Step 5: Attempting to Resolve via xorg.conf
Some of the more advanced configurations could be attempted via the xorg.conf file, which allows manual adjustments to screen resolutions, refresh rates, and other parameters. This is the old-school way of configuring X11.
Example of an xorg.conf file snippet for multi-monitor setups:
This approach provided more control over the configuration, but it was prone to errors. Incorrect settings in the xorg.conf file could make the system unbootable or cause display misalignment and unresponsiveness.
The Transition to Wayland
As I continued struggling with X11, the discussions around Wayland gained momentum. By 2022, Wayland was increasingly becoming the default on many Linux distributions, such as Fedora and Ubuntu.
Wayland promised to address many of the issues I had with X11, including:
- Automatic screen positioning with better detection and alignment of monitors.
- Better HiDPI support and scaling.
- Smoother cursor transitions between displays.
Many of the tools I had struggled with in X11, such as arandr, were gradually becoming obsolete, as Wayland compositors were providing much better native support for multi-monitor setups.
Conclusion: Obsolescence of X11 in Multi-Monitor Setups
Looking back at the struggles with X11 multi-monitor configurations, I realize just how much more intuitive and stable Wayland-based setups are today. The transition from X11 to Wayland was not immediate, but it marked the beginning of a more seamless experience for Linux users with multi-monitor setups.
For those still using X11, these struggles are a reminder of the complexities involved in configuring multi-monitor environments. However, as the ecosystem continues to evolve, Wayland promises to make these kinds of configurations much simpler and more reliable, rendering these old techniques obsolete.