Where is the code that decides when the screen should be blanked?

I’m in a team developing, among many other things, a kiosk type self-service solution. We have a Ubuntu 22.04 LTS setup that has a dedicated kiosk user account that logs automatically in (timed login) and the session just runs Firefox in kiosk mode against a single site. Everything else is working fine, but after 10 minutes of inactivity the display turns off despite all power saving being disabled system wide via dconf. Gnome-session-inhibit doesn’t help either.

Not blank screen, the HDMI signal actually turns off. Any activity restores picture just like it should.

I have verified that D-Bus user session is OK, that the issue occurs regardless of whether I’m using X or Wayland, and that the bug doesn’t occur if the kiosk user logs in to a normal desktop session. It seems like something isn’t actually working unless it’s a normal desktop session but I can’t figure out what it could be - I’ve brought the kiosk session closer and closer to the normal Ubuntu desktop session to rule out possible culprits, but I’m running out of things to change.

At this point I’m not expecting others to solve my problems for me. But could someone please write a brief explanation of how the display power saving stuff works and / or provide some pointers to code so I can maybe identify what needs to be running and whether it’s working as intended or not?

I think this part is handled by gnome-settings-daemon.

Refer to the power plugin located in https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/tree/master/plugins/power/

Yeah that seems to be correct. I think it’s not being run correctly or at all in a Ubuntu 22.04 LTS setup if using --builtin and that’s where the trouble is coming from. If using --systemd, screen blanker doesn’t act up. But then again 22.04 is using an oldish version of Gnome so I don’t expect anyone to bother fixing it.

It seems like something isn’t actually working unless it’s a normal desktop session but I can’t figure out what it could be

I guess, PAM auth is one thing which differs between a timed / automatic login and normal login.

I would recommend trying this on Ubuntu 24.04, and if the issue persists, you can try opening a new issue against gnome-settings-daemon with steps to reproduce the issue. If it turns out to be a bug in g-s-d, it could be fixed and Ubuntu could backport it to 22.04.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.