How can I permanently set the screen resolution?

That resolution's already added, since it's the resolution you're using right now. Not sure if that's causing the error.

Try it without the -r flag... it should attempt to use a resolution that you've set up that's closest to the highest frequency capability of the monitor.

So for instance, say you wanted to set it to 1600x900:
sudo xrandr --output HDMI-0 --mode 1600x900
-- or --
sudo xrandr --output HDMI-0 --mode 1600x900 --rate 60
-- or --
sudo xrandr --output HDMI-0 --mode 1600x900 --refresh 60

I'm not sure if sudo is needed here, but if it's not, it shouldn't be a problem.

The --output flag has several sub-flags:

--output <output>
      --auto
      --mode <mode>
      --preferred
      --pos <x>x<y>
      --rate <rate> or --refresh <rate>
      --reflect normal,x,y,xy
      --rotate normal,inverted,left,right
      --left-of <output>
      --right-of <output>
      --above <output>
      --below <output>
      --same-as <output>
      --set <property> <value>
      --scale <x>x<y>
      --scale-from <w>x<h>
      --transform <a>,<b>,<c>,<d>,<e>,<f>,<g>,<h>,<i>
      --off
      --crtc <crtc>
      --panning <w>x<h>[+<x>+<y>[/<track:w>x<h>+<x>+<y>[/<border:l>/<t>/<r>/<b>]]]
      --gamma <r>:<g>:<b>
      --brightness <value>
      --primary

... so you can set brightness, gamma, positioning, rotation, screen mirroring, etc. as well as the resolution and refresh rate.

So, for instance, say you wanted to mirror HDMI-0 to be the same as your main screen, and let's say eDP is your main screen:
sudo xrandr --output HDMI-0 --mode 1600x900 --refresh 60 --same-as eDP

Or, let's say your HDMI-0 is physically located to the right of your eDP screen, and you wanted different outputs on each screen:
sudo xrandr --output HDMI-0 --mode 1600x900 --refresh 60 --right-of eDP

Now, when you move your mouse cursor off the right-hand edge of eDP, it'll move onto HDMI-0, and when you move it off the left-hand edge of HDMI-0, it'll move onto eDP.

Let's say you've physically rotated HDMI-0 to the left (counter-clockwise) so it's vertically taller and horizontally smaller (photograph mode, rather than landscape mode):
sudo xrandr --output HDMI-0 --mode 1600x900 --refresh 60 --rotate right

Now you'll see your screen properly oriented, but taller than it is wide.

Let's say you've got it all set up the way you want, but the HDMI-0 monitor's looking a little dark:
sudo xrandr --output HDMI-0 --brightness 1.1
1 is default.

1 Like

Thanks for the information Mr_Magoo. I can see that xrandr is very powerful. I successfully install arandr and it works fine. I can also use it to set the screen resolution but it also sets the refresh rate to 30 Hz when I choose 3840x2160 which is unfortunate.

1 Like

Try:
sudo xrandr --output HDMI-0 --refresh 60
If the monitor is correctly reporting its available resolutions and refresh rates, that should switch it to 60 Hz refresh rate, or the nearest rate to that.

If that doesn't work, get literal with it:
sudo xrandr --output HDMI-0 --refresh 59.94

1 Like

I just wanted to thank both of you for trying to help me. I have decided to go down a different path and I have installed LibreELEC. I have discovered that it allows me to choose the screen resolution that I want to use rather than all this auto setting stuff. The CPU just loafs along now and the picture looks fantastic.

2 Likes

Gday @RocketDestroyer
Glad to hear you fixed the issue.
Could you please 'Mark' your last post as "Solution".

This lets Others know they can find a solution here that may help them.

Solution pic

Thank you.
Zorin Forum Community.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.