4

If I execute xrandr, I get a list of resolutions supported on my monitor (I only have one). For most of these resolutions I can excuted 'xrandr --output eDP-1-1 --mode res' and it works.

But for some resolutions on the list, I get an error back 'cannot find mode'. If I add a --rate 60 flag it then finds the mode and sets the resolutions.

This would make some sense if xrandr couldn't decide which refresh rate to use, but this happens for resolutions with only one refresh rate listed.

What gives? It is I supposed not a big issue but I would like to know what is going on.

  • What happens if you run the simple command xrandr -s widthxheight where widthxheight can be for example 1024x768 or 1920x1080 or whatever is listed by the plain xrandr command? – sudodus Apr 08 '19 at 17:22
  • 512x384 is listed by xrandr. xrandr -s 512x384 says "Size 512x384 not found in available modes" – Countingstuff Apr 08 '19 at 17:32
  • 512x384 is a very low resolution, not really useful. In my computer the lowest listed resolution is 640x480, and it works. Are there other listed resolutions, that do not work? What graphics card and graphics driver are you using? And which version of Ubuntu? Are you runnning Xorg or Wayland? And what monitor is it (brand name and model)? – sudodus Apr 08 '19 at 17:37
  • 2
    Hey, yes, for example 720x450 is listed but does not work. I agree it's a very low resolution and not useful, but I am writing some code that requires changing of resolutions, and I'm wary now since I don't understand when xrandr works and does not. I'm on Ubuntu 16.04, my graphics card is Intel HD Graphics 520, driver i912. I am running xorg – Countingstuff Apr 08 '19 at 17:46
  • This is an unusual problem. I have used xrandr many times and in many computers (for example to get lower resolution than default in order to get screenshots to upload to AskUbuntu). Intel graphics and the corresponding linux drivers are usually cooperating well, but there are some exceptions. There could also be problems because of the monitor (hardware). -- You can test in a live drive of Ubuntu 18.04.1 LTS, 'Try Ubuntu without installing', and test in some other computers, if you have the same problem. – sudodus Apr 08 '19 at 17:54
  • Ok I will try that thanks, though it leaves me unhappy as now I will need to think what to do in the event that xrandr fails in this program I am writing. – Countingstuff Apr 08 '19 at 18:01
  • @Countingstuff may be the question is too old, I'm curious if you still have that setup. Could you trace the error using xtrace xrandr --verbose ... for both with/without rate option. – user.dz Apr 15 '20 at 22:01
  • Hey, sorry I no longer have the setup. I never got to the bottom of it either, the related code is now in use on a large number of machines and there have been no reports of the error arising there so it seems to be quite obscure. Sorry I couldn't be of more help. – Countingstuff Apr 17 '20 at 22:30

0 Answers0