I would like to be able to use my ultrawide monitor as a normal widescreen monitor from time to time; instead of my desktop being at the native resolution of 3440x1440, I'd like a desktop of 2560x1440, using the central 2560 columns of the monitor and ignoring the rest:
I am using the NVidia video driver, and the i3 window manager.
I have tried to accomplish this with xrandr. I found promising posts such as this one which would appear to be recipes for doing so. But if I try:
xrandr --fb 2560x1440 --output DP-0 --panning 2560x1440 --mode 2560x1440
then the monitor appears to be in 2560x1440 mode, with the desktop stretched across the whole monitor.
If I try to add a mode as suggested:
$ cvt 2560 1440 60
# 2560x1440 59.96 Hz (CVT 3.69M9) hsync: 89.52 kHz; pclk: 312.25 MHz
Modeline "2560x1440_60.00" 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync
$ xrandr --newmode WEIRD2 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync
$ xrandr --addmode DP-0 WEIRD
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 18 (RRAddOutputMode)
Serial number of failed request: 41
Current serial number in output stream: 42
I believe this (inability to add a mode and assign it to the display - BadMatch) is an issue regarding the NVidia driver, and I couldn't see a workaround.
I got closer using the nvidia-settings
application. It has an underscan mode. I used the following settings:
This is very close; I see a 2560x1440 area in the middle of the monitor, and there's no panning evident, but the X session still seems to be seeing a wider desktop, which is truncated on the right.
Can I do something with Xrandr to fix this desktop size? If I try xrandr --fb 2560x1440
, I get xrandr: specified screen 2560x1440 not large enough for output DP-0 (3440x1440+0+0)
.
Finally, as a workaround I can use i3-gaps and set the horizontal gaps to be 440 pixels. However, full screen mode for any window uses the whole monitor which is still not ideal.
Here's the output from xrandr
.
Here's the output from xrandr -v
.
And the output from nvidia-settings -q all
.
Is what I am trying to do possible, including being able to swap back and forth at will?
Edited to add:
Output from hwinfo --monitor --gfxcard
Output from sudo lshw -C display
Output from cvt 2560 1440
:
# 2560x1440 59.96 Hz (CVT 3.69M9) hsync: 89.52 kHz; pclk: 312.25 MHz Modeline "2560x1440_60.00" 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync
Output from gtf 2560 1440 60
:
# 2560x1440 @ 60.00 Hz (GTF) hsync: 89.40 kHz; pclk: 311.83 MHz Modeline "2560x1440_60.00" 311.83 2560 2744 3024 3488 1440 1441 1444 1490 -HSync +Vsync