This morning I was debugging a problem in unity-greeter and I suspected that it might be related to the resolution of the system I was using. Since I was live booting it was a pain to make changes, mainly because I didn’t have all my standard tools (or web access). I ended up messing around with xorg.conf files for awhile, without much success (this reminded me of college, but not pleasantly). After some other searches, I ended up settling on this method:
For this example, I wanted a resolution of 1024×600.
- Login to my system
- Open a terminal and run cvt 1024 600
- Copy the resulting output, minus ModeLine portion
- Run xrandr –newmode
- Run xrandr –addmode LVDS 1024x600_60.00. (Note that there are several displays that xrandr shows, I wanted to change my main laptop display, LVDS, you may want to change another. Run xrandr without arguments to see all the displays.)
- Run xrandr –output LVDS –mode 1024x600_60.00
- If that switches your resolution and looks right, then lets make it permanent.
- Edit: /etc/lightdm/lightdm.conf, add this line (note you can choose a different path:
- Make a new file called /usr/bin/lightdmxrandr, make it a shell script that just executes lines 4, 5, and 6 from above
- Make /usr/bin/lightdmxrandr executable, logout, and restart lightdm (sudo initctl restart lighthdm)
- Enjoy your new resolution!
mfisch@caprica:~$ cvt 1024 600 # 1024x600 59.85 Hz (CVT) hsync: 37.35 kHz; pclk: 49.00 MHz Modeline "1024x600_60.00" 49.00 1024 1072 1168 1312 600 603 613 624 -hsync +vsync
mfisch@caprica:~$ xrandr --newmode "1024x600_60.00" 49.00 1024 1072 1168 1312 600 603 613 624 -hsync +vsync
#!/bin/sh xrandr --newmode "1024x600_60.00" 49.00 1024 1072 1168 1312 600 603 613 624 -hsync +vsync xrandr --addmode LVDS 1024x600_60.00 xrandr --output LVDS --mode 1024x600_60.00
Here are the two links that helped me piece this together: