When I disconnect my monitor from my laptop, Ubuntu still seems to think that it is plugged in and does't update the display. This issue is Ubuntu specific (not occuring in windows) and my monitor worked fine with another laptop (Ubuntu 13.04, exact same drivers).
The quickfix:
- open
system settings
- click
Displays
Useful specs:
- Graphics drivers: nvidia-313 (problem also occurs with the other propriatary drivers)
- Graphics card: Nvidia Quadro K1000M
- Monitor: Benq ET-0019-N
- Cable: VGA D-sub DE15
- OS: Ubuntu 13.04
I would like Ubuntu to update the display settings automagically whenever the monitor cable gets disconnected. How would I do that?
There is an old bug on Launchpad - bug #306735 - which was marked invalid, the explanation being that it is a known problem but fairly complex (more explanation here).
So, as far as I know, there is not an automatic method for what you asked in the true sense. But you can use
autorandr
(you have to installdisper
first - runsudo apt-get install disper
from terminal), a script by Stefan Tomanek. Using this script (autorandr
) you can add a keyboard shortcut forautorandr --change
command and all you have to do when you connect or disconnect an external monitor is to press that keyboard shortcut. All of these are explained very nice in this answer (I just tested in Ubuntu 13.04 and everything goes well).After you test the script in terminal, you must to see the following post if you want to add a custom keyboard shortcut for the script:
From the Appendix B in the NVIDIA driver README:
So, assuming you have not disabled this option, the problem narrows to one of these alternatives:
The VGA cable or the VGA connector on the card have some DDC pins broken (either pin 12, pin 15 or pin 9). Please attach another VGA cable and try again.
Your Nvidia Quadro K1000M based video card has a connector that does NOT support this detection, and invoking
xrandr
or equivalents (as opening the Display Settings) fire this detection. If that is the case, this will never work --but the detection shouldn't work either on other Operative Systems. Never seen this in person, though.Or maybe there is some bug on the NVIDIA driver that prevents this detection from working properly. Try another driver versions (such as 304) and see if the problem persists.
If you are running some flavour of nvidia's proprietary driver, then, as mentioned in Jorge's answer, just running
xrandr
on its own seems to fix the issue.