I'm new to Linux, and I just installed elementaryOS. The first thing I do is change the resolution to 1680 x 1050 so that I can see things properly, but when I reboot, the resolution is set back to 2256 x 1338. How can I change it permanently so that it doesn't change? I've heard of using a tool called xrandr but I'm still new to Linux and can't figure out how to use it. Please help!

1 Answer 1


Open the terminal and type:

sudo vi /usr/sbin/lightdm-session

Here is how the first part of that file looks now:

# LightDM wrapper to run around X sessions.

echo "Running X session wrapper"

# Load profile
for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do
  if [ -f  "$file" ]; then
     echo "Loading profile from $file";
     . "$file"

-- Here add the xrandr settings

# Load resources

Press INS (insert) button or i on your keyboard. This will go into the insert mode and you can use go to the end of the line , press enter and put the content I described below.

Copy below:

xrandr --newmode "1680x1050_60.00" 85.25 1680 1368 1440 1576 1784 1050 768 771 781 798 -hsync +vsync
xrandr --addmode CRT1 1680x1050_60.00
xrandr --output CRT1 --mode 1680x1050_60.00

Paste into the file with the right button of the mouse, where I marked it with this section:

-- Here add the xrandr settings 

Press Esc button on your keyboard. Then type :x to save and exit. Restart the Elementary OS. Check does it work.

  • I did what you explained, but when I copy pasted, I replaced "CRT1" with the name of my display, but when I reboot, the display resolution is still 2256 x 1338.
    – midnight0s
    Oct 17, 2020 at 19:13
  • Try to replace CRT1 with LCD1 and then check.
    – Sysadmin
    Oct 18, 2020 at 7:07
  • Unfortunately, that doesn't do anything. I tried checking the file for errors, then switching from CRT1 to LCD1 and back. But the resolution always resets when I restart.
    – midnight0s
    Oct 20, 2020 at 3:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.