Differences

This shows you the differences between two versions of the page.

Link to this comparison view

configure-dual-monitor-on-ubuntu [2014/11/04 21:22] (current)
Jin created
Line 1: Line 1:
 +====== Xorg configuration of dual monitors ======
 +If you come here with a hand scratching your head, here are some quick items that sums up my solution, which may help you too. 
 +    - Read the xorg log to identify potential issues
 +    - Extract EDID from your monitor(s)
 +    - Use the EDID file in xorg instead of trying to get from monitor
 +    - Set a proper screen layout in xorg.conf
 +
 +Got another 23inch monitor (HP 2311f) to match with my current Acer G235H. Wish it gives me more fun. It turned out that I spend half day installing it up on my ubuntu. Indeed, this isn't the first time that I encountered this issue. But this time, I did learn something, which I thought would be good to share. ​
 +
 +My environments are: 
 +  * Ubuntu 14.04 LTS
 +  * Xfce4
 +  * Geforce GTX 260
 +After connected this HP2311f to my graphic card's D-SUB, it was recognized however I want to use the HDMI cable just to see if it can give me better quality. But it doesn'​t work. I didn't want to get myself involved with linux graphic card set up, which was always a frustration. Then I decided to reinstall my Nvidia propriety driver //​NVIDIA-Linux-x86_64-337.25.run//​. It's so because I managed to installed it before and assuming it should be fine this time. 
 +
 +As you expected, it didn'​t. I end up with
 +  * a frozen login screen, ​ then
 +  * a Xorg process consuming high CPU, over 60%
 +I have tried 
 +  * install //​NVIDIA-Linux-x86_64-337.25.run//​ and uninstall
 +  * install ubuntu'​s //​nvidia-current//​ and uninstall
 +None of them give me a peace. ​
 +
 +Google with keywords: //nvidia driver//, ​ //update//, //freeze// and //high CPU//, I got a lots of people within similar or same situation. There was one thing in common: no sound solution. I was forced to using my head instead of shooting blindly and in vain. 
 +
 +Looking into xorg's log, I narrow down that my problem might be xorg cannot read the EDID. <code bash>
 +#handy for inspecting xorg log
 +grep -E '​EE|WW'​ /​var/​log/​Xorg.1.log | less 
 +</​code>​
 +It was a reasonable conclusion after seeing a lot of message complaining not able to obtain EDID. It was also reasonable to assume that xorg process continuously read them and ended up taking too much CPU. One other thing I still don't understand is that it seemed keeping my old monitor'​s information because the log complaining about CRT-0, CRT-1((The two monitors were using DVI and HDMI cable. Hence they should be identified as DFP-x. )) EDID which didn't exist. ​
 +<wrap lo>​Sending me email: foalford@gmail.com if you know the reason.</​wrap>​
 +
 +Starting from this, I used //​[[http://​www.polypux.org/​projects/​read-edid/​| get-edid and parse-edid]]//​ to extract my two monitors EDID. It failed by stating that the header checksum invalid. I then turned to a windows XP with other tool: //Monitor Asset Manager//, which did the job. Before I transfer those extracted binary files, I found another awesome tool to accomplish this in linux, thanks to [[http://​kodi.wiki/​view/​Creating_and_using_edid.bin_via_xorg.conf|Creating and using edid.bin via xorg.conf]]
 +<code bash>
 +sudo X -verbose 6 > ~/xorg.log 2>&1
 +#Ctrl+C to interrupt it, which didn't work and I ended up with reboot.
 +
 +sudo nvidia-xconfig --extract-edids-from-file=~/​xorg.log --extract--edids-output-file=~/​edid.bin
 +</​code>​
 +
 +Then I have got two files, edid.bin and edid.bin.0 corresponding to my two monitors. //​parse-edid//​ was satisified with these two files. ​
 +
 +With this progress, I find the [[https://​wiki.archlinux.org/​index.php/​multihead|Multihead]] is very helpful. in fact, I read this article before but only this time I understood it. After that, I end up with a working xorg.conf file((The significant part)) like
 +<code ini>
 +Section "​Device"​
 +    Identifier ​    "​Device0"​
 +    Driver ​        "​nvidia"​
 +    VendorName ​    "​NVIDIA Corporation"​
 +    Option ​        "​ConnectedMonitor"​ "​DFP-0,​ DFP-1"
 +    Option ​        "​CustomEDID"​ "​DFP-0:/​etc/​X11/​hp2311-edid.bin"​
 +    Option ​        "​CustomEDID"​ "​DFP-1:/​etc/​X11/​acer235-edid.bin"​
 +    Option ​        "​IgnoredEDID"​ "​false"​
 +    Option ​        "​UseEDID"​ "​true"​
 +    Option ​        "​MetaModeOrientation"​ "DFP-1 LeftOf DFP-0"
 +EndSection
 +
 +Section "​Screen"​
 +    Identifier ​    "​Screen0"​
 +    Device ​        "​Device0"​
 +    Monitor ​       "​Monitor0"​
 +    DefaultDepth ​   24
 +    Option ​        "​Stereo"​ "​0"​
 +    Option ​        "​TwinView"​ "​true"​
 +    Option ​        "​SLI"​ "​Off"​
 +    Option ​        "​MultiGPU"​ "​Off"​
 +    Option ​        "​BaseMosaic"​ "​off"​
 +    SubSection ​    "​Display"​
 +        Depth       24
 +    EndSubSection
 +EndSection
 +</​code>​
 +
 +