screen resolution issues on Xorg

HumblePie

New Member
Joined
Apr 13, 2024
Messages
12
Reaction score
9
Credits
117
Hi

Via xrandr my display keeps showing at 3424x1926, I am not sure where its getting this resolution from, but my max display for my monitor is 3840x2160 and I currently have it set at 2560x1440.



I have a Nvidia Geforce 4060, and I need to go into the X-server settings and change the ViewPortIn to 3840x2160 (its set at 3424x1926). The reason I need to do this is I have major problems with games as I think it tries to put the resolution on both my monitor and laptop screen or something and the games dont startup. Once I Change the ViewPortIn to 3840x2160 everything is fine.

However when I restart my computer, settings go back to 3424x1926.



Is there a way I can write a script or somehow get this ViewPortIn to be at 3840x2160?

Here is my xrandr output.

Bash:
Screen 0: minimum 8 x 8, current 3424 x 1926, maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 3424x1926+0+0 (normal left inverted right x axis y axis) 697mm x 392mm
   3840x2160     60.00 + 143.99   119.99   119.88   100.00    59.94    50.00    29.97    25.00    23.98
   2560x1440    120.00*   59.95
   1920x1080    144.00   120.00   119.88   100.00    60.00    59.94    50.00    23.98
   1680x1050     59.95
   1440x900      59.89
   1440x576      50.00
   1440x480      59.94
   1280x1024     75.02    60.02
   1280x960      60.00
   1280x720     119.88    60.00    59.94    50.00
   1152x864      75.00
   1024x768      75.03    70.07    60.00
   800x600       75.00    72.19    60.32    56.25
   720x576       50.00
   720x480       59.94
   640x480       75.00    72.81    59.94    59.93
DP-2 connected (normal left inverted right x axis y axis)
   2880x1800    120.00 +  60.00

Thank you
 


Is there a way I can write a script or somehow get this ViewPortIn to be at 3840x2160?
Don't know why it defaults to 3424x1926 because monitor preferred resolution is 3840x2160 (+ sign)

You can use xrandr to change resolution with:
Bash:
xrandr --output HDMI-0 --mode 3840x2160

This won't save it for reboot but here is a solution to make it permanent:

edit:
I have a Nvidia Geforce 4060
According to xrandr docs preferred monitor resolution (+ sign) is reported to driver, so it could be your driver does not handle it properly.
I'd try to configure things in Nvidia control panel or update driver or both.
 
Last edited:
Just configure it in the display settings of whatever DE you are using and not with xrandr?
 
Don't know why it defaults to 3424x1926 because monitor preferred resolution is 3840x2160 (+ sign)

You can use xrandr to change resolution with:
Bash:
xrandr --output HDMI-0 --mode 3840x2160

This won't save it for reboot but here is a solution to make it permanent:

edit:

According to xrandr docs preferred monitor resolution (+ sign) is reported to driver, so it could be your driver does not handle it properly.
I'd try to configure things in Nvidia control panel or update driver or both.
ok so I tried that its really wierd, the Screen 0 current in xrandr is showing an even smaller resolution even though it changes to 3840x2160. So as you can see there is a star * against the 3840x2160 line at 60hz, but the current now shoes as 5136 x 2889 and the HDMI-0 connected primary is 5136x2889. Trying to understand why this is.

Bash:
Screen 0: minimum 8 x 8, current 5136 x 2889, maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 5136x2889+0+0 (normal left inverted right x axis y axis) 697mm x 392mm
   3840x2160     60.00*+ 143.99   119.99   119.88   100.00    59.94    50.00    29.97    25.00    23.98 
   2560x1440    120.00    59.95 
   1920x1080    144.00   120.00   119.88   100.00    60.00    59.94    50.00    23.98 
   1680x1050     59.95 
   1440x900      59.89 
   1440x576      50.00 
   1440x480      59.94 
   1280x1024     75.02    60.02 
   1280x960      60.00 
   1280x720     119.88    60.00    59.94    50.00 
   1152x864      75.00 
   1024x768      75.03    70.07    60.00 
   800x600       75.00    72.19    60.32    56.25 
   720x576       50.00 
   720x480       59.94 
   640x480       75.00    72.81    59.94    59.93 
DP-2 connected (normal left inverted right x axis y axis)
   2880x1800    120.00 +  60.00
 
So as you can see there is a star * against the 3840x2160 line at 60hz, but the current now shoes as 5136 x 2889 and the HDMI-0 connected primary is 5136x2889. Trying to understand why this is.
The "Screen" value 5136x2889 refers to X-Window screen, not a resolution of physical monitor.

Monitor refers to a physical display device, such as an LCD panel.
Screen refers to an X-Window screen (that is: a monitor attached to a display).
Display refers to a collection of screens that are in use at the same time showing parts of a single desktop (you can drag windows among all screens in a single display).

man xrandr says how to override X-Window screen size:

--fb widthxheight
Reconfigures the screen to the specified size. All configured monitors must fit within this size. When this
option is not provided, xrandr computes the smallest screen size that will hold the set of configured out‐
puts; this option provides a way to override that behaviour.

Therefore I'd say you can try xrandr -fb 3840x2160 to set X-Window size to the size of your primary monitor which can be set to same resolution like your screenshot shows.
Note that these settings are valid only for the current X session.

EDIT:
I tried that its really wierd, the Screen 0 current in xrandr is showing an even smaller resolution even though it changes to 3840x2160
I see where the problem might be, we resized monitor resolution but not X-Window, therefore this should work:

Bash:
xrandr --output HDMI-0 --mode 3840x2160
xrandr -fb 6720x3960

6720 x 3960 is the sum of both monitors as is now equal to X-Window screen size.

If this doesn't work I suggest you to study arch link above if you want to configure things manually.
 
Last edited:
Thanks everyone I have found out the issue.

It appears to be the 'fractional scaling'.

When i use this the xrandr X-Window size changes. This is fine in most applications but when i launch games in Steam it cannot handle this.

I guess I will have to look at troubleshooting this seperately, at least figured out what the issue was.

Thanks all
 


Top