-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Stop unintended suspend on GNOME desktop images (logind IdleAction override + sane GNOME power defaults) #8720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…erride + sane GNOME power defaults)
Walkthrough
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
config/desktop/common/environments/gnome/debian/postinst (1)
21-24
: LGTM! Consider consolidating duplicate power settings.The power settings are correct. However, these identical GNOME power configurations are duplicated across three postinst files (common, bookworm, trixie). While this works, consider consolidating them into a single location for easier maintenance.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (4)
config/desktop/bookworm/environments/gnome/debian/postinst
(1 hunks)config/desktop/common/environments/gnome/debian/postinst
(1 hunks)config/desktop/trixie/environments/gnome/debian/postinst
(1 hunks)lib/functions/rootfs/distro-specific.sh
(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
lib/functions/rootfs/distro-specific.sh (1)
lib/functions/bsp/armbian-bsp-cli-deb.sh (1)
board_side_bsp_cli_postinst_base
(425-446)
🔇 Additional comments (3)
config/desktop/trixie/environments/gnome/debian/postinst (1)
22-25
: LGTM! GNOME power settings configured correctly.The added settings properly prevent GNOME from initiating suspend on both AC and battery power. The combination of
type='nothing'
andtimeout='0'
ensures no idle suspend occurs.config/desktop/bookworm/environments/gnome/debian/postinst (1)
22-25
: LGTM! Power settings configured correctly.The GNOME power management settings properly prevent suspend behavior.
lib/functions/rootfs/distro-specific.sh (1)
50-50
: Confirm disabling the power button is intentional
HandlePowerKey=ignore
in lib/functions/rootfs/distro-specific.sh (also in config/boards/pinebook-pro.csc) prevents all power-button actions; if you need a shutdown dialog, useHandlePowerKey=poweroff
or=suspend
instead.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
The following behavior should match most users' expectation IMO, and it's the default for major distro desktops.
When GNOME isn't needed for a device, the user have the option to run this, and the power management from GNOME will be gone. systemctl set-default multi-user.target
systemctl isolate multi-user.target For those uses cases that require no suspension while using desktop, adding a separate var like |
Main problem in this world is that resume from suspend is generally not working at the level of 1st class hardware. Often suspend leads into inability of resuming or resume ends up with unstable system. In early days, suspend was defaulted to off by default and now this is not the case anymore. We could add DESTKOP_NO_SUSPEND variable, which should disable suspend by default, so maintainer would enable this in a board config. Or just SUSPEND=yes / no, Having only this:
And perhaps adding enable / disable to armbian-config ? |
Description
On the GNOME desktop image some systems still suspend after idle, even when the GNOME UI is set to “never.” Journals show systemd-logind initiating suspend (The system will suspend now!), which means system-wide logind IdleAction is firing. Minimal/CLI images don’t show this behavior.
What’s included
Scope
How Has This Been Tested?
Verify logind policy
Expect: IdleAction=ignore and lid switches ignore.
Verify GNOME defaults (as desktop user)
Expect: 'nothing' and 0.
Checklist: