dual monitor setup behaves strange w/ full screen applications

Greetings!

I’m using OpenSUSE 12.2 w/ KDE 4.9.1 repositories and driver 304.43 from the Nvidia repository.
I have my xorg.config set up in TwinView mode - the notebook’s internal monitor is always turned “off” and the external monitor is specified as primary.

Now, this configuration works superbly, until the moment I’d like to start a fullscreen application (e.g. any game that launches fullscreen). When this happens, the external monitor turns OFF and the internal turns ON. Applicaton opens on the latter, which is not what I want. After exiting the application, monitors switch back to previous state, desktop is shown on the external again.
One thing I noticed, if I switch to a higher resolution (inside the app.) than internal monitor is capable of, output is directed back to external monitor - as it should have been from the beginning. And when I take the resolution back, the internal kicks in again.
Also, windowed applications behave as normal when opening.

Honestly, I’ve no idea what’s causing this. Fiddled a lot w/ xorg.conf, to no avail. If anyone has any suggestions, it would be much appreciated and I’m willing to try. :slight_smile:
If it helps, my xorg.conf looks like this:


Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "IMPS/2"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "yes"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Seiko/Epson"
    HorizSync       30.0 - 75.0
    VertRefresh     60.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 240M"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "1"
    Option         "TwinViewXineramaInfoOrder" "DFP-1"
    Option         "metamodes" "DFP-0: NULL, DFP-1: 1920x1200 +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Did you try the multimonitor support options in KDE system settings?

Actually, I don’t edit xorg.conf directly anymore. I just use nvidia-settings as root to set twinview and write a minimum adequate xorg.conf, and KDE settings to customize behavior. Works fine in one machine running oS 11.4 KDE4.8.4, and almost as well in another running oS 12.1 KDE4.9.0, but this last one still need some tweaking. Both machines with the same graphics cad running nvidia’s blob.

Thank you for your reply! I’ve also tried editing the display options from KDE’s system settings - right now it’s in “sync” with my xorg.conf. Though I’ll try out a few combinations tomorrow and see what happens if I remove the xorg.conf in addition to that.
Frankly, the 12.2 release is so incredibly stable (congrats to that) on my computer, that my biggest complaint is alone this little thread. :]

Alright, I removed xorg.conf and tried using only KDE’s display options in system settings. The result is the same, switches displays on launching full screen apps/games. After I kill the apps, the display remains on the wrong screen (internal monitor) and when I check the KDE settings panel, my display settings on it are also changed to comply with current behaviour. Wonder where the file used for storing these settings resides. Any ideas on what more I could try?

Wonder where the file used for storing these settings resides.

The display config changes are stored in ~/.kde4/share/config/krandrrc

FWIW, there is a long-running KDE bug report that deals with the persistence of KDE display settings affecting dual monitor configuration.

Thank you for the information, I will try to fiddle with this some and get back with what I found.

Okay, I’ve been reading about the krandrrc config file and by looking at mine, something just doesn’t add up… is it just me, or there really shouldn’t be any duplicates of “Screen_0_Output_<display>_#” for each monitor? No editing done to the file since this is a fairly new install of OpenSUSE 12.2.

Here’s the entry:


[Display]
ApplyOnStartup=true
StartupCommands=xrandr --output LVDS-0 --off
xrandr --output HDMI-0 --pos 0x0 --mode 1920x1200 --refresh 59.9502
xrandr --output HDMI-0 --primary

[Screen_0]
OutputsUnified=false
UnifiedRect=0,0,0,0
UnifiedRotation=1

[Screen_0_Output_HDMI-0]
Active=true
Rect=0,0,1920,1200
RefreshRate=59.9501724243164
Rotation=1

[Screen_0_Output_HDMI-1]
Active=true
Rect=0,0,1920,1200
RefreshRate=59.9501724243164
Rotation=1

[Screen_0_Output_LVDS-0]
Active=false
Rect=0,0,1366,768
RefreshRate=0
Rotation=1

[Screen_0_Output_LVDS-1]
Active=true
Rect=0,0,1024,768
RefreshRate=59.9201316833496
Rotation=1

Do I need “[Screen_0_Output_LVDS-1]” and “[Screen_0_Output_HDMI-1]” to be in there?

Hm, I removed those lines but nothing changed, problem remains.

Tried a few commands with xrandr, now I can describe more specifically what the problem is like. When the switch occurs, it’s like something would trigger the following command automatically:
xrandr --output LVDS-0 --mode 1366x768 --output HDMI-0 --off

And when I exit, it changes back, like triggering:
xrandr --output LVDS-0 --off --output HDMI-0 --mode 1920x1200

(LVDS-0 is inner notebook display; HDMI-0 is external display)

Now the question is, what could trigger such behaviour on a “fresh” install?

I think you will find that this behaviour is determined by the nvidia driver (not the desktop environment). The driver is not fully RandR compliant either, so that might explain why the krrandrc settings don’t work as intended.

I think you should try configuring with ‘nvidia-settings’ as brunomcl suggested. When executed with root privileges, it can be used to create a working xorg.conf file.

Here’s an Ubuntu post, where this was done successfully:
[SOLVED] External monitor as default/primary display (Nvidia) - Ubuntu Forums](http://ubuntuforums.org/showthread.php?t=1546324)

Thanks for the info! Unfortunately, it didn’t work. I already did that, and the results were the same. :S However, after some googlin’, I found out that the culprit are games that make use of SDL. It just doesn’t handle dual monitor setups correctly. There are some workarounds posted how to get around this issue over here:
How to run Humble Bundle V games on a system with Nvidia Twinview? - Ask Ubuntu

It’s not that big of a hassle to manually override, but I feel this is one of the things which should just work out of the box. Anyway, I just hope this will get fixed sometime in the future! :slight_smile:

Thanks for the support guys - if anyone happens to have a better solution, feel free to paste it here. :slight_smile: