Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 04-10-09, 10:42 AM   #1
Vadim P.
Registered User
 
Join Date: Mar 2008
Posts: 28
Default How to toggle between dual monitor and single modes?

Hi,

How can I make my laptop realize that it's not plugged into an external monitor anymore when I unplug it? It's rather inconvenient to only see half of the expo or have applications start on the non-existent monitor.

I realized I have this button labelled laptop/monitor, which sort of worked - it made the laptop fill the resolution. But when I pressed it again while plugged in, the monitor did not assume the role of another display - it just mirrored what the laptop showed (and my resolution was still huge, I could 'scroll' around the main screen).
Vadim P. is offline   Reply With Quote
Old 04-11-09, 08:08 AM   #2
wvengen
Registered User
 
Join Date: Nov 2008
Posts: 30
Default Re: How to toggle between dual monitor and single modes?

Hi Vadim, use can use nvidia-settings to switch between modes. There is a button "detect displays" in section "X Server Display Configuration" to re-probe the connected monitors when it was changed. If you want to do this programatically, e.g. on the press of a button, you can use disper ( http://launchpad.net/disper ).
wvengen is offline   Reply With Quote
Old 04-11-09, 08:51 AM   #3
Vadim P.
Registered User
 
Join Date: Mar 2008
Posts: 28
Default Re: How to toggle between dual monitor and single modes?

Thanks a bunch. I got disper installed from the PPA.

I think "disper --resolution=auto" should fix it when I'm unplugged, yes?
Vadim P. is offline   Reply With Quote
Old 04-11-09, 09:57 AM   #4
wvengen
Registered User
 
Join Date: Nov 2008
Posts: 30
Default Re: How to toggle between dual monitor and single modes?

You'll find out when running disper that you need to specify an action; -c for clone or -e for extend. In both cases when no external adapter is connected only the internal display will be enabled. And, by the way, --resolution=auto should be the default so you can leave it out.
wvengen is offline   Reply With Quote
Old 04-14-09, 04:49 PM   #5
Vadim P.
Registered User
 
Join Date: Mar 2008
Posts: 28
Default Re: How to toggle between dual monitor and single modes?

Lovely.

I think I'll add a "make a panel applet for this" on my todo
Vadim P. is offline   Reply With Quote
Old 05-25-09, 11:39 AM   #6
klemi
Registered User
 
Join Date: Aug 2008
Posts: 12
Default Re: How to toggle between dual monitor and single modes?

Hallo,
Does function disper also under Linux 64 bit?

Thanks!

>Klemi
klemi is offline   Reply With Quote
Old 05-25-09, 11:47 AM   #7
NvFuchs
Registered Fox
 
NvFuchs's Avatar
 
Join Date: Oct 2007
Location: Confoederatio Helvetica
Posts: 530
Default Re: How to toggle between dual monitor and single modes?

Quote:
Originally Posted by klemi View Post
Hallo,
Does function disper also under Linux 64 bit?

Thanks!

>Klemi
Yes.

Fuchs
NvFuchs is offline   Reply With Quote
Old 06-14-09, 04:46 PM   #8
klemi
Registered User
 
Join Date: Aug 2008
Posts: 12
Default Re: How to toggle between dual monitor and single modes?

now I have Ubuntu 9.04 (64bit) installed under my laptop LG 510 Giave with nvidia-card. disper I have also installed - without problems.

What I want: I would like to have which is connected if the external monitor in the laptop only this monitor "actively". If I use the laptop beyond the desk, however, the screen of the laptop should function of course.


I have configured with nvidia-settings the Additional / external monitor with 1920x1200 resolution in Configure display Divice as a separate X screen.
I have do this her:
This is the result in xorg.conf

Code:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 1.0  (buildmeister@builder62)  Wed May 27 01:59:40 PDT 2009


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

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
EndSection

Section "ServerFlags"
    Option         "Xinerama" "0"
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"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "LPL"
    HorizSync       30.0 - 75.0
    VertRefresh     60.0
    Option         "DPMS"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "HP LP2475w"
    HorizSync       30.0 - 94.0
    VertRefresh     48.0 - 85.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9600M GT"
    BusID          "PCI:1:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9600M GT"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "DFP-0: 1440x900_60 +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "DFP-2: 1920x1200_60 +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
Code:
klemens@klemens-laptop:~$ disper  -p
backend: nvidia
associated displays: DFP-0
metamode: DFP-0: 1440x900_60 @1440x900 +0+0
scaling: stretched
If I give then the order "disper-e"

Code:
klklemens@klemens-laptop:~$ disper -e
unrecognised scaling value for DFP-0 from nvidia-settings: 131073
unrecognised scaling value for DFP-2 from nvidia-settings: 131073
if on the fly is switched on in nvidia-settings the "Twin View" mode - what I want to cause not really.

I receive then:
Code:
~$ disper -p
backend: nvidia
associated displays: DFP-0, DFP-2
metamode: DFP-0: 1440x900 @1440x900 +0+0, DFP-2: 1920x1200 @1920x1200 +1440+0
scaling: stretched, stretched

The lower Panel on the laptop has completely disappeared afterwards, the upper one seems to be stretched. One is able to do the announcement elements for battery, printers etc.are not to be seen.

What do I make wrong? Can somebody help me?

Klemi
klemi is offline   Reply With Quote

Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:42 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.