Skip to content

Comments

idle: use cosmic-idle, allow runtime idle config adjustment#1693

Merged
brianmcgillion merged 1 commit intotiiuae:mainfrom
kajusnau:cleanup-desktop-config
Jan 23, 2026
Merged

idle: use cosmic-idle, allow runtime idle config adjustment#1693
brianmcgillion merged 1 commit intotiiuae:mainfrom
kajusnau:cleanup-desktop-config

Conversation

@kajusnau
Copy link
Collaborator

@kajusnau kajusnau commented Jan 21, 2026

Description of Changes

  1. Idle config changes:
    • Removed swayidle
    • Re-enabled COSMIC Settings 'Power & battery' page
      • This page should now be fully functional
      • Allows runtime adjustment of system idle behavior
    • Adjusted idle nix config in graphics profile to only allow enabling/disabling
      Up for debate:
      Disabling only sets the timeouts to 0 by default, but they can still be overridden by the user at runtime.
      Is it worth keeping the enable/disable option?
  2. Adjusted suspend configuration:
    • Moved allowSuspend option to power-manager namespace, for easier maintainability and clarity
    • Adjusted some targets, where suspend should be disabled, accordingly.
  3. Other: Adjusted brightness shortcut to use COSMIC settings dbus

Removed functionality:

  • Swayidle
  • Idle notifications, informing the user of incoming session lock/suspension. Replaced by cosmic-idle's fade-to-black

Type of Change

  • New Feature
  • Bug Fix
  • Improvement / Refactor

Related Issues / Tickets

Checklist

  • Clear summary in PR description
  • Detailed and meaningful commit message(s)
  • Commits are logically organized and squashed if appropriate
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • Author has run make-checks and it passes
  • All automatic GitHub Action checks pass - see actions
  • Author has added reviewers and removed PR draft status

Testing Instructions

Applicable Targets

  • Orin AGX aarch64
  • Orin NX aarch64
  • Lenovo X1 x86_64
  • Dell Latitude x86_64
  • System 76 x86_64

Installation Method

  • Requires full re-installation
  • Can be updated with nixos-rebuild ... switch
  • Other:

Test Steps To Verify:

  1. Verify idle timeouts work as expected according to these timers:
    • 5 mins - screen off and session locked
    • 15 mins - suspend on AC (if suspend is enabled)
    • 15 mins - suspend on battery (if suspend is enabled)
  2. Verify idle timeouts can be interrupted by user activity
  3. Adjust idle timeouts in the COSMIC Settings -> Power & battery page, verify adjustments take effect
  4. (Optional) adjust power profiles via COSMIC Settings -> Power & battery. Adjustments should take effect immediately, same as with the battery applet.
  5. Verify suspension is still disabled on s76 darp11

@kajusnau kajusnau self-assigned this Jan 21, 2026
@kajusnau kajusnau changed the title idle: replace swayidle with cosmic built-in idle: use cosmic-idle, allow runtime idle config adjustment Jan 21, 2026
vunnyso

This comment was marked as resolved.

@kajusnau

This comment was marked as resolved.

@kajusnau kajusnau force-pushed the cleanup-desktop-config branch from c4d7444 to 4b4eac2 Compare January 22, 2026 08:43
@kajusnau kajusnau added the Needs Testing CI Team to pre-verify label Jan 22, 2026
@kajusnau kajusnau removed the Needs Testing CI Team to pre-verify label Jan 22, 2026
@kajusnau

This comment was marked as outdated.

- removed swayidle
- desktop idle behavior is managed by cosmic-idle
- re-enabled cosmic settings power page
- allow user to change idle behavior at runtime
- set default screen off time to 5 min
- set default suspend (ac and battery) to 15 min
- move 'allowSuspend' option to power-manager namespace

Signed-off-by: Kajus Naujokaitis <kajus.naujokaitis@unikie.com>
@kajusnau
Copy link
Collaborator Author

kajusnau commented Jan 22, 2026

Fixed allowSuspend not being set for host config, defaulting to false.

Suspension should now work properly wherever it is enabled.

@milva-unikie
Copy link

Tested on Darter Pro and Lenovo X1 (new image)

All good!

  • Laptop is locked and the screen turns off after 5 minutes.
  • Lenovo X1: Laptop suspends after 15 minutes.
  • Darter Pro: Suspension is disabled, the screen stays off but the laptop does not suspend.
  • User can change the timing of the screen off / suspend in the settings.
  • Activity on the laptop resets the idle timeouts.
  • Power profiles work.
  • Found one nice surprise: Power & battery page shows the battery of connected USB devices.

Pre-merge pipeline has failures on laptops because swayidle is removed. Test automation changes are ready and tested tiiuae/ci-test-automation#637. They need to be merged together with this @brianmcgillion.

@milva-unikie milva-unikie added Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon Tested on System76 and removed Needs Testing CI Team to pre-verify labels Jan 23, 2026
@brianmcgillion brianmcgillion merged commit 4552a22 into tiiuae:main Jan 23, 2026
31 of 32 checks passed
@kajusnau kajusnau deleted the cleanup-desktop-config branch January 23, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon Tested on System76

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants