Bug 1226881 - off-by-one with xrandr in screen size from a two display setup with nvidia drivers
Summary: off-by-one with xrandr in screen size from a two display setup with nvidia dr...
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: X11 3rd Party Driver (show other bugs)
Version: Current
Hardware: Other Other
: P3 - Medium : Normal (vote)
Target Milestone: ---
Assignee: Stefan Dirsch
QA Contact: Stefan Dirsch
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-24 11:09 UTC by Hans-Peter Jansen
Modified: 2024-06-25 09:28 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Jansen 2024-06-24 11:09:57 UTC
Today, I debugged a strange x11vnc issue, that results in a strange effect: when enabling the on-screen-keyboard on my tablet, it paints most areas black. After messing with a bunch of x11vnc options, I noticed:

Jun 24 12:19:42 desktop bash[3778]: 24/06/2024 12:19:42 Sending rfbEncodingExtDesktopSize for size (5119x1600)
Jun 24 12:19:42 desktop bash[3778]: 24/06/2024 12:19:42 Client requested resolution change to (2560x1600)
Jun 24 12:19:43 desktop bash[3778]: 24/06/2024 12:19:43 Sending rfbEncodingExtDesktopSize for size (5119x1600) resize prohibited

Digging further on my desktop for this issue:

$ xrandr
Screen 0: minimum 8 x 8, current 5119 x 1600, maximum 32767 x 32767
DP-2.8 connected 2560x1600+2559+0 (normal left inverted right x axis y axis) 641mm x 401mm
   2560x1600     59.97*+
   1920x1200     59.88  
   1920x1080     60.00    59.94    50.00    23.98  
   1680x1050     59.95  
   1600x1200     60.00  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       60.01    59.94  
   640x480       75.00    59.94    59.93  
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-0 connected primary 2560x1600+0+0 (normal left inverted right x axis y axis) 641mm x 401mm
   2560x1600     59.97*+
   1920x1200     59.88  
   1920x1080     60.00    59.94    50.00    23.98  
   1680x1050     59.95  
   1600x1200     60.00  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       60.01    59.94  
   640x480       75.00    59.94    59.93  
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)

If I add the horizontal numbers for the two monitors, that makes 5120 pixel, not 5119.

This is a classical off-by-one, but where to start digging?

Checked Xorg GitLab:
https://gitlab.freedesktop.org/xorg/lib/libxrandr
https://gitlab.freedesktop.org/xorg/app/xrandr

libxrandr didn't received any changes after release, which is on par with our TW release 1.5.4.

xrandr saw some unrelated commits after 1.5.2. I tried to apply 71ab94418ead8f59c6124e8b3e53f8df7340f095 already:

https://build.opensuse.org/package/show/home:frispete:Tumbleweed/xrandr

Did not change anything.
Comment 1 Hans-Peter Jansen 2024-06-24 11:10:47 UTC
Upstream issue:

https://gitlab.freedesktop.org/xorg/lib/libxrandr/-/issues/10
Comment 2 Stefan Dirsch 2024-06-24 11:21:41 UTC
Please try to change the position of the right monitor manually via the appropriate xrandr command to +2560+0
Comment 3 Stefan Dirsch 2024-06-24 11:25:35 UTC
Got feedback that this command succeeds

  Screen 0: minimum 8 x 8, current 5120 x 1600, maximum 32767 x 32767

but it doesn't help for x11vnc. Maybe because of this

Jun 24 12:19:42 desktop bash[3778]: 24/06/2024 12:19:42 Client requested resolution change to (2560x1600)

Who is requesting to change to 2560x1600 here?
Comment 4 Hans-Peter Jansen 2024-06-25 09:28:54 UTC
(In reply to Stefan Dirsch from comment #3)
> Got feedback that this command succeeds
> 
>   Screen 0: minimum 8 x 8, current 5120 x 1600, maximum 32767 x 32767
> 
> but it doesn't help for x11vnc. Maybe because of this
> 
> Jun 24 12:19:42 desktop bash[3778]: 24/06/2024 12:19:42 Client requested
> resolution change to (2560x1600)
> 
> Who is requesting to change to 2560x1600 here?

As it turned out, the culprit really was a one pixel overlap in the screen layout.
Since the only major component update affecting this was the plasma desktop, I suspect the culprit was the transition from plasma 5 to plasma 6!

Thanks, Stefan for pointing out, closing...