X Tutup
Skip to content

Wayland: Inhibit idle in DisplayServerWayland::screen_set_keep_on#110875

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
vmedea:2025-wayland-inhibit-idle
Sep 30, 2025
Merged

Wayland: Inhibit idle in DisplayServerWayland::screen_set_keep_on#110875
Repiteo merged 1 commit intogodotengine:masterfrom
vmedea:2025-wayland-inhibit-idle

Conversation

@vmedea
Copy link
Contributor

@vmedea vmedea commented Sep 24, 2025

Without this, the screen does go into idle after a few minutes on a RPi5 with default install (wayland w/ labwc), even though screen_keep_on is set. DBUS is enabled but apparently, the screensaver call is not enough.

Without this, the screen does go into idle after a few minutes on a RPi5 with default install (wayland w/ labwc), even
though `screen_keep_on` is set. DBUS is enabled but apparently, the screensaver call is not enough.
@vmedea vmedea requested a review from a team as a code owner September 24, 2025 20:27
Copy link
Contributor

@deralmas deralmas left a comment

Choose a reason for hiding this comment

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

Great catch! We absolutely need to also call the inhibit method for situations where there is not a suitable portal to ensure compatibility with as many compositors as possible.

I swear, there once was an inhibit call but for some mysterious reason it... Disappeared? 😅

Haven't tested but the fix is trivial.

Also, FTR, the idle inhibit protocol says that if the inhibited window is occluded the compositor will ignore it. I wonder if we should eventually apply it to every window (even new ones?) to avoid that. Eh, this will definitely do for now :D

@Calinou Calinou added bug platform:linuxbsd topic:platforms cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release labels Sep 24, 2025
@Calinou Calinou added this to the 4.6 milestone Sep 24, 2025
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Code looks good to me.

@vmedea
Copy link
Contributor Author

vmedea commented Sep 24, 2025

I swear, there once was an inhibit call but for some mysterious reason it... Disappeared? 😅

i was also surprised 😄 Especially as there are no calls to the window_set_idle_inhibition method otherwise. But couldn't find it in git history. It likely disappeared in a rebase of the original PR.

Also, FTR, the idle inhibit protocol says that if the inhibited window is occluded the compositor will ignore it. I wonder if we should eventually apply it to every window (even new ones?) to avoid that. Eh, this will definitely do for now :D

Right. i've only tested this for a single-window, fullscreen game.

It would certainly make sense to do it for all windows (and new ones). Happy to do it in a new PR later.

@Repiteo Repiteo merged commit 373ff72 into godotengine:master Sep 30, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Sep 30, 2025

Thanks!

@akien-mga akien-mga changed the title wayland: Inhibit idle in DisplayServerWayland::screen_set_keep_on Wayland: Inhibit idle in DisplayServerWayland::screen_set_keep_on Oct 8, 2025
@akien-mga
Copy link
Member

Cherry-picked for 4.5.1.

@akien-mga akien-mga removed the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Oct 8, 2025
@akien-mga akien-mga changed the title Wayland: Inhibit idle in DisplayServerWayland::screen_set_keep_on Wayland: Inhibit idle in DisplayServerWayland::screen_set_keep_on Jan 25, 2026
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.

5 participants

X Tutup