xrandr scale 2x2 for multi display (4K HiDPI and Full HD mix) - blurred output
I also have 4k monitor on my notebook. What I am typically doing is just setting 1920x1080 mode for 4k monitor and it looks perfect actually, exactly as 1080p monitor. Just do not scale or antialias, you need to find a way to just have 2x2 pixels.
Related videos on Youtube
Ayberk Özgür
Updated on September 18, 2022Comments
-
Ayberk Özgür over 1 year
On Kubuntu 17.04 with
nouveau
, I'm trying to obtain a dual monitor setup with a 4K as main one and a Full HD (actually 1920x1200 but makes no difference) on the right.I'm using double KDE system scale (as described in https://wiki.archlinux.org/index.php/HiDPI#Using_KDE_system_settings) along with
xrandr
scaling (as described in https://wiki.archlinux.org/index.php/HiDPI#Side_display). More specifically:xrandr \ --output eDP-1 --mode 3840x2160 --pos 0x0 --auto \ --output DP-2 --mode 1920x1200 --pos 3840x0 --auto \ --panning 3840x2400+3840+0 --scale 2.0x2.0 \ --fb 7680x2400
The problem is that
DP-2
has slight blur, especially on the fonts, due to downsampling from 3840x2400 to 1920x1200. This is noted at the end of https://wiki.archlinux.org/index.php/HiDPI#Side_display, with the suggested solution being the sharpness setting on the monitor. Tried it, doesn't work.The filter being used when scaling is bilinear: https://cgit.freedesktop.org/xorg/app/xrandr/tree/xrandr.c?id=5d5db88d106a49d7560a8042fa054df8b609f00a#n2993. Nearest neighbor is also supported with
"nearest"
but looks abysmal even though it is exactly 2x2 downsampling, which I don't understand. I went ahead and built this with"lanczos"
instead of"bilinear"
. Apparently, this is not supported:X Error of failed request: BadName (named color or font does not exist) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 26 (RRSetCrtcTransform) Serial number of failed request: 36 Current serial number in output stream: 37
Is there a way to support lanczos (or a better filter)? I don't mind filtering done in software.
Right now, I have double KDE scaling and
xrandr
scaling disabled with 1920x1080 native resolution on my main display as a workaround. The secondary display is super sharp, including the fonts, as expected. However, from normal viewing distance, the main display looks even worse than the scaled secondary, which is also weird as half resolution is still Full HD, which looks amazingly sharp on other displays that are not 4K.So the real question is, there any way of getting sharp images on both displays?
Edit: Forgot to mention the important fact that I'm on an Nvidia PRIME system with GeForce 940MX and Intel HD Graphics 620. On nvidia-384 the results are the same when using Intel, i.e the same blurs. When using GeForce,
--scale 2x2
option has no effect and--panning
option generates aFailed Request
error similar to the above.-
binamenator almost 6 yearsMaybe I'm missing something, but why are you scaling the outputs and then panning? Shouldn't you be using xrandr options like
--right-of
or--left-of
? I think if you use those, the resolutions shouldn't have to scale and therefore won't be blurry. Sorry I would comment but I don't have enough rep. -
Ayberk Özgür almost 6 yearsBecause the monitors are physically similar in size and without scaling the low-res one, the main one has too small features (fonts, windows etc.)
-
Ibrahim over 5 yearsDid you ever figure anything out with this? I think Wayland sounds like the holy grail of multi-DPI support eventually, but it seems like right now nVidia drivers do not play well with Wayland so I'm stuck either with blurry text or getting a 4k screen.
-