How does KDE adjust screen refresh rate

When I xrandr -q, I only see a 165Hz refresh rate option on my machine, but inside KDE settings I could switch it to 60Hz.

Also, when I force to switch the rate to 60 with xrandr, there is no change to the refresh rate.

I am using Arch, KDE on Wayland. I was wondering how internally it switched the refresh rate, and how that could be done with commands.

Thank you

Afaik xrandr works only on X11 not Wayland.

Any reason why you want to do it with commands instead of using the GUI?

1 Like

Some refresh rates depend on the resolution you select. It’s pretty common for higher refresh rates to not be possible if your resolution is at max (due to bandwidth limitations). Not sure if that’s the case here :slight_smile:

Thank you for the reply

Afaik xrandr works only on X11 not Wayland

This makes sense and is what I suspected. Is there an equivalent of that for Wayland? I tried xrandr because I could not find any display tool under Wayland, except wlr-randr, which seemed to be very outdated.

Any reason why you want to do it with commands instead of using the GUI?

I was planning to make an auto frame rate adjustment depending on AC/Battery, so it would be best if this could be automated with a script.

I am not certain if internally the refresh rate has been changed at all, but at least from the GUI, it allows me to change from 165Hz to 60Hz with the same resolution.

If I want to see how it internally works under GUI, do you know which codebase I should be looking at? Thank you

There seems to be something fishy here.

If I set my refresh rate to 144 Hz
xrandr -q only shows only 144h Hz option

If I set my refresh rate to 60 Hz
xrandr -q only shows only 60 Hz option

also im pretty sure vrrpolicy changed from 2 to 0

I found a CLI tool for Wayland called kscreen-doctor

Try kscreen-doctor -h

Example usage on my System:
kscreen-doctor -o Shows my Monitor (I have only one atm)

Output: 1 DVI-D-1 enabled connected priority 1 DVI Modes: 0:1920x1080@60! 1:1920x1080@144* 2:1920x1080@120 3:1920x1080@100 4:1920
x1080@60 5:1680x1050@60 6:1280x1024@120 7:1280x1024@75 8:1280x1024@60 9:1440x900@120 10:1280x800@60 11:1152x864@75 12:1280x720@60
13:1024x768@120 14:1024x768@75 15:1024x768@60 16:832x624@75 17:800x600@120 18:800x600@75 19:800x600@60 20:640x480@120 21:640x480
@75 22:640x480@60 23:640x480@60 24:720x400@70 25:1280x1024@60 26:1024x768@60 27:1280x800@60 28:1920x1080@60 29:1600x900@60 30:136
8x768@60 31:1280x720@60 Geometry: 0,0 1920x1080 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown

Shows my Monitor is called DVI-D-1

Then I can use screen-doctor output.DVI-D-1.mode.0 to set my Monitor to 1920x1080@60 (thats mode 0 on my System)
With screen-doctor output.DVI-D-1.mode.1 I get back to 1920x1080@144

Hope that works for you


Take a look at

I think this is what you are looking for?

1 Like

That was perfect, and the command offers more options for Scale, Rotation, etc. just like in the settings.