Possible Change in "xrandr" behavior?

Please post suggestions for improvement of Cinnamon here
https://github.com/linuxmint/Cinnamon
Post Reply
ytene
Level 3
Level 3
Posts: 147
Joined: Sat Mar 16, 2013 3:10 pm

Possible Change in "xrandr" behavior?

Post by ytene » Sun Aug 12, 2018 5:37 pm

Hello Everyone,

I'd be grateful for any advice on what I might be doing wrong when attempting to set up my triple monitors to work with 19.0 Tara... I am very sorry that the explanation that follows is a bit long - but I can't see how to shorten this and still give a basic outline to the problem...

Thank you in advance for any suggestions.

I have a computer with an nVidia 1080GTX Monitor that runs 3 Dell U2415W Monitors, each at 1920x1200@60Hz. Last night I performed a clean installation of 19.0 and got a clean boot. I've performed an initial "Software Update" and have no outstanding installations to perform.

When I get to the Cinnamon desktop, the "Menu" bar is located on the centre of three monitors. If I then drag the mouse off the right edge of the centre display, it appears on the left edge of the left monitor. Progressing further right, it exits the right edge of the left monitor and appears on the left edge of the right monitor... In other words, the desktop thinks my monitor setup looks like this:-

(Left Side) (Centre) (Right Side)
Centre Monitor Left Monitor Right Monitor
[DVI-D-1] [DP-2] [HDMI-1]

Now, in all previous versions of Mint, I have been able to quickly and easily correct this issue with an xrandr command... First I would issue the command with no parameters, to get a status report of how the system "sees" my displays, then I would issue a command that looks like this:-

xrandr --auto --output DP-2 --left-of DVI-D-1

I would test this using the command line and then, once I confirmed it works, I would add it to Cinnamon as a Startup script. Up until now, this solution has worked perfectly.

With 19.0, however, I get a slightly different result. I have captured the "before" and after" versions of the xrandr trace, which you can see here (output truncated to remove the resolution option details - for simplification):-

1. Before A Change
Screen 0: minimum 320 x 200, current 5760 x 1200, maximum 16384 x 16384
DVI-D-1 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 connected 1920x1200+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm
HDMI-1 connected 1920x1200+3840+0 (normal left inverted right x axis y axis) 518mm x 324mm
HDMI-2 disconnected (normal left inverted right x axis y axis)

2. My Change Command

xrandr --auto --output DP-2 --left-of DVI-D-1

3. After The Change
Screen 0: minimum 320 x 200, current 7680 x 1200, maximum 16384 x 16384
DVI-D-1 connected primary 1920x1200+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
HDMI-1 connected 1920x1200+5760+0 (normal left inverted right x axis y axis) 518mm x 324mm
HDMI-2 disconnected (normal left inverted right x axis y axis)


Can you see, in the "After" status output, above, how the x-axis position for the start of HDMI-1 has changed from +3840 to +5760 - all without me doing anything to touch it?

The net effect is that if I issue the command displayed at step 2, above, I am able to successfully swap the position of my left and centre monitors with respect to rendering my desktop, but the act of doing this leaves a "gap" where the "DVI-D-1" monitor *used* to be... So when I pan my mouse cursor from the left screen through the centre to the right, there is an apparent "gap" between the right edge of the centre monitor and the left edge of the right monitor. This gap is 1920 pixels wide...

Earlier versions of Mint [well, earlier versions of xrandr] have not done this before. Once I saw this go wrong, I have tried to "fix" this by issuing a command along the lines of this:-

xrandr --auto --output HDMI-1 --pos 3840x0

but this doesn't seem to solve the problem.

I rather think that I am missing something obvious here, but, having been tinkering for an afternoon, I'm fresh out of ideas.

Happy to experiment and report back if anyone would care to suggest something to try.

Thank you in advance.

User avatar
powerwagon75
Level 3
Level 3
Posts: 164
Joined: Sun Feb 28, 2016 4:05 pm
Location: USA

Re: Possible Change in "xrandr" behavior?

Post by powerwagon75 » Sun Aug 12, 2018 6:54 pm

Presuming you are running an Nvidia driver, it's likely that in Menu -> Administration, you have an Nvidia XServer program.

If you open it up, you should see something similar to below when clicking on the X Server Display Configuration.

If you do, you can drag the displays around how you want them to be. (they can be butted up against each other, in my instance, I keep the separation there because if they are touching each other it messes with one of our Steam games.) Also, once you manipulate them to where you want them, be sure to "X" the box for "Make this the primary display for the X screen", while the display you want as primary is highlighted, before hitting apply. If all looks good, you have an option button there to save to X Configuration file.
nvidia_XServer_Display_Layout.png
Image
Image

ytene
Level 3
Level 3
Posts: 147
Joined: Sat Mar 16, 2013 3:10 pm

Re: Possible Change in "xrandr" behavior?

Post by ytene » Mon Aug 13, 2018 1:45 am

Hello PowerWagon,

Many thanks for responding...

I do have the nVidia X Server Settings application. When I launch it, I do indeed see my three displays and I do observe that, at the outset, they appear in the wrong order. I am able to use the application to reorder them so that they appear correctly.

When I then click the "Apply" button (and click OK in the resultant validation check), then I get a desktop that is correctly arranged. However, if I reboot at this point, my changes are not persistent.

There is another button in the application, "Save to X Configuration file". However, when I click that, there is no pop-up or alert to indicate success or failure and, further, the change is not persistent.

If I then launch this application directly from a console, using:-

sudo /usr/bin/nvidia-settings

then my attempt to save the configuration reveals some additional information, which appears in the console window immediately after the launch statement:-

# /usr/bin/nvidia-settings
** Message: 06:35:09.231: PRIME: No offloading required. Abort
** Message: 06:35:09.231: PRIME: is it supported? no
Package xorg-server was not found in the pkg-config search path.
Perhaps you should add the directory containing `xorg-server.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xorg-server' found


So it looks as though I can use the nVidia application to make the change "in the session", but I am presently unable to preserve this across reboots. This was the point that I reached with earlier versions of Mint. The solution I came across was to use xserver, because I could re-issue the command line in "Startup"...

Do you happen to know how I can preserve this change please?

User avatar
powerwagon75
Level 3
Level 3
Posts: 164
Joined: Sun Feb 28, 2016 4:05 pm
Location: USA

Re: Possible Change in "xrandr" behavior?

Post by powerwagon75 » Mon Aug 13, 2018 8:10 am

When you open nvidia-settings with terminal, set your displays up, select the Save button, browse to /etc/xorg.conf, or if it don't currently exist, fill in to create an xorg.conf file if one is not already created. If one already exists, you can "X" the merge with existing file box.
Saving_xorg.png
ps....I've seen on this forum and others previously, that some folks state they have to start nvidia-settings in terminal with sudo, to get changes to persist. For whatever reason, I've never done it that way, and my changes have always updated xorg.conf and persisted. ymmv
Image
Image

User avatar
powerwagon75
Level 3
Level 3
Posts: 164
Joined: Sun Feb 28, 2016 4:05 pm
Location: USA

Re: Possible Change in "xrandr" behavior?

Post by powerwagon75 » Tue Aug 14, 2018 8:23 am

Looking again at your last reply, in this:

Code: Select all

# /usr/bin/nvidia-settings
** Message: 06:35:09.231: PRIME: No offloading required. Abort
** Message: 06:35:09.231: PRIME: is it supported? no
Package xorg-server was not found in the pkg-config search path.
Perhaps you should add the directory containing `xorg-server.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xorg-server' found
only the first two lines would normally be there in a typical desktop application.

You can try installing this xserver-xorg-dev from synaptic package manager.

Checking in terminal, I see these results:

Code: Select all

hmlx@HmLx ~ $ apt contains xorg-server
xserver-xorg-dev: /usr/include/xorg/xorg-server.h
xserver-xorg-dev: /usr/lib/pkgconfig/xorg-server.pc
xserver-xorg-dev: /usr/share/aclocal/xorg-server.m4
The second line is the one your system is complaining about missing. I would restart the system after installing to ensure everything is fresh.
Image
Image

ytene
Level 3
Level 3
Posts: 147
Joined: Sat Mar 16, 2013 3:10 pm

Re: Possible Change in "xrandr" behavior?

Post by ytene » Tue Aug 14, 2018 12:24 pm

Thanks for all the contributions - they are very much appreciated.

Last night I spent about 2 hours working through the options - without success. In the end, with 30 minutes of time remaining before I had to stop for the night, I decided I'd double-check my installation process [this was on a clean build, on a brand new SSD]. I re-ran the installation [first refreshing the partition table to start with a "clean" SSD and went through the process a second time. This time, although I believe i followed the exact same build process, I ended up with xrandr working exactly as I would expect it to - i.e. I ended up with the proper, anticipated result.

In that sense, I could mark this one down to experience, forget about it, then move on. However, I'll provide a little additional information on a potentially related topic, just in case this might somehow be related... I am sorry that this might get a bit lengthy, but in this case, details most definitely count.

The hardware on which I am experimenting is based upon:-

MSI Big Bang Power II Motherboard, with latest available BIOS
Intel Core i7 Extreme Edition 4960X, overclocked from 3.6 to 4.3GHz
32Gb DDR4 RAM at 2400MHz
Asus 1080GTX GPU, all stock in terms of RAM, config, clock speed
3 x Dell U2415W Monitors, 1920x1200x60Hz, giving 5760x1200 desktop

My connectivity between GPU and Monitors is as follows:-

Centre Monitor - DVI-D-0 GPU Socket on GPU to HDMI1 Socket on Monitor
Left Monitor - DisplayPort Socket on GPU to Mini-DisplayPort Socket on Monitor
Right Monitor - HDMIPort Socket on GPU to HDMI1 Socket on Monitor

[I also have a small fanless PC, based on an Intel Core i7 8700T an an Asus H170i motherboard, which has 3 display output sockets and allows me to run triple screen. I use a KVM for keyboard and mouse and switch displays using the monitor "Source" value from the button menus - to avoid the ghosting seen with KVMs]

Issue One - Windows Upgrade
I dual boot this hardware between Mint and Windows 10 by using an Akasa docking bay for 2.5" drives. In March and June/July of this year, when Microsoft rolled out their major updates, each upgrade resulted in my Windows 10 builds, on this platform, trashing their display configurations. Recovery turned out to be possible, but in both cases it was necessary to clean install the nVidia drivers.

Issue Two - Application-Induced Display Breakage
I have a package that runs on Windows [which is called DVDFab] which I use to convert video between different file formats. The package does this by using the CUDA engine in the nVidia 1080GTX to accelerate the calculations [it's pretty good]. However, when I use this program [and it's done it several times now], it has a habit of inducing my GPU driver [under Windows] to "forget" my DisplayPort-connected Monitor.

It did this yesterday and I was able to reboot to get the display "back". It did the same thing again this morning and a reboot made no difference. In the past recovering will now require me to basically perform a clean installation of the nVidia driver, having first disconnected 2 of the three monitors, then add them back in.
-=-=-=-=-=-=

I am starting to get a little suspicious of the "DisplayPort" part of this software stack. I don't think that the problem I see in Windows is hardware related, however, because I have seen the same issue with my fanless system - which uses an Intel CPU/GPU. **However** the fanless system connects to the "Left" Monitor using HDMI, not DisplayPort.

Earlier today I took delivery of a mail-order HDMI-HDMI cable, so I'm going to swap the connector from the 1080GTX "DisplayPort" Adapter to the Dell Monitor "MiniDisplayPort" and use HDMI instead, then see what happens... If that doesn't work I might then map out on paper a complete process-of-elimination that swaps cables, monitors and ports and sees if this problem continues to align with any one source...

Pretty much every time I've been able to fix this, but it's getting a bit too common for my liking.

Really grateful for all the helpful advice - it's what makes the Mint community the Best!

Wish me luck...

Post Reply

Return to “Cinnamon”