Results 1 to 10 of 10

Thread: nvidia-settings command line

  1. #1
    Join Date
    Jan 2005
    Location
    The Netherlands
    Beans
    77

    nvidia-settings command line

    Hi,
    I'm looking for a console command to control my 2nd monitor using nvidia-settings. I want to turn it on or off in 'user space' (not editting xorg.conf). When turned on it has to use twinview (wide desktop).

    I.e. nvidia-settings -screen1 enable twinview or something like that. Already read the manual (man nvidia-settings), but I can't find the right command to do this.

    Does anyone know how to do this?
    Last edited by palomar; September 3rd, 2008 at 03:59 PM.

  2. #2
    Join Date
    Sep 2008
    Beans
    1

    Re: nvidia-settings command line

    Not tried this, but I guess you could make two configs with the gui and then load them
    Code:
    nvidia-setings -l --config=~/.nvidia-settings-rc1
    nvidia-setings -l --config=~/.nvidia-settings-rc2
    However, I don't think that this will help you

    The TODO section in the below file surgests that TwinView can't yet be configured via nvidia-settings
    ftp://download.nvidia.com/XFree86/Li...user-guide.txt

  3. #3
    Join Date
    Jan 2007
    Beans
    5

    Re: nvidia-settings command line

    No dice, Firerat. Looks like the rc file doesn't have any configuration info regarding which outputs are enabled.

  4. #4

    Re: nvidia-settings command line

    The answer is to set a metamode with 2 monitors and another with only one monitor in xorg.conf. Then you can use the usual GNOME/KDE/whatever utility for changing screen resolution.

    Here's what I have in my Screen section:

    Option "metamodes" "CRT: 1280x1024 +1280+0, DFP: 1280x1024; DFP:1280x1024,CRT: NULL"

    So the first mode is CRT at 1280x1024 offset by 1280,0 and the DFP at 1280x1024 (no offset). That means my CRT is to the right of the DFP. Then the second mode is just the DFP and no CRT.

  5. #5
    Join Date
    Jun 2006
    Beans
    15

    Re: nvidia-settings command line

    I was seeking a solution to quickly reconfigure my X display to swap between monitors. Actually, I wanted it to default to dual-screen twinview mode, and I wanted to be able to unplug the laptop and quickly reconfigure for single-display mode on the fly. Originally I'd thought to try nvidia-settings command line interface, but as it's revealed on this thread and others, nvidia-settings doesn't work for that.

    After lots of searching and trying things I stumbled upon the program "disper". I installed the Ubuntu package and the program does exactly what I wanted. http://willem.engen.nl/projects/disper/

    I used nvidia-settings to save my dual-screen setup to xorg.conf so that it will default to that on boot-up. Then I used CompizConfig to bind a shortcut key to execute the command

    Code:
    disper -d auto -e
    This auto-detects the display configuration and sets up the dual-monitor configuration if both are available. If the monitor isn't plugged in, it correctly configures just the laptop monitor. If you wanted to configure just the external monitor, you could run something like

    Code:
    disper -d CRT-0 -s
    Use "disper -l" to find out the names of your attached displays.

    Now, for the win, someone tell me how to configure this to automatically happen as soon as the monitor is unplugged! Ultimately, I think Ubuntu ought to act just like OS X with respect to on-the-fly display configuration. With disper and a hotplug type solution, we're getting close.
    Last edited by jacksenechal; March 8th, 2009 at 10:34 PM.

  6. #6
    Join Date
    Mar 2006
    Location
    Saint Petersburg, FL
    Beans
    1,123

    Re: nvidia-settings command line

    You can do if you have a basic xorg.conf file located in your /etc/X11 directory. Just press alt-F2 and run:

    Code:
    gksudo nvidia-settings
    You'll have the nvidia-settings GUI pop-up as root. Go to "X Server Display Configuration" then click the "Configure" button. You'll be given an option to enable twinview. Once you have made all of the changes you need click on "Save to X Configuration File". Nvidia-settings will back up your old xorg.conf then apply the settings. After that press crtl-alt-backspace to reload X server.

    If you run into problems just restore the backup file in the /etc/X11 directory.

    Edit:

    Twinview will only be enabled if the second monitor is connected to the actual port. So all you have to do is plug the monitor in then crtl-alt-backspace to reload X-server.
    Last edited by warp99; March 9th, 2009 at 12:32 AM. Reason: Additional information
    For those new to Ubuntu most of your answers can be found at help.ubuntu.com or ubuntuguide.org

  7. #7
    Join Date
    Dec 2008
    Location
    Denmark
    Beans
    13
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: nvidia-settings command line

    Quote Originally Posted by jacksenechal View Post
    I was seeking a solution to quickly reconfigure my X display to swap between monitors. Actually, I wanted it to default to dual-screen twinview mode, and I wanted to be able to unplug the laptop and quickly reconfigure for single-display mode on the fly. Originally I'd thought to try nvidia-settings command line interface, but as it's revealed on this thread and others, nvidia-settings doesn't work for that.

    After lots of searching and trying things I stumbled upon the program "disper". I installed the Ubuntu package and the program does exactly what I wanted. http://willem.engen.nl/projects/disper/

    I used nvidia-settings to save my dual-screen setup to xorg.conf so that it will default to that on boot-up. Then I used CompizConfig to bind a shortcut key to execute the command

    Code:
    disper -d auto -e
    This auto-detects the display configuration and sets up the dual-monitor configuration if both are available. If the monitor isn't plugged in, it correctly configures just the laptop monitor. If you wanted to configure just the external monitor, you could run something like

    Code:
    disper -d CRT-0 -s
    Use "disper -l" to find out the names of your attached displays.

    Now, for the win, someone tell me how to configure this to automatically happen as soon as the monitor is unplugged! Ultimately, I think Ubuntu ought to act just like OS X with respect to on-the-fly display configuration. With disper and a hotplug type solution, we're getting close.
    Thanks a lot this was exactly what i was looking for.
    I have simply binded disper -s and disper -S to two different keys. Now i can easily shift between my laptop monitor and my external monitor at home.

  8. #8
    Join Date
    Dec 2008
    Location
    Denmark
    Beans
    13
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: nvidia-settings command line

    Quote Originally Posted by jacksenechal View Post
    I was seeking a solution to quickly reconfigure my X display to swap between monitors. Actually, I wanted it to default to dual-screen twinview mode, and I wanted to be able to unplug the laptop and quickly reconfigure for single-display mode on the fly. Originally I'd thought to try nvidia-settings command line interface, but as it's revealed on this thread and others, nvidia-settings doesn't work for that.

    After lots of searching and trying things I stumbled upon the program "disper". I installed the Ubuntu package and the program does exactly what I wanted. http://willem.engen.nl/projects/disper/

    I used nvidia-settings to save my dual-screen setup to xorg.conf so that it will default to that on boot-up. Then I used CompizConfig to bind a shortcut key to execute the command

    Code:
    disper -d auto -e
    This auto-detects the display configuration and sets up the dual-monitor configuration if both are available. If the monitor isn't plugged in, it correctly configures just the laptop monitor. If you wanted to configure just the external monitor, you could run something like

    Code:
    disper -d CRT-0 -s
    Use "disper -l" to find out the names of your attached displays.

    Now, for the win, someone tell me how to configure this to automatically happen as soon as the monitor is unplugged! Ultimately, I think Ubuntu ought to act just like OS X with respect to on-the-fly display configuration. With disper and a hotplug type solution, we're getting close.
    Thanks a lot this was exactly what i was looking for.
    I have simply bound
    Code:
    disper -s
    and
    Code:
    disper -S
    to two different keys. Now i can easily shift between my laptop monitor and my external monitor at home.

  9. #9
    Join Date
    May 2007
    Beans
    1

    Re: nvidia-settings command line

    Disper just do the trick for me.
    Thanks for the info.

    I have just wrote a little script toggle.bash to have only 1 shortkey :
    (assuming disper is installed locally in ~/Documents/scripts/python/disper/src )


    This will display a zenity list choice.

    Code:
    #!/bin/bash
    
    #Show a selection list for DISPLAY settings
    RESPONSE=$(zenity  --list  --text "Choose display" 			\
    --radiolist  --column "Pick" --column "config" 				\
    TRUE  LAPTOP 			\
    FALSE TV 			\
    FALSE DUAL			\
    );
    
    #Disper configuration
    DISPER_PATH=~/Documents/scripts/python/disper/src
    DISPER_BIN=cli.py
    
    #Going to DISPER folder
    cd $DISPER_PATH
    
    case $RESPONSE in 
    	LAPTOP )
    		echo "Configuring display to laptop only"
    		./$DISPER_BIN -s
    	;;
    	TV )
    		echo "Configuring display to TV only"
    		./$DISPER_BIN -S
    	;;
    	DUAL )
    		echo "Configuring extended desktop to TV"
    		./$DISPER_BIN -e
    	;;
    esac

  10. #10
    Join Date
    Jun 2008
    Location
    switzerland
    Beans
    44
    Distro
    Kubuntu 13.04 Raring Ringtail

    Talking Re: nvidia-settings command line

    hey hey..

    exact this is also what i'm searching for.. easy toggle single/dual monitor GREAT.. thanks to the dev of disper...

    Quote Originally Posted by jacksenechal View Post
    I was seeking a solution to quickly reconfigure my X display to swap between monitors. Actually, I wanted it to default to dual-screen twinview mode, and I wanted to be able to unplug the laptop and quickly reconfigure for single-display mode on the fly. Originally I'd thought to try nvidia-settings command line interface, but as it's revealed on this thread and others, nvidia-settings doesn't work for that.

    After lots of searching and trying things I stumbled upon the program "disper". I installed the Ubuntu package and the program does exactly what I wanted. http://willem.engen.nl/projects/disper/

    I used nvidia-settings to save my dual-screen setup to xorg.conf so that it will default to that on boot-up. Then I used CompizConfig to bind a shortcut key to execute the command

    Code:
    disper -d auto -e
    This auto-detects the display configuration and sets up the dual-monitor configuration if both are available. If the monitor isn't plugged in, it correctly configures just the laptop monitor. If you wanted to configure just the external monitor, you could run something like

    Code:
    disper -d CRT-0 -s
    Use "disper -l" to find out the names of your attached displays.

    Now, for the win, someone tell me how to configure this to automatically happen as soon as the monitor is unplugged! Ultimately, I think Ubuntu ought to act just like OS X with respect to on-the-fly display configuration. With disper and a hotplug type solution, we're getting close.
    regards
    thomi

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •