how to save changes after add new mode for monitor resolution?

Hi guys,

I’ve just tried this article:

After I did below codes:

xrandr --newmode "1152x864_60.00"   81.75  1152 1216 1336 1520  864 867 871 897 -hsync +vsync
VGA_out="$(xrandr -q | grep -m 1 '\<connected\>' | cut -d ' ' -f1)"
xrandr --addmode $VGA_out "1152x864_60.00"
xrandr --output $VGA_out --mode "1152x864_60.00"

I got the resolution of monitor changed and worked perfectly.

But after I reboot computer, the resolution came back to before (1024x768).

In the article, it said that I’ve to modify the file “/etc/X11/xorg.conf.d/50-screen.conf”, but in this file it said “Doesn’t help for radeon/radeonhd drivers; use magic in 50-device.conf instead” (I’m using Radeon HD driver). And also, I do not know how to modify the file to match my above setting codes.

Thanks for your helps!

No it doesn’t say that. It says you should modify the file “/etc/X11/xorg.conf.d/50-monitor.conf”
So do that! :wink:
For your resolution, it should look like that:

# Having multiple "Monitor" sections is known to be problematic. Make
# sure you don't have in use another one laying around e.g. in another
# xorg.conf.d file or even a generic xorg.conf file. More details can
# be found in
Section "Monitor"
  Identifier "Default Monitor"

  ## If your monitor doesn't support DDC you may override the
  ## defaults here
  #HorizSync 28-85
  #VertRefresh 50-100

  ## Add your mode lines here, use e.g the cvt tool
  ModeLine "1152x864_60.00"   81.75  1152 1216 1336 1520  864 867 871 897 -hsync +vsync

The article also mentions you should add those HorizSync and VertRefresh lines, but I don’t think it is necessary…

Oh, and btw. you’re not using Radeon HD driver, but radeon. The radeonhd driver is older and not supported anymore.

I added a line

zenity --info --text "Real Test"

inside ~/.profile and it did show a pop up after logging in.
You might create a new profile,turn off auto-login, add those lines to the “new” profile and check whether monitor resolution changes!

Thanks. It works perfect!

You are welcome. The only downside of using this approach instead of editing “conf” files as mentioned above is that you must remember to add these lines to each “new” profile / “new” user :expressionless: you create on your machine. Or you can keep a copy of “.profile” and drop it into all new profiles :stuck_out_tongue: