config: fix VRR not applying on runtime change#14744
Merged
Merged
Conversation
`misc:vrr` was missing a `.refresh` annotation, so `refreshBits()` returned 0 and runtime changes via the Lua `hl.set` path never triggered a monitor refresh — the value updated but VRR wasn't applied until a config reload. Tag the option with `REFRESH_MONITOR_STATES`, which the Lua dynamic-set path schedules (`LuaBindingsConfigRules.cpp`), tripping `PropRefresher` -> `monitorRuleMgr()->ensureVRR()`.
|
Hello and thank you for making a PR to Hyprland! Please check the PR Guidelines and make sure your PR follows them. If your code can be tested, please always add tests. See more here. beep boop, I'm just a bot. A real human will review your PR soon. |
`performMonitorReload` swaps `m_activeMonitorRule` via `applyMonitorRule`, but never re-runs `ensureVRR()` for the now-current rule. The PropRefresher does call `ensureVRR()`, but earlier — before `applyMonitorRule` has updated `m_activeMonitorRule.m_vrr` — so it reads the previous setting and the monitor stays on the old VRR mode.
Call `ensureVRR()` after the reload loop completes, matching the contract documented in `CMonitor::applyMonitorRule` ("will be tested in CConfigManager::ensureVRR()").
BlueManCZ
marked this pull request as draft
May 21, 2026 18:28
Signed-off-by: BlueManCZ <ivo97@centrum.cz>
BlueManCZ
marked this pull request as ready for review
May 21, 2026 18:44
This was referenced May 21, 2026
vaxerski
approved these changes
May 24, 2026
ItsOhen
pushed a commit
to ItsOhen/Hyprland
that referenced
this pull request
Jun 1, 2026
* config/values: refresh monitor states on misc:vrr change
`misc:vrr` was missing a `.refresh` annotation, so `refreshBits()` returned 0 and runtime changes via the Lua `hl.set` path never triggered a monitor refresh — the value updated but VRR wasn't applied until a config reload.
Tag the option with `REFRESH_MONITOR_STATES`, which the Lua dynamic-set path schedules (`LuaBindingsConfigRules.cpp`), tripping `PropRefresher` -> `monitorRuleMgr()->ensureVRR()`.
* config/monitor: call ensureVRR after performMonitorReload
`performMonitorReload` swaps `m_activeMonitorRule` via `applyMonitorRule`, but never re-runs `ensureVRR()` for the now-current rule. The PropRefresher does call `ensureVRR()`, but earlier — before `applyMonitorRule` has updated `m_activeMonitorRule.m_vrr` — so it reads the previous setting and the monitor stays on the old VRR mode.
Call `ensureVRR()` after the reload loop completes, matching the contract documented in `CMonitor::applyMonitorRule` ("will be tested in CConfigManager::ensureVRR()").
* clang-format fix
Signed-off-by: BlueManCZ <ivo97@centrum.cz>
---------
Signed-off-by: BlueManCZ <ivo97@centrum.cz>
Psilocybin78
pushed a commit
to Psilocybin78/Singularity-compositor
that referenced
this pull request
Jul 3, 2026
* config/values: refresh monitor states on misc:vrr change
`misc:vrr` was missing a `.refresh` annotation, so `refreshBits()` returned 0 and runtime changes via the Lua `hl.set` path never triggered a monitor refresh — the value updated but VRR wasn't applied until a config reload.
Tag the option with `REFRESH_MONITOR_STATES`, which the Lua dynamic-set path schedules (`LuaBindingsConfigRules.cpp`), tripping `PropRefresher` -> `monitorRuleMgr()->ensureVRR()`.
* config/monitor: call ensureVRR after performMonitorReload
`performMonitorReload` swaps `m_activeMonitorRule` via `applyMonitorRule`, but never re-runs `ensureVRR()` for the now-current rule. The PropRefresher does call `ensureVRR()`, but earlier — before `applyMonitorRule` has updated `m_activeMonitorRule.m_vrr` — so it reads the previous setting and the monitor stays on the old VRR mode.
Call `ensureVRR()` after the reload loop completes, matching the contract documented in `CMonitor::applyMonitorRule` ("will be tested in CConfigManager::ensureVRR()").
* clang-format fix
Signed-off-by: BlueManCZ <ivo97@centrum.cz>
---------
Signed-off-by: BlueManCZ <ivo97@centrum.cz>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two related fixes for VRR runtime updates via Lua not taking effect until a full config reload:
config/values:misc:vrrwas missing a.refreshannotation, sorefreshBits()returned 0 and the Luahl.setpath never scheduled a monitor refresh. Tagged withREFRESH_MONITOR_STATES.config/monitor:hl.monitor({vrr=N})does schedule a refresh, butPropRefresher'sensureVRR()ran beforeperformMonitorReloadhad swappedm_activeMonitorRuleviaapplyMonitorRule, so it read the previous VRR setting. CallensureVRR()again at the end of the reload loop, matching the contract inCMonitor::applyMonitorRule.Is it ready for merging, or does it need work?
Ready.