Configuring X to use an external monitor with nVidia drivers
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Configuring X to use an external monitor with nVidia drivers
I think that I've pretty much ended up confusing myself, so some pointers would be appreciated.
I've got a laptop with a docking station in my office. What I would like to happen is when I run startx, if the laptop is docked, it uses the LCD attached to the docking station. If not, it would use the laptop screen. What I'm NOT trying to do is set up dual screens (which is probably why I've confused myself since there is a lot of information out there on this).
I've been trying to set up a second ServerLayout in xorg.conf to handle this, so in theory all I would need to do is run startx --layout External when I'm docked, and it should use the external monitor. However, no dice. No matter how I've messed with the various options, whenever I run startx, with or without the --layout flag, the laptop only uses the laptop screen. If I activate the external DVI output, the external screen works fine.
So basically, the monitors both work, both are detected by the nVidia driver, but I can't seem to wrap my head around how to get the system to use the external monitor preferentially.
The fine details:
Slackware 12
Video card :nVidia Quadro FX 1600M
Driver: nVidia 100.14.19
I've been messing with the nvidia-settings control panel, and if anything that has left me more confused than messing with xorg.conf...
I've had them set up in the control panel as separate X screens, but I've never been able to get the behavior I'm after. The best I managed was to have both screens working, but the laptop LCD was :0 while the external monitor was :1, which isn't what I'm after. The only thing I can think is that I need to be using TwinView, but given that I only want one screen active at a time, I don't think that is what I'm after.
I don't know too much about this stuff but it seems a little difficult to do what you want to do. I've always been under the impression that you would have to kill the X server and restart it in order to completely disable a screen. Dunno.
I take it you want to save the life of your laptop screen if your not using it. Correct? Seems there would have to be a way to disable screens on the fly without a restart of X... X windows has never really been my cup of tea I'm afraid...
Do you have brightness/backlit functions for your laptop? If so, does backing all the way down affect your second screen? I would think not. It's manual but might give you something to work with until you figure out the correct way to do it.
I don't know too much about this stuff but it seems a little difficult to do what you want to do. I've always been under the impression that you would have to kill the X server and restart it in order to completely disable a screen. Dunno.
Actually, I'm looking for something a little different, I want to tell X what screen to use when I start it. If I understand the --layout flag properly, that is exactly what it is supposed to do. My problem is that I've not got my xorg.conf written properly and I'm at a loss as to what is wrong there.
Quote:
I take it you want to save the life of your laptop screen if your not using it. Correct? Seems there would have to be a way to disable screens on the fly without a restart of X... X windows has never really been my cup of tea I'm afraid...
I'm in the same boat, I've never had to delve into the guts of X before, so I'm a little lost. I'm not really trying to save the laptop screen, its just that when it is on the docking station it is tucked on a shelf under my desk and it seems more than a little pointless to have the screen running. Besides, Windows will do what I want, and I refuse to believe that Windows can do something that X can't.
Well, I finally figured out a workable solution. I'm not sure how elegant it is, but it seems to work.
It turns out I was wrong about TwinView, you do actually need to enable it, at least for the way I did it. I started out by using the nVidia control pane (nvidia-settings) to set up the two monitors as clones. I then saved the settings to xorg.conf. When I looked at the xorg.conf changes, I saw that it had defined a new Screen section:
That is the first time I had seen the monitors refered to by any identifier in xorg.conf (DFP-0 is the laptop screen and DFP-2 is the external LCD screen). I was playing with this line:
Lo and Behold, IT WORKS! When I run startx when the laptop is attached to the docking station, the external LCD monitor is used, and the laptop monitor is off. If I take it off the docking station, running startx uses the laptop monitor.
What is weird is that if I run nvidia-settings now, TwinView appears to be disabled. Like I said, this may not be the most elegant solution, but it does what I want. If anyone cares, here is the full blown xorg.conf:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.