Has anyone managed to change the screen resolution / default monitor on the graphics adapter through the command line? We basically have an issue where some of our HP laptops will dock onto the laptop docks and the screen will go blank on both the projector (second output) and the monitor, or sometimes the laptop is put into sleep mode and when awakeing away from the dock the screen will be blank and no amount of poking will get it back.
The only solution I have come across is to use VNC to look at the laptop screen and log off and on the laptop then seems to run the igfxconf, igfxpers and igfxtray (I think) which seem to reset the screen so that the laptop screen is the primary monitor. I am basically looking to automate this process as its a little time consuming!!!
This is almost exactly the same situation I have. HP EliteBook laptop with Intel graphics. When in the dock, it's connected via DVI to a 27" HD monitor. The VGA connector is a secondary 19" 1280x1024 monitor. When undocked, the laptop LCD works fine. When redocked, video always defaults to VGA.
Not a terrible inconvenience, but takes a minute or two to load GfxUI and manually change everything. I'd like to have a small script I can click to set mode to "Extended desktop", set the primary monitor to digital display, and set digital display to 1920x1080.