# [solved] Wrong resolution on external monitor

## GOS

I have a Laptop with Docking-Station. I wrote some scripts for switching graphics to the external monitor in different situations of docking (Logged into a X session; Not logged in, but slim/xdm startet; during boot)

Everything works well except the "Not logged in, but slim is started" case. Here I get the wrong resolution (1024x768 instead of 1280x1024). 

The docking-procedure in this case works like the following:

1) Detection of the MiniDock3 --> Copy the following 09-monitor.conf in the xorg.conf.d folder: (I used #-lines for testing, but it doesn't help)

```
Section "Monitor"

   Identifier   "MiniDock3"

#  ModeLine    "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync 

   Option      "Enable" "true" 

#  Option       "PreferredMode" "1280x1024_60.00"

#  Option       "Primary" "true"

EndSection

Section "Monitor"

   Identifier   "Intern"

   Option      "Disable" "true"    

EndSection
```

2) Restart X/Slim with "/etc/init.d/xdm restart"

This seems weird to me, because if I boot inside the docking-station my script copies also the 09-monitor.conf but then the right resolution is chosen for the external monitor.  

Any ideas how to solve this?

Best regards GOS

PS: My 10-graphics.conf

```
Section "Device"            

   Identifier  "Card0"

   Driver       "intel"

   Option       "Monitor-LVDS1" "Intern"

   Option       "Monitor-HDMI2" "MiniDock3"

EndSection

```

Last edited by GOS on Thu Mar 20, 2014 9:15 pm; edited 1 time in total

----------

## GOS

No one an idea?

To ask another, but strongly related question: Are there any "temp" or "cache" files X stores and which X uses in case of "/etc/init.d/xdm restart". 

It seems to me that there are "polluted areas" from the old X start, because when I made a fresh start with my external configuration everything works well. But when I make a restart with my external configuration and used the internal configuration before X/slim has the resolution problem described in my first post.

Has anyone a clue?

GOS

----------

## krinn

You cannot expect everyone to do as you  :Smile: 

But it seems blur how you try to make this working for me :

I would do an xorg.conf file providing all monitors settings, card settings... like when both are enable

And using two files, one with monitor1 enable only and the other with monitor2 enable only and replace the same file when i want one or the other on/off.

Some kind of : ext-on.conf and ext-off.conf 99monitor-handling.conf 

And i would copy ext-on.conf or ext-off.conf as 99monitor-handling.conf

And the content of ext-on/off.conf would just hold a screen section. So all monitors settings are the same, the card settings remain the same, and i would overwrite only the screen part to use that monitor or the other.

----------

## GOS

Thanks for your reply,

I will try this and then tell if it's working.

GOS

----------

## creaker

I had a problem with secondary monitor resolution in the past (1024x768 instead 1280x1024).

This problem may be caused due to external monitor wasn't attached on xorg/videodriver start and driver not able to obtain monitor's supported resolutions list. This case monitor will be handled with a known safe resolution (1024x768). How do I fixed this issue: I started a system with secondary monitor attached (it gave me a correct resolution) and saved monitors EDID as binary file. EDID describes monitor parameters. After that I added CustomEDID parameter to xorg.conf that pointed to saved EDID. It instructs driver to get supported resolutions list from a file, not directly from monitor (which disconnected and can't respond for EDID request).

May be it will be helpful in your case as well.

----------

## GOS

Thanks a lot for the help!   :Very Happy: 

I got it and it works now. The key point is to have not only a Monitor section but additionally a Screen and a Server Section. All together works fine. 

I posted the whole thing on the german GentooForum http://www.gentooforum.de/artikel/21634/docking-station-iii-thinkpad-x220-mit-minidock3-sollte-auch-f-r-andere-modelle-mit-dieser-dock-funzen.html. I think one can also interpret this although one does not speak german. 

Best regards

GOS

PS: This approach should work with every Thinkpad on MiniDock3

----------

