Skip to content

An autostart script introducing fractional display scaling for X11 using multiple displays. Includes ordering of display outputs.

License

Notifications You must be signed in to change notification settings

hohloh/x11-fractional-multi-display

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

X11-fractional-multi-display

An autostart script introducing fractional display scaling for X11 using multiple displays. Includes ordering of display outputs.

Disclaimer and current issues

This script is designed to run as an autostart application and needs a corresponding .desktop file. I created it under GNOME 40.4.0 due to the lack of other options to correctly scale multiple displays fractionally.

Known issues

Due to the script only executing after boot/login, display output breaks when:

  • Disconnecting/connecting a display
  • Resetting the GNOME shell using Alt+F2 + "r" or gnome-shell --replace &
  • Changing display settings in the GUI

Two workarounds are logging out or resetting xrandr using the displays_reset.sh script in the repository before (dis-)connecting displays or making changes in the GUI.

Instructions

Short note on the "right" settings

When using the script, I had the best results setting my system scaling to 200% and then "zooming out" using xrandr. In my version of GNOME, the safest way to permanently setting the scaling to 200% was to editthe scaling factor in org.gnome.desktop.interface and set it to 2.

The graphical tool to do this is dconf-editor.

In my setup, I'm using three displays of the same brand and model. For now, I haven't had the need to extend the script for multiple displays using different resolutions, although that certainly can be done.

tl;dr of my setup and settings:

  • Displays: 4K 27" x3
  • Xrandr scaling: 1.35x1.35
  • GNOME scaling factor: 2

How to use

Create the autostart directory if it does not exist:

mkdir -p ~/.config/autostart

Clone the repository:

git clone https://github.com/hohloh/x11-fractional-multi-display && cd x11-fractional-multi-display

Make your modifications to set_all_displays.sh. You can see your currently connected displays using:

xrandr

You will have to reference these displays inside the script in the correct order.

The xrandr command will also show you information about which display is set to "primary". In order to figure out the correct order/positioning, you can use your DEs/WMs built in tools or a tool like arandr.

The other most important thing you will want to change in the script is of course scale. See the note above for a reference and adjust it to your preference.

Copy the files to autostart:

cp set_all_displays.sh set_displays.desktop ~/.config/autostart

Make the script and .desktop files executable:

cd ~/.config/autostart && sudo chmod +x set_all_displays.sh set_displays.desktop 

Log out and back in to confirm your settings.

About

An autostart script introducing fractional display scaling for X11 using multiple displays. Includes ordering of display outputs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages