LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 08-20-2007, 03:46 PM   #1
0ddba11
Member
 
Registered: Nov 2004
Location: Derby - UK
Distribution: Ubuntu at Home, RedHat Enterprise at Work
Posts: 46

Rep: Reputation: 15
Lightbulb Docking Station + External Monitor with Laptop Lid Closed


Evening all...

I thought I would firstly share a bit of knowledge and then ask how to improve it.

After installing the Nvidia drivers on my Dell XPS M1710 running Feisty, my laptop would boot up with the External monitor working, but then as soon as GDM starts it turns off. Opening the lid of my laptop revealed that it had infact reverted to the laptop panel.

It took me bloomin' ages to find out how to fix this but eventually got there, so here's what I did:

1. Started up the Laptop off the dock and logged in
2. Placed laptop on the dock and ran:
Code:
sudo nvidia-settings
3. Clicked on 'X Server Display Configuration'
4. Clicked on 'Detect Displays'
5. Clicked on the disabled display and made a mental note of the device name for the external monitor which is in brackets (in my case DFP-2)
6. Clicked on Save to X Configuration File
7. Clicked on Quit
8. Edited the device section of my /etc/X11/xorg.conf file as per the following:
Code:
Section "Device"
    Identifier     "Videocard0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce Go 7900 GTX"
    Option         "UseDisplayDevice" "DFP-2"
EndSection
9. Saved it and quit

Now when GDM / X starts on the dock it uses the external monitor, and when it starts off the dock it uses the laptop display panel giving a warm(ish) dock / undock setup so long as you are prepared to restart X using CTRL + ALT + BACKSPACE

So now, what I would love to do is somehow write a dock / undock script to set this but without having to restart GDM / X, but have no idea if that's possible?

Regards,
Gaz.
 
Old 08-31-2007, 04:27 PM   #2
safulop
LQ Newbie
 
Registered: Aug 2007
Posts: 1
Blog Entries: 1

Rep: Reputation: 0
What if lid can't be open?

Hi there,

thanks for the helpful hints since I have a similar setup and problem, but uh, you mention asking Nvidia configuration to "detect displays" while your laptop was on the dock.

I presume you were using the laptop screen while asking it to detect the external monitor. That was how you imported the settings.

Now, my docking station cannot be used unless the laptop lid is closed. So, there is no way for me to communicate with Linux using the laptop screen while it is docked with the external monitor.

Anything to suggest?

Thanks,

Sean
 
Old 09-01-2007, 04:00 AM   #3
0ddba11
Member
 
Registered: Nov 2004
Location: Derby - UK
Distribution: Ubuntu at Home, RedHat Enterprise at Work
Posts: 46

Original Poster
Rep: Reputation: 15
Yes I was using the laptop screen to detect the external display.

Try unplugging the screen from the back of the dock and plugging it straight into the laptop while undocked I think the display device will have the same name when docked, after all, the docking station is merely a 'pass through' for the ports on your laptop.

If your laptop has DVI and VGA outputs, use the same type that you will be connecting to on the docking station because monitors connected to VGA ports seem to have the name CRT-X and those connected to DVI ports have the name DFP-X

Failing that you could try a few different device names:
For DVI Ports It Could Be: DFP-0 (Although this is more likely your laptop display) / DFP-1 / DFP-2
For VGA Ports It Could Be: CRT-0 / CRT-1 / CRT-2

DFP-0 will more than likely be your laptop screen.

The next version of Ubuntu (I'm running 7.04) will supposedly have better hotplug support for monitors which will hopefully make this all go away, and I'm also hoping it will eliminate the need to restart X when docking / undocking.

Last edited by 0ddba11; 09-01-2007 at 04:16 AM.
 
Old 09-01-2007, 04:18 AM   #4
0ddba11
Member
 
Registered: Nov 2004
Location: Derby - UK
Distribution: Ubuntu at Home, RedHat Enterprise at Work
Posts: 46

Original Poster
Rep: Reputation: 15
Now that I'm up and out of bed, I've been able to do a bit of testing and I can confirm that the Display Device name is the same whether docked or undocked (for me at least)

I tried plugging a monitor into the VGA port of my laptop and ran nvidia-settings, it detected the display as CRT-0.
I then sat my laptop on the dock, plugged the same display into the dock's VGA port and ran nvidia-settings, and it still see's it as CRT-0.

Hope this helps!

Last edited by 0ddba11; 09-01-2007 at 04:20 AM.
 
Old 09-02-2007, 01:04 PM   #5
GrueMaster
Member
 
Registered: Aug 2005
Location: Oregon
Distribution: Kubuntu.
Posts: 848

Rep: Reputation: 30
I'm sure there is a way for udev to detect dock status of some type. If that could be detected, it would be a simple matter of writing a udev script that ran xrandr to get the new information, then ran it again with the appropriate settings.

Tobin
 
Old 05-26-2010, 05:36 PM   #6
dep
LQ Newbie
 
Registered: May 2010
Distribution: ubuntu
Posts: 2

Rep: Reputation: 0
Hello everyone. Sorry to resurrect this thread, but it was the most relevant I could find. Specifically:

Quote:
Originally Posted by GrueMaster View Post
I'm sure there is a way for udev to detect dock status of some type. If that could be detected, it would be a simple matter of writing a udev script
Has anyone actually done this? I, too, have a docking station and a laptop, and would be very pleased to find a way to avoid manually setting the active monitors every time I dock my computer.

I found this promising guide: http://sites.google.com/site/moosyre...ev-dock-events
In Ubuntu 10.04, the udevinfo command should be replaced with udevadm info. I found out that my /sys/devices/platform has dock.0, dock.1 and dock.2, of which dock.0 and dock.1 show ATTR{docked}=="1" when I'm docked. The guide then goes on to describe the scripts, which is where I got stuck: they use xrandr (also suggested in this thread). However, I would like to use a TwinView mode when docked (I have two external monitors connected to my docking station), and it is my understanding that xrandr does not work with TwinView modes.

How should I go about writing a script that enables TwinView on my external monitors when I dock, and falls back on the laptop display when I undock?
Thanks!
 
Old 05-26-2010, 05:56 PM   #7
GrueMaster
Member
 
Registered: Aug 2005
Location: Oregon
Distribution: Kubuntu.
Posts: 848

Rep: Reputation: 30
Switching between normal & twinview modes requires an X restart, so your script would have to copy from preconfigured xorg.conf files and request the user to restart X (note that this does not require a full reboot).
 
  


Reply

Tags
closed, docking, external, laptop, monitor, nvidia, station


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to use my laptop in a docking station and an external monitor nappy Linux - Hardware 1 04-02-2007 11:48 PM
Using External LCD with Docking Station FC6 shivab Linux - Hardware 0 02-28-2007 02:12 AM
IBM laptop with docking station mjjzf Linux - Hardware 0 01-22-2007 09:11 AM
laptop + docking station does NOT boot timpie Linux - Laptop and Netbook 3 03-02-2004 03:40 PM
Laptop and Docking Station or External Monitor lewt Fedora 0 11-13-2003 10:03 PM


All times are GMT -5. The time now is 12:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration