by xolve · 5y ago · 0 comments
Even worse is when you connect an external monitor which is not HiDPI and now everything is bigger than usual.
Instead scale the whole display and this works perfectly. I have explained it here: https://np.reddit.com/r/linuxquestions/comments/4c2o4p/what_... (Except one hiccup, but its way better than tuning inidividual knobs)
I have added the command to /etc/X11/xinit/xinitrc so it scales automatically when I login:
xrandr --output eDP1 --scale 0.60x0.60
This has been a real bugbear for me. I'm a big fan of small sharp bitmap terminal fonts, but as my new laptop is now the same resolution as my external monitor I have a choice between comically small on the laptop display or comically huge on the monitor.
Wayland just punts on the issue by removing the compositor from any decision involving scaling. The "Wayland Way" is for the compoisitor to relay information (monitor-reported scale, etc) to the client, and have the client figure out how to scale itself correctly.
Unfortunately this means that these HiDPI bugs have to be fixed over and over in myriad apps and toolkits, and software (cough cough chromium) that is so complicated that it cannot use a toolkit.
Some compositors like sway will let you do in-compositor scaling, but this is admittedly a kludge: it produces blurry scaled-up output instead of rendering at the right resolution in the first place. The sway authors acknowledge this; the feature is only there as a "better than nothing" workaround.
FWIW this is also the "Xorg Way" (RandR provides all the necessary information), it is just that clients do not bother.
Ideally the window manager would use the information provided by RandR to set up default scale levels for each monitor and then send notifications to the applications whenever the window changes monitor to alter their scale levels (this would also allow for custom per-window scale level that is applied on top of the per-monitor scale level in case someone wants to scale up/down a specific window - e.g. scaling up some notepad-like editor for a screencast).
This does require each client (and toolkit) to support arbitrary scaling... and window managers to agree on such a message, though i do remember an email about this topic being posted on Xorg mailing list some time ago. AFAIK Qt should already provide the necessary functionality for this.
There is nothing that can be done about this from the view of the display server. The application and toolkits have to be updated to support high DPI.
https://wayland-client-d.dpldocs.info/wayland.client.protoco...