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

Newegg Daily Deals

Reply
 
Thread Tools
Old 07-04-08, 07:33 PM   #1
liquidat
Registered User
 
Join Date: Feb 2008
Posts: 2
Default Howto script nvidia-settings for an external monitor

Hello there,

I have a laptop and occasionally plug in an external monitor. In that case I want the external monitor alone, so usually I launch nvidia-settings, activate TwinView on the external screen (CRT-0), deactivate the laptop screen (DFP-0), and apply the changes.

However, it would be much nicer to have these changes done by a script. I do know that 'nvidia-settings --assign' is the way to go, but unfortunately I'm not able to reproduce the steps done in the UI. For a start, the settings TwinView is provided as a read-only option in the gui-less mode, so I cannot activate TwinView from the command line.

Is this functionality actually implemented in the command line tool? And if so, how can I do the steps (activate TwinView, afterwards deactivate the first screen)?
liquidat is offline   Reply With Quote
Old 07-05-08, 06:22 PM   #2
putin
Registered User
 
Join Date: Jul 2008
Posts: 3
Default Re: Howto script nvidia-settings for an external monitor

Have you tried saving the xorg.conf files from both setups then writing a shell script to switch between then and restart X? You might not need to use nvidia-settings at all.

I found this guy who looks to be doing something similar
http://notes.minty.org/cgi-bin/wiki...._Configuration
putin is offline   Reply With Quote
Old 07-06-08, 04:17 AM   #3
Thunderbird
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 2,105
Default Re: Howto script nvidia-settings for an external monitor

Something like that using xorg.conf tricks is the only way possible. Nvidia-settings commandline interface is not powerfull enough to enable / disable displays and things like that.
Thunderbird is offline   Reply With Quote
Old 07-06-08, 04:36 AM   #4
liquidat
Registered User
 
Join Date: Feb 2008
Posts: 2
Default Re: Howto script nvidia-settings for an external monitor

putin, the idea was to not restart X, but to have something running fully automatically. Also, it would probably take more time than using nvidia-settings.

thunderbird, sad to hear that, but thx for the reply.
liquidat is offline   Reply With Quote
Old 07-06-08, 10:30 PM   #5
putin
Registered User
 
Join Date: Jul 2008
Posts: 3
Default Re: Howto script nvidia-settings for an external monitor

Good point

I won't pretend to know much about it but I remember reading about someone using xrandr to apply changes.. maybe worth a look?
putin is offline   Reply With Quote
Old 07-09-08, 04:31 AM   #6
loswillios
Registered User
 
Join Date: Oct 2006
Posts: 15
Default Re: Howto script nvidia-settings for an external monitor

yeah maybe when nvidia decides to support randr1.2 :/
loswillios is offline   Reply With Quote
Old 09-29-08, 09:11 PM   #7
nosscire
Registered User
 
Join Date: Sep 2008
Posts: 1
Default Re: Howto script nvidia-settings for an external monitor

I'm in the exact same spot, and wondering if there ever was any nice solution to this.

Having to go through nvidia-settings is a bit cumbersome.

Thanks
nosscire is offline   Reply With Quote
Old 09-30-08, 04:32 AM   #8
zorglab
Registered User
 
Join Date: Oct 2006
Posts: 3
Default Re: Howto script nvidia-settings for an external monitor

Actually, nvidia-settings is just an open-source front-end for nvidia's NV-CONTROL X extension. Thus, it should be possible to write a small program to take care of this task. Just have a look at the source code.

The whole point here is that much of the NV-CONTROL functionalities (at least what concerns TwinView) are now specified by the more standard RandR 1.2 extension. As NV-CONTROL seems good enough for nvidia (actually it does do its job well, it's just that it hasn't a standard interface), implementing RandR 1.2 isn't on their priority list. That's sad because developers prefer to develop tools using the standard RandR, working on more graphics cards, than the proprietary NV-CONTROL.
zorglab is offline   Reply With Quote

Old 03-16-11, 11:51 AM   #9
Oleksandr
Registered User
 
Join Date: Mar 2011
Posts: 1
Default Re: Howto script nvidia-settings for an external monitor

Any news on this topic. I'm using mac os x instead of debian only because of this issue. When it's connected to gdm, sleep/wake, power cord it's really pain in the butt.
Oleksandr is offline   Reply With Quote
Old 03-17-11, 09:15 AM   #10
wsuetholz
Registered User
 
Join Date: Oct 2007
Posts: 13
Default Re: Howto script nvidia-settings for an external monitor

You can do this with xorg.conf magic.. I do something a little bit different though. When I plug in the external display I want to be able to extend my desktop to it.. I can switch between a panning mode and dual displays on the fly with out having to restart X.
The trick is in the Screen section metamodes line, and the Virtual display size including both screens. I have attached my xorg.conf from an ubuntu 10.04 system. The only problem I've had is sometimes when I start the system without the external monitor attached, it doesn't let me switch to dual screen mode, it will just switch the pan mode from one display to the other. For the most part I'm happy with how it works.

BTW: the key strokes are Ctrl-Alt-KP+ or Ctrl-Alt-KP- to switch metamodes in X

Bill
Attached Files
File Type: gz xorg_conf.txt.gz (794 Bytes, 159 views)
wsuetholz 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
GPU fan always at 100%, can not change the thermal settings legluondunet NVIDIA Linux 26 05-04-13 05:56 AM
Problems with configuring monitors and keeping them disabled with 302.17 Erosmith NVIDIA Linux 2 06-20-12 12:10 AM
Need Help Installing NVIDIA Tesla M2070Q in Linux RHEL5 Ferianto85 NVIDIA Linux 0 05-18-12 08:35 PM
Unofficial nVidia HOWTO [RPM version] Rob C. NVIDIA Linux 78 04-09-03 07:44 AM

All times are GMT -5. The time now is 08:16 PM.


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