Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Option to enable VRR for fullscreen clients

Open rhoot opened this issue 2 years ago • 1 comments

Currently the (seemingly) only option for enabling/disabling VRR is:

misc {
    no_vfr = true/false
}

It would be cool to expand that a bit with and allow setting it with window rules or similar, but an easy middle-ground option might just be to allow you to enable VRR when a client is fullscreened and disable it when no client is. Similar to how the inhibit rule can be applied to fullscreen clients.

Being able to just set something like misc:enable_vfr to fullscreen would cover almost all my VRR needs.

rhoot avatar Feb 04 '23 04:02 rhoot

why would you want vrr disabled on your desktop? it saves on cpu usage.

vaxerski avatar Feb 04 '23 11:02 vaxerski

It doesn't really use any mentionable CPU when nothing needs to be rendered anyway due to wlroots' damage tracking, as is evident by the fact that my CPU is currently at 0% usage at 175 Hz. VRR on/off is really a choice between smooth cursor or smooth content. For games content takes priority, but on desktop the cursor does. It's especially noticeable on monitors that can drop all the way down to 1 Hz.

KDE even defaults to only having adaptive sync enabled in fullscreen FWIW.

rhoot avatar Feb 07 '23 10:02 rhoot

It doesn't really use any mentionable CPU when nothing needs to be rendered anyway due to wlroots' damage tracking

my laptop and many others' disagree.

But yeah sure doable.

vaxerski avatar Feb 07 '23 11:02 vaxerski

What I do is create a bind and that does: bind = $mainMod, comma, exec, hyprctl keywords misc:no_vfr false and create the same bind but for disabling it. It also needs to have VRR enabled by default in config and I disable it using exec-once = hyprctl keywords misc:no_vfr true otherwise this won't work, I am a noob and I don't know for what reason it might be. However i just updated to the latest commit and it seems something has changed with VRR and now my method does not work. It will work for 0.21.0 though.

BluewyDiamond avatar Feb 08 '23 23:02 BluewyDiamond

@vaxerski On some monitors, especially some with VA panels, having VRR enabled can lead to subtle, incredibly annoying screen flicker/ flashing for example. Not super noticeable in games, but not fun at all for desktop use. That's probably one of the reasons why it usually isn't enabled for the desktop, at least on KDE and on Windows in general, the other would be that it's less smooth.

wsippel avatar Feb 14 '23 00:02 wsippel

I think we need to split the two settings. it's leading to confusion.

VRR/AS: Adaptive Sync. We have more freedom in timings for submitting frames.

VFR: Variable Frame Rate. Hyprland does not forcefully submit [your hz] frames a second.

Currently, misc:no_vfr controls both. I could, probably should, add misc:no_vrr and then THAT could be defaulted to fullscreen, while no_vfr stays on by default, making laptops' life chill.

vaxerski avatar Feb 14 '23 00:02 vaxerski

That sounds like an ideal solution, yes.

wsippel avatar Feb 14 '23 01:02 wsippel

this has been added a while ago, forgot to close

vaxerski avatar Feb 28 '23 12:02 vaxerski