New ubuntu install, monitors keep switching order on reboot

I just reinstalled ubuntu 20.04, updated to kernel 5.6, and installed the amdgpu drivers as I just got an rx6800. Edit: My session is Wayland also.

After a little bit of a rough start things are working great, however when I reboot I seem to have about a 1 in 3 chance for my two side monitors to switch on me. Which is very annoying as they are also vertical monitors so they also flip upside down when this happens.

Anyone know what’s going on? or suggestions?

Also checking xrandr, I’ve noticed that my monitors change numbers regularly.

After resetting my primary display, I currently have it all the way at WAYLAND6. When it was WAYLAND1 yesterday at one point.

xrandr
Screen 0: minimum 16 x 16, current 5440 x 2560, maximum 32767 x 32767
XWAYLAND0 connected 1440x2560+4000+0 (normal left inverted right x axis y axis) 340mm x 600mm
1440x2560     59.93*+
XWAYLAND2 connected 1440x2560+0+0 (normal left inverted right x axis y axis) 340mm x 600mm
1440x2560     59.93*+
XWAYLAND6 connected primary 2560x1440+1440+170 (normal left inverted right x axis y axis) 600mm x 330mm
2560x1440    143.83*+
1 Like

I switched to xorg and it fixed the “primary” monitor problem, but randomly on reboot my outer two monitor still switch

1 Like

So monitor 1 and monitor 2 are both the same model monitor and both running on displayport. Randomly on reboot they seem to initialize in different orders. Is there any way to reassign the numbers between the two?

You may be having an issue with AutRandr.

But if you are using static configurations, you should be able to specify a monitor by port and set a permanent position.
https://wiki.archlinux.org/index.php/Multihead#RandR

Also, it sounds like you are using the closed source driver instead of the opensource driver (since you are on Kernel 5.6) so you may be running into issues from that too.

I was using amdgpu for the driver but I actually switched to amdgpu-pro last night, I want to update to the 5.10 kernel but I currently require the ACS patch and it doesn’t look like that exists for anything newer than 5.8.

Thank you for the info and the wiki link. I’ll try that after work and let you know!

Just checked xrandr with comparing before and after a flip. Looks like xrandr doesn’t change at all. It’s looking like the GPU is assigning the ports differently sometimes on boot.

xrandr
Screen 0: minimum 320 x 200, current 5440 x 2560, maximum 16384 x 16384

DisplayPort-0 disconnected (normal left inverted right x axis y axis)

DisplayPort-1 disconnected (normal left inverted right x axis y axis)

DisplayPort-2 connected primary 2560x1440+1440+170 (normal left inverted right x axis y axis) 596mm x 335mm
2560x1440 59.94 + 164.83* 143.86 119.88
1920x1200 59.94
1920x1080 143.85 120.00 119.88 60.00 60.00 59.94
1600x1200 59.94
1680x1050 59.95
1280x1024 75.02 60.02
1440x900 59.89
1280x800 59.94
1280x720 120.00 119.88 60.00 59.94
1024x768 75.03 70.07 60.00
800x600 72.19 75.00 60.32 56.25
720x576 50.00
720x480 60.00 59.94
640x480 75.00 72.81 60.00 59.94

HDMI-A-0 disconnected (normal left inverted right x axis y axis)

DisplayPort-3 connected 1440x2560+4000+0 right (normal left inverted right x axis y axis) 598mm x 336mm
2560x1440 59.95*+
1920x1080 60.00 50.00 59.94 24.00 23.98
1680x1050 59.95
1280x1024 75.02 60.02
1440x900 59.89
1280x960 60.00
1280x800 59.81
1152x864 75.00
1280x720 60.00 50.00 59.94
1024x768 75.03 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32 56.25
720x576 50.00
720x480 60.00 59.94
640x480 75.00 72.81 66.67 60.00 59.94
720x400 70.08

DisplayPort-4 connected 1440x2560+0+0 left (normal left inverted right x axis y axis) 598mm x 336mm
2560x1440 59.95*+
1920x1080 60.00 50.00 59.94 24.00 23.98
1680x1050 59.95
1280x1024 75.02 60.02
1440x900 59.89
1280x960 60.00
1280x800 59.81
1152x864 75.00
1280x720 60.00 50.00 59.94
1024x768 75.03 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32 56.25
720x576 50.00
720x480 60.00 59.94
640x480 75.00 72.81 66.67 60.00 59.94
720x400 70.08

After a reboot DisplayPort-3 and DisplayPort-4 seem to have switched which monitor they are physically representing.

Edit: formatting

Wow, I have never seen that before. You might have a legitimate bug.

Just for clarification, this happens when using amdgpu-pro and FOSS amdpgu drivers?

I was originally using the amdgpu drivers (my understanding is those are the FOSS ones) I switched to the amdgpu-pro to try to solve it. It’s still happening…

I might have to just write a script to swap the monitors…

Edit: it also probably doesn’t help that both of those monitors are identical, so it can’t even use the model number to keep them straight.

They should be unique due to the EDID. There is a serial number that is sent with the EDID. I don’t know how that is exposed through the xorg.conf file.

I couldn’t figure out setting the monitors up by unique id, but I did get 5.10.4 with the acs patch, so I was able to update the firmware folder and drivers. We’ll see if that fixes it.

They still do it :frowning:

Thank you for trying, I couldn’t figure this out. I’m going to try to switch one of the monitors to hdmi, maybe that will make it unique enough to stop switching…

I had this start happening to me out of the blue on Linux Mint 20.0 Cinnamon and I kept having to set things back manually. For whatever reason, it stopped happening (so far) after I updated to Mint 20.1 Cinnamon. :woman_shrugging:

I’m on gnome, but I should look into if it’s a gnome issue that’s potentially been addressed in an update, thanks