Alienware w/ GX 970/Intel Optimus: garbled Xinerama data is presented to applications in dual-monito

I have an Alienware 15R2 with Skylake integrated graphics and NVIDIA GTX 970M discrete graphics in an Optimus configuration.

maxtothemax@maxtothemax-mint ~ $ inxi -xxx -G
Graphics:  Card-1: Intel Skylake Integrated Graphics bus-ID: 00:02.0 chip-ID: 8086:191b
           Card-2: NVIDIA GM204M [GeForce GTX 970M] bus-ID: 01:00.0 chip-ID: 10de:13d8
           Display Server: X.Org 1.18.3 driver: nvidia Resolution: 1920x1080@60.00hz, 1920x1080@60.02hz
           GLX Renderer: GeForce GTX 970M/PCIe/SSE2 GLX Version: 4.5.0 NVIDIA 361.42 Direct Rendering: Yes
maxtothemax@maxtothemax-mint ~ $

I have proprietary drivers installed through driver-manager, since I failed to get Optimus working right when I tried installing the driver manually. I do not have any PRIME or other offloading system installed, I just restart the X server to go between Intel and NVIDIA mode. (EDIT: my bad, I am using PRIME for this.) Everything basically works, and the 3D performance is good, but there are a couple of problems. A minor niggle is that the HDMI output on the laptop only works in NVIDIA mode, never in Intel mode. But the big problem is that when in NVIDIA mode using a dual-monitor configuration, the Xinerama monitor data presented to applications is somehow garbled. The attached screenshot was taken with a dual-monitor configuration enabled. You can see that:

    [*]The laptop's built-in monitor doesn't show up in the "nvidia-settings" program at all, making it impossible to use that program to configure a dual-monitor setup. It doesn't show up in the "Selection" drop-down menu, although that's hard to screenshot. Clicking "Detect Displays" does not detect the built-in monitor either. [*]The two monitors show up just fine in the "mate-display-properties" program, and that's how I was able to disable mirror mode and configure my dual monitor setup. [*]Despite there being two monitors running, The Xinerama data only shows a single "head."

This last point is the most problematic one. It means that every window manager I’ve tried-- marco, openbox, etc.-- is confused. I can drag windows between my monitors just fine, and resize them just fine, but when I maximize a window, it always jumps to the external monitor, even if it was on my laptop monitor. Furthermore, lots of games (for example Mute Crimson+ on Steam) are confused and will refuse to fullscreen or even refuse to start.

I was able to reproduce this issue using the NVIDIA 352.x proprietary driver packaged in Linux Mint 17.3/Ubuntu 14.04, and also using the NVIDIA 361.42 driver from Mint 18/16.04, which I’m running now (with the 64-bit 4.4.0-14 generic kernel. I also wasn’t able to find any similar bug reports to this in my googling.

Let me know if there’s any additional troubleshooting I can do or information I can provide, as this is a very annoying issue.

-Max Eliaser.
nvidia-bug-report.log.gz (220 KB)

Upgrading to nvidia 367.35 from the graphics-drivers PPA did NOT fix this issue either. Here is my updated bug report log.
nvidia-bug-report.log.gz (206 KB)

My mistake, I do have the nvidia-prime package installed. So my original post is wrong, I am using PRIME. Still have this problem.

The workaround suggested here isn’t working for me. Disabling IgnoreDisplayDevices appears to have no effect at all. The “fake” monitor that is supposed to appear when that option is disabled did not appear for me. I even tried hex-editing the gpu-manager executable to have the same effect, and while this resulted in an xorg.conf with the IgnoreDisplayDevices option disabled, that didn’t help either.

Were you able to resolve this issue? I’me experiencing something similar as a describe here:

This post seems relevant, where an NVIDIA staff member says this is expected: at least for the nvidia-settings part of things. The Xinerama being broken is another issue.

By disabling hybrid graphics in my BIOS, I was able to get it to boot. It messes with Plymouth’s ability to accept input for some reason, so I needed to turn off boot splash in the Linux commandline and blind type my encryption passphrase for my disk. Not ideal but at least I can use that screen now. Hopefully I’ll figure out the right combination of framebuffer settings to make it work, or I’ll switch to some hardware encryption method and not care about boot prompts working.

According to this post, it’s a known issue and the NVIDIA people are working on it. Your thread seems pretty dead on accurate to what I’ve experienced. Unfortunately, I still have no workaround (and no BIOS switch to turn off either GPU, on my particular computer.)

I was thinking about trying this thing next: GitHub - phillipberndt/fakexrandr: Fake XRandR configurations for multi-head setups with crappy video drivers, like fakexinerama but with xrandr but I haven’t actually done it yet.