LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 02-14-2024, 04:23 PM   #1
globus999
LQ Newbie
 
Registered: Feb 2024
Posts: 4

Rep: Reputation: 0
Help!!! Dual monitor display issue shifted


Hi,
Ubuntu 20.04 patched up to date.
I have a problem with the video output from a Radeon card (dual monitor) into two monitors. The card is:

Code:
lspci –v 
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV620 LE [Radeon HD 3450] (prog-if 00 [VGA controller])
        Subsystem: Dell OptiPlex 980
        Flags: bus master, fast devsel, latency 0, IRQ 33
        Memory at e0000000 (64-bit, prefetchable) [size=256M]
        Memory at f7df0000 (64-bit, non-prefetchable) [size=64K]
        I/O ports at dc00 [size=256]
        Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: radeon
        Kernel modules: radeon
OR

Code:
sudo lshw -c display
  *-display                 
       description: VGA compatible controller
       product: RV620 LE [Radeon HD 3450]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:01:00.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
       configuration: driver=radeon latency=0
       resources: irq:33 memory:e0000000-efffffff memory:f7df0000-f7dfffff ioport:dc00(size=256) memory:c0000-dffff
With a "radeon" driver:

Code:
modinfo radeon
filename:       /lib/modules/5.15.0-94-generic/kernel/drivers/gpu/drm/radeon/radeon.ko
license:        GPL and additional rights
description:    ATI Radeon
author:         Gareth Hughes, Keith Whitwell, others.
Both monitors go through different KVMs. They are on a “Join Displays” configuration in Ubuntu (aka extended desktop). The setup is as follows:
PC -> Radeon card (dual output) -> KVM #1 -> DVI-0
-> KVM #2 -> DVI-1
DVI-0 goes through the “good” KVM #1 and provides Ubuntu with the correct characteristics for the monitor. Consequently, edid can read its characteristics. This is the “primary” monitor.

Code:
sudo get-edid | parse-edid
This is read-edid version 3.0.2. Prepare for some fun.
Attempting to use i2c interface
Problem requesting slave address: Device or resource busy
No EDID on bus 1
No EDID on bus 2
No EDID on bus 4
No EDID on bus 5
1 potential busses found: 3
256-byte EDID successfully retrieved from i2c bus 3
Looks like i2c was successful. Have a good day.
Checksum Correct

Section "Monitor"
	Identifier "ASUS VA24E"
	ModelName "ASUS VA24E"
	VendorName "AUS"
	# Monitor Manufactured week 49 of 2020
	# EDID version 1.3
	# Analog Display
	DisplaySize 530 300
	Gamma 2.20
	Option "DPMS" "true"
	Horizsync 24-84
	VertRefresh 48-75
	# Maximum pixel clock is 180MHz
	#Not giving standard mode: 1920x1080, 60Hz
	#Not giving standard mode: 1680x1050, 60Hz
	#Not giving standard mode: 1440x900, 60Hz
	#Not giving standard mode: 1280x1024, 60Hz
	#Not giving standard mode: 1280x960, 60Hz
	#Not giving standard mode: 1280x720, 60Hz
	#Not giving standard mode: 1152x864, 75Hz
	Modeline 	"Mode 0" 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync 
EndSection
DVI-1 goes through the “old” KVM#2 which does not provide Ubuntu with any monitor characteristics. From the documentation, I know that the second monitor is an ASUS VP249 which is extremely similar to the first one. This is the “secondary” monitor. Edid cannot read its characteristics. I get zilch. Even if I run:

Code:
 ls /sys/class/drm/*/edid | xargs -i{} sh -c "echo {}; parse-edid < {}"
/sys/class/drm/card0-DIN-1/edid
Partial Read... Try again
/sys/class/drm/card0-DVI-I-1/edid
Checksum Correct

Section "Monitor"
	Identifier "ASUS VA24E"
	ModelName "ASUS VA24E"
	VendorName "AUS"
	# Monitor Manufactured week 49 of 2020
	# EDID version 1.3
	# Analog Display
	DisplaySize 530 300
	Gamma 2.20
	Option "DPMS" "true"
	Horizsync 24-84
	VertRefresh 48-75
	# Maximum pixel clock is 180MHz
	#Not giving standard mode: 1920x1080, 60Hz
	#Not giving standard mode: 1680x1050, 60Hz
	#Not giving standard mode: 1440x900, 60Hz
	#Not giving standard mode: 1280x1024, 60Hz
	#Not giving standard mode: 1280x960, 60Hz
	#Not giving standard mode: 1280x720, 60Hz
	#Not giving standard mode: 1152x864, 75Hz
	Modeline 	"Mode 0" 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync 
EndSection
/sys/class/drm/card0-DVI-I-2/edid
Partial Read... Try again
Consequently, xrander switches to a “generic” set of resolutions for this monitor. This is what I get:

Code:
xrandr -q
Screen 0: minimum 320 x 200, current 2944 x 1080, maximum 8192 x 8192
DIN disconnected (normal left inverted right x axis y axis)
DVI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
   1920x1080     60.00*+
   1680x1050     59.95  
   1280x1024     75.02    60.02  
   1440x900      59.89  
   1280x960      60.00  
   1152x864      75.00  
   1280x720      60.00  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    59.94  
   720x400       70.08  
DVI-1 connected 1024x768+1920+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768      60.00* 
   800x600       60.32    56.25  
   848x480       60.00  
   640x480       59.94
So, as the resolution I need is not listed for DVI-1, I went the standard route:

Code:
cvt 1920 1080 60
# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr --addmode DVI-1 "1920x1080_60.00"
And then I selected the new 1920x1080 resolution in Settings and changed the DVI-1 output. This works. Just to make sure that this gets automatically setup during boot, I added the last two commands into the ~/.profile file. So, every time it boots, the DVI-1 resolution gets set to 1920x1080.

BUT, there is a problem which I thought I could solve easily. It turns out that the DVI-1 display is shifted to the left and behind the DVI-0 (the primary), thus, leaving a “dead band” on the left and a black column to the right.
Now, I thought that I could solve this because if I go to settings and switch to any of the other modes xrandr auto-generates (i.e. 1024x768 or 800x600), the DVI-1 display IS centered correctly without overlaps of any kind. So, theoretically speaking, if I could “clone” the exact command xrandr is using for a lower resolution but swapping in the 1920x1080, that should be it.

However, I have been at this for almost a week and no matter what I try it simply does not work!!!

Before we continue, please note that I have about 7 PCs with all kinds of Windows OS installed in them going through the exact same KVMs and none of them, not one, has this problem. Furthermore, in some of those PCs I use even higher resolution without any problems. So, it’s not the KVM’s.

Furthermore, some time ago, I had a different Ubuntu PC (20.04) on the same KVMs and it did generate the correct centered display with the 1920x1080 resolution. Unfortunately, that box was wiped out because of hardware failure. So, no idea why it worked but from the back of my mind I seem to remember that once I implemented the cvt circus, it auto-centered. And no, I did NOT use the Auto feature in the monitor. And no, I can’t use the auto-feature of the monitor because a) it does not adjust that far and b) even if it did, it would screw-up the other PCs. So, the Auto feature of the monitor is not an option.
This leaves me with the “soft” option of adjusting via xrandr. These are some of the things I tried:

Xvidtune: the only resolution it accepts is 1024x768 and if I try to change to anything else, it generates the error: “Sorry: You have requested a mode-line that is not possible, or not supported by your hardware configuration”. So, this is a dead end.

HSyncStart and HSyncEnd: I tried the solution outlined here:

https://www.linuxquestions.org/quest...hz-4175726213/

which worked for the OP and it consisted in “pushing” the screen to the left (in his case) by modifying HSyncStart and HSyncEnd by +300 units. In my case, I did the same but I decreased by 300 units leaving me with this command:

Code:
xrandr --newmode "1920x1080_60.00"  173.00  1920 1748 1948 2576  1080 1083 1088 1120 -hsync +vsync
But it does not work. The system rejects the option:

Code:
 xrandr --newmode "1920x1080_60.00"  173.00  1920 1748 1948 2576  1080 1083 1088 1120 -hsync +vsync
peter@DEVU:~$ xrandr --addmode DVI-1 "1920x1080_60.00"
peter@DEVU:~$ xrandr --output DVI-1 --mode "1920x1080_60.00"
xrandr: Configure crtc 1 failed
And yes, I did play with different unit numbers with the same error. CRTC 1 (whatever that may be) fails every time. So, this is another dead end.

Position: I thought that the easiest way to shift to the right would be something along the Pos command (as hinted by the xrandr output or calculated):

Code:
DVI-1 connected 1024x768+1920+0 (normal left inverted right x axis y axis) 0mm x 0mm
So, I went with the standard CRV 1920 1080 60 (same as above) and changed the output for DVI-1 to the acceptable 1920x1080 resolution, same as before. This is OK but shifted. Then I played around with the Pos command as so:

Code:
xrandr --output DVI-0 --mode "1920x1080" --pos 0x0 --rotate normal --output DVI-1 --mode 1920x1080_60.00 --pos 1920x0 --rotate normal
In the example above, I am shifting DVI-1 1920 “units” to the right, 1920 being the width of DVI-0 (same as hinted by xrandr –q output). But nothing. No effect.

I tried multiple parameter values on DVI-1 and DVI-0 but no luck. Pos does the job of moving the screen right or left relative to each other BUT it does not get rid of the “permanent” shift of DVI-1 to the left.

Driver replacement: I tried to see if I could replace the driver (currently “radeon”) with something proprietary. The AMDGPU does not support my current card (too old) as far as I can tell. The AMD Catalyst (fglrx) driver does not support my current kernel (up to 3.4). So, no luck here. I am stuck with “radeon”. But, then again, the whole driver circus for AMD is quite confusing and I could be mistaken.

Anyhow, I am at the end of my rope and have no idea whatsoever what to try next.

Any help would be immensely appreciated,

Tx!
 
Old 02-15-2024, 08:22 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,147

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
Maybe I missed it in your long post but when you swap things around does the problem stay with the monitor, the KVM or the Radeon port?
 
Old 02-15-2024, 09:24 AM   #3
globus999
LQ Newbie
 
Registered: Feb 2024
Posts: 4

Original Poster
Rep: Reputation: 0
Unhappy

Quote:
Originally Posted by smallpond View Post
Maybe I missed it in your long post but when you swap things around does the problem stay with the monitor, the KVM or the Radeon port?
Hi, yes. Things do stay around. Anything on the "old" KVM has that shift. Obviously, the problem is that the KVM is not sending the EDID info, but, as I said before, my previous 20.04 install did not have this problem and neither any Windows OS. So, it has to be Ubuntu-related... somehow...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
display horizantly shifted for redhat 9.0, redhat enterprise and fedora core dudely Linux - Enterprise 3 08-13-2005 12:28 PM
display horizantly shifted for redhat 9.0, redhat enterprise and fedora core dudely Linux - Software 3 08-12-2005 10:18 AM
display horizantly shifted for redhat 9.0, redhat enterprise and fedora core dudely Linux - Newbie 1 08-11-2005 04:11 PM
display on LCD monitor shifted switching Windows to/from Linux thanhvn Linux - Software 6 06-24-2005 12:36 AM
MDK9.1 display shifted Samsara Linux - Laptop and Netbook 5 06-05-2003 10:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 10:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration