Multi GPU XY offsets

I was told to toss bugs/problems with the nVidia drivers here.

So for a while now I’ve been trying to get my multi GPU set up to work correctly. What I find is that some applications seem to get the wrong XY for dialogs and various other UI elements. So right clicking something on one screen pops the dialog up on another screen rather than under the mouse cursor. This offset jump will also happen with some application windows. I’ve found this to be the case both vertically and horizontally depending on the screen/GPU layout and can’t seem to figure out why, how to possibly fix it etc.

Running 440.82 drivers on XUbu 18.04 5.0.0-25-generic

Originally I had PCIe 1 running my 1660 and top three screens. 1060 in PCIe2 running lower 3. This caused vertical issues. So if I right clicked for a dialog the dialog would pop up on the screen above/below where it should. Clicking the title bar on some things like a terminal would shoot the window 1080px below/above where it was clicked and to position things I’d have to always offset by 1080px.

If I run the GPU’s where say the array is horizontal I get the same issues but the offset is now 1920px. So basically some things get a full screen width/height (depending on the set up) offset wrong.

I’ve tried inverting the PCIe positions of the cards (which did fix some things but also broke others) and I’ve tried swapping around the ports being used. There just seems to be no rhyme or reason as to why the XY coordinates are wrong/broken for some things when the two cards are in use. If I use the xfwm key to “grab” and move a typically problematic window things are fine. I have however tested this with a full clean Ubuntu “Unity” install (can’t remember the WM being used by Unity) and the same issues exist so it’s not an xfwm issue but something more “driver wide.”

As a final LULZ some of the dialogs will honor the mouse position where it is. So right click, dialog pops up on another screen but moving your mouse where it is highlights the menus correctly. Meanwhile others make you move your mouse to where the dialog popped up to highlight and select. Terms and Web Browsers are the full applications that seem most affected by this issue making positioning windows like some sick shell game…

Are you running a Xinerama setup or two independent screens? In case of Xinerama, did you disable xfwm’s compositor?

I’ve tried with and without Xinerama (though without makes the set up useless). I’m pretty sure I’ve disabled the compositor but I’d have to test again to be sure. I’ve been fighting this for months and I’ve forgot a lot.

I’ll try to strip things down and toss the second GPU back in in a bit to test with the compositor disabled however I don’t see why the XFWM compositor would be the issue when the Unity WM does the same thing. I know both having the same problem doesn’t rule them out, they could both be polling the wrong tool for the coordinates. This is also why this is frustrating as I could never get a solid answer about what it being polled for XY…so is this a rather common WM problem or is the drivers custom randr passing “assumed” positions to the WM?

Compositing in general doesn’t work (well) with Xinerama and is an unsupported setup leading to weird results.

Give me a few min to dig the card out and I’ll retest to me sure. I really want to get my 6 screens back!

Forgot: adding up to this, the xfwm compositor doesn’t work well with the nvidia driver.

I’ve never had an issue with it. - k powering off to test.

Compositor disabled, same BS, just gibbed looking windows now that alpha is no longer supported.

I suppose a question to ask (which I’ve never found an answer to) is there a way to find out what methods an application are using or what tools it’s polling to get coordinates. So for example all my browsers but one have the offset issue. This extends from dialogs to the whole window. Where as my DAW for example some dialogs display under the cursor as intended while others have the offset jump. This would suggest some windows and dialogs are polling the correct info where as some are not. So one is asking absolute where another is being lazy and just asking on a screen, not which screen.

Kind of weird. While Xinerama certainly isn’t anything recommendable, I’ve never heard of cursor issues. Might be a broken Xinerama extension of the Xserver, did you already upgrade to the latest 1.20 version?

1.2 of what XFCE? (thought current was 1.4 something.

Xorg-server 1.20
https://wiki.ubuntu.com/Kernel/LTSEnablementStack

Everything is current on my machine and for that all 18.04.4 has is xorg-server 2:1.19.6-1ubuntu4.4

Xinerama is the only thing that makes multi GPU worthwhile. Without it everything is locked (as you know). However it’s not a cursor issue, it’s a window XY issue. In some cases windows query the position of the window or cursor in what seems by screen rather than by total screen space. So in one instance the window will ask for XY and get 3975 for the width. Where as in another it queries a different tool which returns the XY of just a single screen. So if I’m 30 pixels in on screen 3 it says draw at 30px when in reality it should be drawing at 3870px. This changes based on the physical order of the GPU’s. I got this working before by crippling my 1660 in the slower second PCIe2 slot and putting the slower 1060 in PCIe1. This makes me think the driver is doing something whack with ordering based on bus. This also changes if the offset happens horizontally or vertically. With the 1660 in the correct PCIe slot and 6 screens the offset is vertical. So clicking to move a window will shoot it down 1080px from where the cursor is. If the GPU’s are still in the correct spot but the layout is horizontal i.e. screens 1 and 3 on the 1060 with the center screen off the 1660 the offset becomes horizontal 1920px wide.

Again, please upgrade to xorg 1.20:
sudo apt-get install --install-recommends xserver-xorg-hwe-18.04

1.20 no change…

Ok, did you already try to play with the Xinerama related config options, e.g.
Option "nvidiaXineramaInfo" "false"
https://download.nvidia.com/XFree86/Linux-x86_64/384.98/README/xconfigoptions.html

No I had not but the docs don’t make it overly clear as to where to place this directive, i.e. globally (if so which section) or per screen along with its xinerama options. I just tried it per XScreen, nothing. Also just tried in the ServerLayout…still nothing. I’d like to say I might as well yank and change the PCIe but at that point I might as well leave the second GPU to rot on my shelf.

p.s. if you can let the rmariani dude know I can’t reply I’d be thankful. It gave me some BS warning about max replies for a new user.

Msg to rmariani
Start by letting me know how many screens per GPU. If you enabled Xinerama you don’t need to launch things by defining the DISPLAY variable. Are you running with or without xine?

***It won’t let me reply anymore and tells me wait 20 hours

Well neither made a difference. Just for chits and giggles I did just swap my PCIe which helped previously when running GPU’s “vertically” but it just makes the offset worse when the screens are horizontal to the GPU’s.

Reply to rmariani -I’m confused are you not using the nVidia driver panel to set this up? If you’re writing your xorg.conf by hand we’re kinda in the wild west for you. Use the drive panel.

**not sure if either of you will see this since I’m locked out by the stupid reply limit but…
#1 generix why are you so anti xinerama? I’ve used it forever, hardware accel isn’t disabled, it simply limits the faster card to the lower card, i.e. lowest common denominator. I can play games or anything else (like compositing) just fine.

#2 xinerama is about the only good way to do this. I know what you’re saying and I told him too that if he had a use case that required the max potential of the faster card he would want to run them separate. However if he’s like me i.e. just wants more screens to monitor logs, read, code etc xinerama is THE best and only way to set things up so you can naturally drag things around and use tools that should be global. Even thing like the window lists is often locked to a single xscreen meaning you need to waste screen space with redundant tool bars / panels just to get basic functionality when running each GPU / XScreen separately.

All nvidia options can be placed in device and screen sections.

Thanks for continuing here. I am using one screen per GPU. As soon as I enable Xinerama by adding the option on top of the xorg.conf file (taking care of placing the second screen LeftOf first screen) and reboot, both screens goes in the same mode, i.e. just mouse moving and no contents. So I need to reboot and go in recovery mode and remove the Xinerama. I read many forums and blogs, e.g. about nouveau, but still not able to find a way to run Xinerama. Any suggestion will be welcome. Thanks.

@rmariani TBH, with your setup you should stay away from Xinerama. Since you’re running different GPUs, HW accel will be disabled added to the usual Xinerama downsides.
Why are you doing this in the first place, i.e. what’s your intended use-case?

I think you are right, I don’t really need Xinerama at end. I just need the possibility to run things in the two GPUs separately and monitor the results in two independent screens. It was mainly for the sake of understanding if I had something fundamentally wrong in my setup.

#1 generix why are you so anti xinerama? I’ve used it forever, hardware accel isn’t disabled, it simply limits the faster card to the lower card, i.e. lowest common denominator. I can play games or anything else (like compositing) just fine.

#2 xinerama is about the only good way to do this. I know what you’re saying and I told him too that if he had a use case that required the max potential of the faster card he would want to run them separate. However if he’s like me i.e. just wants more screens to monitor logs, read, code etc xinerama is THE best and only way to set things up so you can naturally drag things around and use tools that should be global . Even thing like the window lists is often locked to a single xscreen meaning you need to waste screen space with redundant tool bars / panels just to get basic functionality when running each GPU / XScreen separately.

rmarinai I’d say you definitely DO want xinerama if you want to use your desktop naturally. If you never move or reposition things then locking everything to a single GPU is fine but you’ve not really said what you’re after. If you are trying to leavearage each GPU at it’s max acceleration then yes you want to keep them separate but if you just want to use things naturally, browser tab tearing to the other screen, move a office doc here or there then xinerama is the only way.

I’m not sure why generix is so against xine, sure it applies a lowest common denominator to the GPU but I’ve never seen this matter. I can game fine, or do anything frankly. My only issue is the XY offset.

Speaking of the Original Point to this post…I had tried an full Ubuntu install a few months ago to see if the issue existed or if it was an XFWM problem. It did indeed exist/persist with the full Ubuntu WM. I grabbed an iso for POP-OS with the nVidia driver and will do a test later on with it to see if I get the XY problems with it. Not a great test since POP_OS just switched to a hybrid/gnome/tiling set up but if the applications that freak out under Ubuntu/XUbuntu still do then I know this is most likely the NV driver.

I feel like this has become muttled across two posts but another point FOR Xinerama is simply my DAW and other production stuff is meant to be run across all the screens, which is impossible without Xinerama thus disabling it is worthless. I need to be able to span tools and windows across every screen, not be limited per GPU. If I was OK with being limited per GPU I could just toss the other GPU’s in another machine and run the screens/applications off them. For example my DAW, one screen is tracking, one screen is mixer, one screen is routing/FX, one screen is midi, one screen is tools, another screen is notes, info and misc. If I didn’t have Xinerama all that would be crammed onto a single GPU’s screens and I’d spend all day raising and lowering/hunting for damned windows and dialogs.

This would also be moot if nVidia would make a decent card for this purpose. It kills me that a 2080 Ti can only run the same damn amount of screens as my 1060. All pixel locked at 7680x4320. The NVS 810 is the only card that semi fits the bill but the vram and fact the system still sees it as two cards makes it a super expensive and completely pointless product over just buying 2 cheap 4 or 5 out models.