After I installed Ubuntu 12.04, Unity shows me many unsatisfied flaws. One of them is: when the computer starts and the login screen is been displayed, the monitor complains “resolution out of range”.
I did a lot of search and this is a solution from here.
Use the “xrandr” command to get the monitor device name;
1 2 3 4 5
xrandr # Find the "xxx Connected ..." line and the "xxx" is the device name. # In my case the line is: # CRT1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 0mm x 0mm # So my device name is "CRT1".
Create a “lightdmxrandr.sh” shell script with the following content;
1 2 3 4
#!/bin/sh xrandr --output CRT1 --primary --mode 1280x1024 # The "1280x1024" should be the best resolution of your monitor. # In my case it's "1280x1024".
This file is used to change the resolution of the dedicated device. What we want to do is: let lightdm calls this script to configure the resolution when starts up.
Set the permissions of this script file and copy it to “/usr/share” directory;