Slackware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-02-2008, 09:06 AM
|
#1
|
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,756
|
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
Current xorg.conf
Code:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 1.0 (buildmeister@builder3) Wed Sep 12 14:30:30 PDT 2007
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder3) Wed Sep 12 14:29:35 PDT 2007
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "TouchPad" "AlwaysCore"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "ServerLayout"
Identifier "External"
Screen 0 "ExternalScreen" 0 0
# Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "TouchPad" "AlwaysCore"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
RgbPath "/usr/share/X11/rgb"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/TTF"
FontPath "/usr/share/fonts/OTF"
FontPath "/usr/share/fonts/Type1"
FontPath "/usr/share/fonts/misc"
FontPath "/usr/share/fonts/75dpi/:unscaled"
EndSection
Section "Module"
Load "xtrap"
Load "glx"
Load "dbe"
Load "extmod"
Load "record"
Load "type1"
Load "freetype"
Load "synaptics"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
Identifier "TouchPad"
Driver "synaptics"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "LeftEdge" "1700"
Option "RightEdge" "5300"
Option "TopEdge" "1700"
Option "BottomEdge" "4200"
Option "FingerLow" "25"
Option "FingerHigh" "30"
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
Option "VertScrollDelta" "100"
Option "MinSpeed" "0.09"
Option "MaxSpeed" "0.18"
Option "AccelFactor" "0.0015"
Option "SHMConfig" "on"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "LPL"
HorizSync 30.0 - 75.0
VertRefresh 60.0
Option "DPMS" "true"
#HorizSync 31.5 - 50.0
#VertRefresh 40.0 - 90.0
#
#Added by tdp
#
#Modeline "1920x1200_60" 192.16 1920 2048 2256 2592 1200 1201 1204 1242
#
EndSection
Section "Monitor"
Identifier "ExternalMonitor"
VendorName "Dell"
ModelName "2407"
Option "DPMS" "true"
HorizSync 30.0 - 83.0
VertRefresh 56.0 - 76.0
# #
# #Added by tdp
# #
# #Modeline "1920x1200_60" 192.16 1920 2048 2256 2592 1200 1201 1204 1242
# #
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "SWcursor" # [<bool>]
#Option "HWcursor" # [<bool>]
#Option "NoAccel" # [<bool>]
#Option "ShadowFB" # [<bool>]
#Option "UseFBDev" # [<bool>]
#Option "Rotate" # [<str>]
#Option "VideoKey" # <i>
#Option "FlatPanel" # [<bool>]
#Option "FPDither" # [<bool>]
#Option "CrtcNumber" # <i>
#Option "FPScale" # [<bool>]
#Option "FPTweak" # <i>
#Option "DualHead" # [<bool>]
#Option "ForceMonitors" "crt1, nolvds"
Identifier "Card0"
Driver "nvidia"
VendorName "nVidia Corporation"
BoardName "Unknown Board"
Option "AddARGBGLXVisuals" "true"
Option "TripleBuffer" "true"
#Option "RenderAccel" "true"
Option "AllowGLXWithComposite" "true"
Option "nvAGP" "1"
Screen 0
#The nvAGP was added for suspend reasons
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "SWcursor" # [<bool>]
#Option "HWcursor" # [<bool>]
#Option "NoAccel" # [<bool>]
#Option "ShadowFB" # [<bool>]
#Option "UseFBDev" # [<bool>]
#Option "Rotate" # [<str>]
#Option "VideoKey" # <i>
#Option "FlatPanel" "True" # [<bool>]
#Option "MonitorLayout" "CRT,NONE"
#Option "FPDither" # [<bool>]
#Option "CrtcNumber" # <i>
#Option "FPScale" # [<bool>]
#Option "FPTweak" # <i>
#Option "DualHead" # [<bool>]
#Option "ForceMonitors" "crt1, nolvds"
Identifier "ExternalCard"
Driver "nvidia"
VendorName "nVidia Corporation"
BoardName "Unknown Board"
Option "MonitorLayout" "CRT,NONE"
Option "AddARGBGLXVisuals" "true"
Option "TripleBuffer" "true"
#Option "RenderAccel" "true"
Option "AllowGLXWithComposite" "true"
Option "nvAGP" "1"
#The nvAGP was added for suspend reasons
Screen 1
EndSection
Section "Device"
Identifier "Videocard0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "Quadro FX 1600M"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Screen"
Identifier "ExternalScreen"
Device "ExternalCard"
Monitor "ExternalMonitor"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Section "Extensions"
Option "Composite" "enable"
EndSection
|
|
|
|
02-02-2008, 11:07 AM
|
#2
|
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
Have you tried using the control panel to set it up?
|
|
|
|
02-02-2008, 12:54 PM
|
#3
|
|
Guru
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,623
|
Try using 'nvidia-settings', yes, the control panel.
|
|
|
|
02-02-2008, 01:38 PM
|
#4
|
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,756
Original Poster
|
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.
|
|
|
|
02-02-2008, 03:29 PM
|
#5
|
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
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.
|
|
|
|
02-03-2008, 08:44 AM
|
#6
|
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,756
Original Poster
|
Quote:
|
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.
|
|
|
|
02-03-2008, 11:11 AM
|
#7
|
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,756
Original Poster
|
Solved - sort of
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:
Code:
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "1"
Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-2: nvidia-auto-select +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
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:
Code:
Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-2: nvidia-auto-select +0+0"
And for a lark removed the reference to DFP-0 to make this:
Code:
Option "metamodes" "DFP-2: nvidia-auto-select +0+0"
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:
Code:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 1.0 (buildmeister@builder3) Wed Sep 12 14:30:30 PDT 2007
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "TouchPad" "AlwaysCore"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
RgbPath "/usr/share/X11/rgb"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/TTF"
FontPath "/usr/share/fonts/OTF"
FontPath "/usr/share/fonts/Type1"
FontPath "/usr/share/fonts/misc"
FontPath "/usr/share/fonts/75dpi/:unscaled"
EndSection
Section "Module"
Load "xtrap"
Load "glx"
Load "dbe"
Load "extmod"
Load "record"
Load "type1"
Load "freetype"
Load "synaptics"
EndSection
Section "ServerFlags"
Option "Xinerama" "0"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
Identifier "TouchPad"
Driver "synaptics"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "LeftEdge" "1700"
Option "RightEdge" "5300"
Option "TopEdge" "1700"
Option "BottomEdge" "4200"
Option "FingerLow" "25"
Option "FingerHigh" "30"
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
Option "VertScrollDelta" "100"
Option "MinSpeed" "0.09"
Option "MaxSpeed" "0.18"
Option "AccelFactor" "0.0015"
Option "SHMConfig" "on"
EndSection
Section "Monitor"
#VertRefresh 40.0 - 90.0
#
#Added by tdp
#
#Modeline "1920x1200_60" 192.16 1920 2048 2256 2592 1200 1201 1204 1242
#
Identifier "Monitor0"
VendorName "Unknown"
ModelName "LPL"
HorizSync 30.0 - 75.0
VertRefresh 60.0
Option "DPMS" "true"
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "SWcursor" # [<bool>]
#Option "HWcursor" # [<bool>]
#Option "NoAccel" # [<bool>]
#Option "ShadowFB" # [<bool>]
#Option "UseFBDev" # [<bool>]
#Option "Rotate" # [<str>]
#Option "VideoKey" # <i>
#Option "FlatPanel" # [<bool>]
#Option "FPDither" # [<bool>]
#Option "CrtcNumber" # <i>
#Option "FPScale" # [<bool>]
#Option "FPTweak" # <i>
#Option "DualHead" # [<bool>]
#Option "ForceMonitors" "crt1, nolvds"
#The nvAGP was added for suspend reasons
Identifier "Card0"
Driver "nvidia"
VendorName "nVidia Corporation"
BoardName "Unknown Board"
Option "AddARGBGLXVisuals" "true"
Option "TripleBuffer" "true"
#Option "RenderAccel" "true"
Option "AllowGLXWithComposite" "true"
Option "nvAGP" "1"
Screen 0
EndSection
Section "Device"
Identifier "Videocard0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "Quadro FX 1600M"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
#Option "metamodes" "DFP-0: nvidia-auto-select +0+0, DFP-2: nvidia-auto-select +0+0"
Option "TwinView" "1"
Option "metamodes" "DFP-2: nvidia-auto-select +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "Extensions"
Option "Composite" "enable"
EndSection
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:16 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|