Skip to content

monitor: set format back after failing DS activation - #14168

Merged
vaxerski merged 1 commit into
hyprwm:mainfrom
fxzzi:ds-failure-reset-format
Apr 26, 2026
Merged

vaxerski merged 1 commit into
hyprwm:mainfrom
fxzzi:ds-failure-reset-format

Conversation

@fxzzi

@fxzzi fxzzi commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

Describe your PR, what does it fix/add?

we do run m_lastScanout.reset(), but m_lastScanout might sometimes not be set. cache format from before attempting DS, and set back to it on activation failure.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

again not exactly sure on whether this fixes, as its hard to find repro for the specific issue of format getting stuck on XBGR8888 after leaving DS. maybe this will help

Is it ready for merging, or does it need work?

sure

@github-actions

Copy link
Copy Markdown

Hello and thank you for making a PR to Hyprland!

Please check the PR Guidelines and make sure your PR follows them.
It will make the entire review process faster. :)

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.

we do run m_lastScanout.reset(), but m_lastScanout might sometimes not
be set. cache format from before attempting DS, and set back to it on
activation failure.
@fxzzi
fxzzi force-pushed the ds-failure-reset-format branch from ec5e720 to 505aec1 Compare April 26, 2026 16:18

@vaxerski vaxerski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tnx

@vaxerski
vaxerski merged commit 84d45bd into hyprwm:main Apr 26, 2026
8 of 9 checks passed
@fxzzi
fxzzi deleted the ds-failure-reset-format branch April 26, 2026 18:37
@UjinT34

UjinT34 commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

Does it change anything? DS blockers include format checks and if test or commit fails then there is a bug somewhere earlier. And there should a similar format restoration somewhere later. Might be too late or removed by accident.
Nice to have a fallback here but in general it's better to avoid failures somehow because if it happens once then it'll likely happen on every next frame and might trigger an unnecessary modeset due to a raised format change flag (even without a real change after restoration). So if it makes a difference the issue should be investigated further.

@fxzzi

fxzzi commented Apr 26, 2026

Copy link
Copy Markdown
Contributor Author

I'm running the PR as we speak, as mentioned in the OP I wasn't able to find reliable repro for the bug. But it could also be related to Hyprland pretty much dying 50% of the time if you do hyprctl reload whilst in DS.

vaxerski pushed a commit that referenced this pull request May 29, 2026
ItsOhen pushed a commit to ItsOhen/Hyprland that referenced this pull request Jun 1, 2026
crthpl pushed a commit to crthpl/Hyprland that referenced this pull request Jun 3, 2026
we do run m_lastScanout.reset(), but m_lastScanout might sometimes not
be set. cache format from before attempting DS, and set back to it on
activation failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants