0

I recently installed ubuntu 12.04 on Dell GX620. I'm not able to change the resolution from 'Display'.

I have already tried the following method:

Modeline "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
xrandr --addmode VGA1 "1280x1024_60.00"
xrandr --output VGA1 --mode 1024×768

It works fine. But when the computer restart it shows an error and goes back to the previous resolution.

Please help me figure out what it is. If it is a driver-issue, please point to the right direction to find the right driver.

1 Answer 1

1

This is not a driver issue. Its just that you have got to make xrandr changes permanent. I just had a similar problem and solved it by the method shown here . I will explain it below.

First, create a shell script with the commands you have given in your description as shown below:-

#!bin/sh
xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync   
xrandr --addmode VGA1 "1280x1024_60.00"  
xrandr --output DisplayPort-0 --off --output VGA1 --mode 1280x1024_60.00 --pos 0x0 --rotate normal --output HDMI-0 --off

(You may have to edit the last line according to your system specs.) Save it as lightdmxrandr.sh in /usr/bin . Make it executable by running :-

sudo chmod a+x /usr/bin/lightdmxrandr.sh

Now just try running it from your terminal to see if it executes without errors :-

sudo sh /usr/bin/lightdmxrandr.sh

If it runs right, you have to make some edits to /etc/lightdm/lightdm.conf . For that open it with nano :-

sudo nano /etc/lightdm/lightdm.conf

You can even use gedit or whichever text editor you prefer. It will be something like this :-

[SeatDefaults]
user-session=ubuntu
greeter-session=unity-greeter

Now add the following lines to it:-

display-setup-script=/usr/bin/lightdmxrandr.sh
session-setup-script=/usr/bin/lightdmxrandr.sh

This should most probably work for you and you must get your desired resolution both in your desktop and login screen. But some users like myself had a problem because of which the login screen resolution would change but the desktop resolution would not, when the above is done. If that is the case, drop into a terminal or tty session(If you had login problems after attempting the above) and type in :-

sudo nano /etc/lightdm/lightdm.conf

and then remove the lines we added to it above. Then reboot successfully and follow the below instructions.

Now, first go to System Settings>Displays and see if your desired resolution is there. This might happen since you just ran the above script with lightdm.conf . If it is so then select it. Then reboot and see if it works. If your desired resolution is not there even now, then attempt the following.

Open "Startup Applications" by searching for it in the dash. You will get something like this :-

Startup Applications window

Then,

  1. Select the Add button.
  2. In the subsequent window type in a name.
  3. Then select the /usr/bin/lightdmxrandr.sh which is the script we created.
  4. If you want you can give a description. Then click Add.
  5. Make sure the entry you just added has a tick mark next to it. Now close Startup Applications.

Now reboot and you must have your resolution in your desktop alone. To change your login screen resolution too again open lightdm.conf file in the same way as mentioned above and add the below line alone:-

display-setup-script=/usr/bin/lightdmxrandr.sh

Save it and reboot. Now you will have both your desktop and login screen resolution for sure.

PS :- If /etc/lightdm/lightdm.conf is not present in your system then edit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf .

4
  • Note that installing a proprietary graphic driver according to your graphic card might also get your desired resolution. But installing proprietary drivers is a bit problem-prone and so I recommend you to try what is in the answer itself.
    – Venkatesh
    Apr 11, 2014 at 10:21
  • I tried all the things you mentioned above. It gives error. Apr 16, 2014 at 19:04
  • @SaadBinShahid What kind of error? Probably you are getting a long error that says resolutions are not found or something like that. I have edited my answer now. Try it.
    – Venkatesh
    Apr 17, 2014 at 5:54
  • @SaadBinShahid I have edited the shell script. I have shown how lightdm.conf will look like and also added a PS to my answer now. If it aint working now then please post your error in pastebin.ubuntu.com and provide the link to that post. I will try my best to help you.
    – Venkatesh
    Apr 17, 2014 at 6:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .