← Back to list

Scaling Your Display on Linux with xrandr / Per-Monitor Scaling on Linux

How to use xrandr to change the scaling of your displays in X11

Zoe · 2022-02-14 15:27 · 1 claps · 3.0 min read
#xrandr #x11 #wayland #linux #display
Open on Medium ↗
Wiki topics: 🔓 · Open Source

Scaling Your Display on Linux with xrandr / Per-Monitor Scaling on Linux

I would like to preface this article with a disclaimer: I am in no way an expert in Linux. In fact, I installed my first distro a little over a week ago as of the time of writing. I am simply here to share the tips & tricks I learned while getting things set up.

Photo by Arian Darvishi on Unsplash

Photo by Arian Darvishi on Unsplash

If you are anything like me, you may have experienced frustration with the scaling of your displays on Linux. I have three monitors: two 1080p monitors, and one central 4k display. Unfortunately, the DPI (dots per inch) of my displays is not respected by the OS, leading to a large disparity between the scale of applications between the different monitors. To make matters worse, only integer multipliers (1x, 2x, etc.) were supported on my installation. Luckily for us, there are a couple different methods we can use to scale our displays on Linux.

Wayland

What is Wayland and how does it relate to scaling displays? Wayland is a display server which offers itself as a modern alternative to X11 — the (37 year old) window system which comes with most distros by default. Unlike X11, or simply ‘X’, Wayland supports per-monitor/per-display scaling, and not only that but it supports this even better than some other operating systems like Windows or Mac. Unfortunately, there are some drawbacks to Wayland: at the moment it is still quite unstable, and if your PC has an Nvidia graphics card, well, it’s a no-go for sure. If you do not use an Nvidia GPU it may be worth researching.

X11 — xrandr

While per-monitor scaling may not be supported on X11, there is still something we can do. RandR is written as an extension to the X11 protocol, allowing for the rotation, reflection and resizing of a screen. Using the xrandr command we can apply scaling to our displays to effectively increase the resolution (zooming out) or decrease the resolution (zooming in). Together with the global scale that applies to all displays, we can use xrandr to achieve our desired effect.

First, you will want to open your terminal and run the xrandr command by itself. You should encounter a result similar to the depicted output in the following picture:

xrandr terminal output

xrandr terminal output

Pay attention to the IDs of the connected displays. Here we can see two of the connected displays I want to scale — HDMI-0 and DP-1. We will use these IDs when scaling the displays.

Next we want to calculate the factor to scale our displays by — since my displays are 1080p (already scaled in the picture), and my target resolution is 1440p, I can simply divide 1440 by 1080 to get roughly 1.3333. Since we scale both the width and the height, the scaling factor for each of my 1080p displays is 1.3333x1.3333. To scale your monitor(s), we will enter commands in the format xrandr --output ID --scale SCALE FACTOR. For my HDMI display, that would take the form of the following:

xrandr --output HDMI-0 --scale 1.3333x1.3333

If you have multiple displays, you may realise that once you have applied the scaling there is some overlap — go to your display settings, wherever those may be found on your distribution, and move your displays to make room for their new size.

Help! My windows have been scaled, but my desktop hasn’t!

On KDE Plasma this can be fixed by running the command plasmashell --replace. Be careful not to close the terminal window after running this command — it will run the desktop environment process in this window, and closing the terminal will stop the desktop environment. If this happens, you can open a new terminal window with Ctrl + Alt + T and should be able to run the command again to restart Plasma.

Conclusion

That’s it! You will also want to look into how you can have these commands run automatically when you log in to your session. If you have any suggestions or problems with the methods described in this article, please do not hesitate to reach out to me. I wish you all good luck in your experience with Linux.


메타데이터
post_id
e05f2b7ae39
slug
scale-your-display-with-xrandr-e05f2b7ae39
url
https://medium.com/@mondscheinbach/scale-your-display-with-xrandr-e05f2b7ae39
canonical_url
https://medium.com/@mondscheinbach/scale-your-display-with-xrandr-e05f2b7ae39
author_url
https://medium.com/@mondscheinbach
status
ok
fetched_at
2026-07-27 12:31:45