Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would like to launch my game only in the external monitor which I have attached to my laptop with hdmi cable. This is my current xorg.conf

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 319.60  (buildmeister@swio-display-x64-rhel04-15)  Wed Sep 25 15:17:31 PDT 2013

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

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

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

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "metamodes" "1024x786,NULL;1280x720,NULL;NULL,1680x1050;NULL,1920x1080"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Although with this config nothing changes (I have my game displayed in the laptop screen and exceeding a little bit onto the external monitor since I set it to be in 1920x1080)

I have read this https://help.ubuntu.com/community/XineramaHowTo but with no luck of solving this issue.

The only temporary solution for this problem now is to manually switch of the laptop display and then launch the game.

EDIT

Now I have tried something like this but still it show in the laptop display and extends till external monitor)

Section "Screen"

# Removed Option "metamodes" "1024x786,NULL;1280x720,NULL;1680x1050,NULL;NULL,1920x1080"
# Removed Option "nvidiaXineramaInfoOrder" "DFP-0"
# Removed Option "metamodes" "DFP-0: nvidia-auto-select +0+483, DFP-1: nvidia-auto-select +1366+0;DFP-0: NULL +0+483, DFP-1: 1920x1080, +1366+0"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-1"
    Option         "metamodes" "DFP-0: NULL +0+0, DFP-1: 1920x1080 +1366+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

EDIT

And this would turn off the laptop screen, awkwardly scale the external screen, turn on the sound from the game but no video output (only desktop)

Option         "metamodes" "DFP-0: nvidia-auto-select +0+483, DFP-1: nvidia-auto-select +1366+0;DFP-0: NULL, DFP-1: 1920x1080, +1366+0"
share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.