Skip to content
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

upower: Upgrade to 1.90.6 and extend CriticalPowerActions #341086

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

benjamb
Copy link
Contributor

@benjamb benjamb commented Sep 10, 2024

Description of changes

  • Upgrade to 1.90.6
  • Support Suspend and Ignore CriticalPowerActions introduced in this release.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Sep 10, 2024
@benjamb
Copy link
Contributor Author

benjamb commented Sep 10, 2024

When I build locally, the compilation succeeds, but I run into test failures.

Copy link
Member

@jtojnar jtojnar left a comment

Choose a reason for hiding this comment

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

@@ -218,6 +246,7 @@ in
TimeLow = cfg.timeLow;
TimeCritical = cfg.timeCritical;
TimeAction = cfg.timeAction;
AllowRiskyCriticalPowerAction = cfg.allowRiskyCriticalPowerAction;
Copy link
Member

Choose a reason for hiding this comment

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

Ugh, we should really switch to RFC 42-style settings so that we do not need to keep adding the options forever like this. Opened #341107 for now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That does indeed seem like better way of doing things.

@@ -80,6 +81,7 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
libgudev
libusb1
polkit
Copy link
Member

Choose a reason for hiding this comment

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

Looking at the diff, https://gitlab.freedesktop.org/upower/upower/-/commit/0c9ba8048fd38567aa1292f3760fbff48904c3ca sets POLKIT_ACTIONDIR define but it does not look like it is currently used? If not, that should not be an issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, it doesn't look like it's used.

pkgs/os-specific/linux/upower/default.nix Outdated Show resolved Hide resolved
@benjamb benjamb force-pushed the upower-critical-actions branch 2 times, most recently from 8c1e1f5 to ad1a29d Compare September 11, 2024 11:15
@ofborg ofborg bot requested a review from jtojnar September 11, 2024 21:23
@benjamb benjamb force-pushed the upower-critical-actions branch 3 times, most recently from 9a67952 to 508db42 Compare September 18, 2024 08:26
@benjamb benjamb changed the title upower: Upgrade to 1.90.5 and extend CriticalPowerActions upower: Upgrade to 1.90.6 and extend CriticalPowerActions Sep 18, 2024
@benjamb
Copy link
Contributor Author

benjamb commented Sep 18, 2024

@jtojnar I've bumped up to 1.90.6, which avoids the need for patching the tests.

@benjamb
Copy link
Contributor Author

benjamb commented Oct 1, 2024

@jtojnar Don't suppose you have time for another review pass?

Copy link
Contributor

@jfly jfly left a comment

Choose a reason for hiding this comment

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

Thank you for this change! I just had my laptop die on my for the upteenth time, and decided to finally set up upower.

I don't have hibernation support enabled on my machine, so I want this Sleep functionality!

nixos/modules/services/hardware/upower.nix Outdated Show resolved Hide resolved
nixos/modules/services/hardware/upower.nix Outdated Show resolved Hide resolved
nixos/modules/services/hardware/upower.nix Outdated Show resolved Hide resolved
@benjamb benjamb force-pushed the upower-critical-actions branch from 508db42 to 57077af Compare October 9, 2024 23:40
Copy link
Contributor

@jfly jfly left a comment

Choose a reason for hiding this comment

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

Latest changes LGTM

@benjamb
Copy link
Contributor Author

benjamb commented Oct 23, 2024

@jfly @jtojnar What's required of me in order for this to land? It would be great to get this in before 24.11.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/2062

@jfly
Copy link
Contributor

jfly commented Oct 26, 2024

I've been using this for a couple weeks and it's working great for me.

I've added a link to this PR in https://discourse.nixos.org/t/prs-already-reviewed/2617/2062.

@wegank wegank added 12.approvals: 1 This PR was reviewed and approved by one reputable person 2.status: merge conflict This PR has merge conflicts with the target branch labels Oct 29, 2024
@jfly
Copy link
Contributor

jfly commented Nov 22, 2024

@benjamb, do you have time to rebase this branchb and address the conflicts? If it's helpful, I'm maintaining a branch here with your changes: https://github.com/jfly/nixpkgs/tree/upower-critical-actions

@benjamb benjamb force-pushed the upower-critical-actions branch from 57077af to 789bb45 Compare November 22, 2024 14:11
@benjamb
Copy link
Contributor Author

benjamb commented Nov 22, 2024

@benjamb, do you have time to rebase this brand and address the conflicts?

Done!

@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Nov 23, 2024
@wegank wegank removed the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Nov 23, 2024
@jfly
Copy link
Contributor

jfly commented Dec 16, 2024

@jtojnar, any chance of getting this merged?

@jfly
Copy link
Contributor

jfly commented Jan 5, 2025

@wegank, any chance of getting this merged?

@gepbird
Copy link
Contributor

gepbird commented Jan 9, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 341086


x86_64-linux

⏩ 2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test
❌ 68 packages failed to build:
  • adapta-gtk-theme
  • ags
  • cinnamon-gsettings-overrides
  • collision
  • dropbox-cli
  • dropbox-cli.nautilusExtension
  • eiciel
  • eiciel.nautilusExtension
  • file-roller
  • gnome-bluetooth
  • gnome-bluetooth.dev
  • gnome-bluetooth.devdoc
  • gnome-bluetooth.man
  • gnome-browser-connector
  • gnome-control-center
  • gnome-control-center.debug
  • gnome-flashback
  • gnome-panel-with-modules
  • gnome-photos
  • gnome-photos.installedTests
  • gnome-power-manager
  • gnome-session
  • gnome-session.debug
  • gnome-session.sessions
  • gnome-shell
  • gnome-shell.debug
  • gnome-shell.devdoc
  • gnome-terminal
  • gnome-tweaks
  • gnome.nixos-gsettings-overrides
  • gnomeExtensions.easyScreenCast
  • gnomeExtensions.gsconnect
  • gnomeExtensions.gsconnect.installedTests
  • gnomeExtensions.gtk4-desktop-icons-ng-ding
  • insync-nautilus
  • localsearch
  • matrix-gtk-theme
  • mojave-gtk-theme
  • nautilus
  • nautilus-open-any-terminal
  • nautilus-open-any-terminal.dist
  • nautilus-open-in-blackbox
  • nautilus-python
  • nautilus-python.dev
  • nautilus-python.devdoc
  • nautilus-python.doc
  • nautilus.dev
  • nautilus.devdoc
  • nemo-fileroller
  • nemo-with-extensions
  • pantheon.elementary-greeter
  • pantheon.elementary-session-settings
  • pantheon.file-roller-contract
  • pantheon.switchboard-plug-power
  • pantheon.switchboard-with-plugs
  • pantheon.wingpanel-applications-menu
  • pantheon.wingpanel-indicator-power
  • pantheon.wingpanel-with-indicators
  • papers
  • papers.dev
  • papers.devdoc
  • phosh
  • phosh-mobile-settings
  • thermald
  • thermald.devdoc
  • tokyonight-gtk-theme
  • vimix-gtk-themes
  • waybar
✅ 85 packages built:
  • ayatana-indicator-session
  • budgie-analogue-clock-applet
  • budgie-control-center
  • budgie-control-center.debug
  • budgie-desktop
  • budgie-desktop-with-plugins
  • budgie-desktop.dev
  • budgie-desktop.man
  • budgie-gsettings-overrides
  • budgie-session
  • budgie-session.debug
  • budgie-session.man
  • budgie-user-indicator-redux
  • cinnamon-common
  • cinnamon-control-center
  • cinnamon-screensaver
  • cinnamon-session
  • cinnamon-settings-daemon
  • cinnamon-settings-daemon.dev
  • clight
  • eolie
  • gnome-applets
  • gnome-disk-utility
  • gnome-settings-daemon
  • gnome-settings-daemon43 (pantheon.gnome-settings-daemon)
  • lomiri.lomiri
  • lomiri.lomiri-session
  • lomiri.lomiri-system-settings
  • lomiri.lomiri-system-settings-unwrapped
  • lomiri.lomiri-system-settings-unwrapped.dev
  • magpie
  • magpie.debug
  • magpie.dev
  • magpie.devdoc
  • mate.mate-applets
  • mate.mate-panel-with-applets
  • mate.mate-power-manager
  • mate.mate-tweak
  • mate.mate-tweak.dist
  • mixxx
  • monitor
  • mutter
  • mutter.debug
  • mutter.dev
  • mutter.devdoc
  • mutter.man
  • mutter43 (pantheon.mutter)
  • mutter43.debug (pantheon.mutter.debug)
  • mutter43.dev (pantheon.mutter.dev)
  • mutter43.devdoc (pantheon.mutter.devdoc)
  • mutter43.man (pantheon.mutter.man)
  • pantheon.elementary-gsettings-schemas
  • pantheon.elementary-onboarding
  • pantheon.elementary-shortcut-overlay
  • pantheon.gala
  • pantheon.switchboard-plug-bluetooth
  • pantheon.switchboard-plug-keyboard
  • pantheon.switchboard-plug-mouse-touchpad
  • pantheon.switchboard-plug-pantheon-shell
  • pantheon.switchboard-plug-security-privacy
  • pantheon.wingpanel
  • pantheon.wingpanel-indicator-a11y
  • pantheon.wingpanel-indicator-bluetooth
  • pantheon.wingpanel-indicator-datetime
  • pantheon.wingpanel-indicator-keyboard
  • pantheon.wingpanel-indicator-network
  • pantheon.wingpanel-indicator-nightlight
  • pantheon.wingpanel-indicator-notifications
  • pantheon.wingpanel-indicator-sound
  • pantheon.wingpanel-quick-settings
  • phoc
  • power-profiles-daemon
  • power-profiles-daemon.devdoc
  • streamcontroller
  • upower
  • upower.dev
  • upower.devdoc
  • upower.installedTests
  • wingpanel-indicator-ayatana
  • xdg-desktop-portal-gtk
  • xfce.xfce4-power-manager
  • xfce.xfce4-power-manager.dev
  • xfce.xfce4-settings
  • xfce.xfce4-settings.dev
  • xfce.xfce4-weather-plugin

The failures are caused by this error: Package 'polkit-gobject-1', required by 'upower-glib', not found for waybar, thermald or gnome-bluetooth, others are transitively failing.

@benjamb benjamb force-pushed the upower-critical-actions branch from 789bb45 to e811024 Compare January 10, 2025 09:24
@benjamb
Copy link
Contributor Author

benjamb commented Jan 10, 2025

@gepbird I have bumped polkit up to propagatedBuildInputs, this at least fixes the waybar build, but should in theory fix the rest as well.

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin and removed 10.rebuild-darwin: 11-100 labels Jan 10, 2025
Copy link
Member

@jtojnar jtojnar left a comment

Choose a reason for hiding this comment

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

@gepbird
Copy link
Contributor

gepbird commented Jan 10, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 341086


x86_64-linux

⏩ 2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test
✅ 153 packages built:
  • adapta-gtk-theme
  • ags
  • ayatana-indicator-session
  • budgie-analogue-clock-applet
  • budgie-control-center
  • budgie-control-center.debug
  • budgie-desktop
  • budgie-desktop-with-plugins
  • budgie-desktop.dev
  • budgie-desktop.man
  • budgie-gsettings-overrides
  • budgie-session
  • budgie-session.debug
  • budgie-session.man
  • budgie-user-indicator-redux
  • cinnamon-common
  • cinnamon-control-center
  • cinnamon-gsettings-overrides
  • cinnamon-screensaver
  • cinnamon-session
  • cinnamon-settings-daemon
  • cinnamon-settings-daemon.dev
  • clight
  • collision
  • dropbox-cli
  • dropbox-cli.nautilusExtension
  • eiciel
  • eiciel.nautilusExtension
  • eolie
  • file-roller
  • gnome-applets
  • gnome-bluetooth
  • gnome-bluetooth.dev
  • gnome-bluetooth.devdoc
  • gnome-bluetooth.man
  • gnome-browser-connector
  • gnome-control-center
  • gnome-control-center.debug
  • gnome-disk-utility
  • gnome-flashback
  • gnome-panel-with-modules
  • gnome-photos
  • gnome-photos.installedTests
  • gnome-power-manager
  • gnome-session
  • gnome-session.debug
  • gnome-session.sessions
  • gnome-settings-daemon
  • gnome-settings-daemon43 (pantheon.gnome-settings-daemon)
  • gnome-shell
  • gnome-shell.debug
  • gnome-shell.devdoc
  • gnome-terminal
  • gnome-tweaks
  • gnome.nixos-gsettings-overrides
  • gnomeExtensions.easyScreenCast
  • gnomeExtensions.gsconnect
  • gnomeExtensions.gsconnect.installedTests
  • gnomeExtensions.gtk4-desktop-icons-ng-ding
  • insync-nautilus
  • localsearch
  • lomiri.lomiri
  • lomiri.lomiri-session
  • lomiri.lomiri-system-settings
  • lomiri.lomiri-system-settings-unwrapped
  • lomiri.lomiri-system-settings-unwrapped.dev
  • magpie
  • magpie.debug
  • magpie.dev
  • magpie.devdoc
  • mate.mate-applets
  • mate.mate-panel-with-applets
  • mate.mate-power-manager
  • mate.mate-tweak
  • mate.mate-tweak.dist
  • matrix-gtk-theme
  • mixxx
  • mojave-gtk-theme
  • monitor
  • mutter
  • mutter.debug
  • mutter.dev
  • mutter.devdoc
  • mutter.man
  • mutter43 (pantheon.mutter)
  • mutter43.debug (pantheon.mutter.debug)
  • mutter43.dev (pantheon.mutter.dev)
  • mutter43.devdoc (pantheon.mutter.devdoc)
  • mutter43.man (pantheon.mutter.man)
  • nautilus
  • nautilus-open-any-terminal
  • nautilus-open-any-terminal.dist
  • nautilus-open-in-blackbox
  • nautilus-python
  • nautilus-python.dev
  • nautilus-python.devdoc
  • nautilus-python.doc
  • nautilus.dev
  • nautilus.devdoc
  • nemo-fileroller
  • nemo-with-extensions
  • pantheon.elementary-greeter
  • pantheon.elementary-gsettings-schemas
  • pantheon.elementary-onboarding
  • pantheon.elementary-session-settings
  • pantheon.elementary-shortcut-overlay
  • pantheon.file-roller-contract
  • pantheon.gala
  • pantheon.switchboard-plug-bluetooth
  • pantheon.switchboard-plug-keyboard
  • pantheon.switchboard-plug-mouse-touchpad
  • pantheon.switchboard-plug-pantheon-shell
  • pantheon.switchboard-plug-power
  • pantheon.switchboard-plug-security-privacy
  • pantheon.switchboard-with-plugs
  • pantheon.wingpanel
  • pantheon.wingpanel-applications-menu
  • pantheon.wingpanel-indicator-a11y
  • pantheon.wingpanel-indicator-bluetooth
  • pantheon.wingpanel-indicator-datetime
  • pantheon.wingpanel-indicator-keyboard
  • pantheon.wingpanel-indicator-network
  • pantheon.wingpanel-indicator-nightlight
  • pantheon.wingpanel-indicator-notifications
  • pantheon.wingpanel-indicator-power
  • pantheon.wingpanel-indicator-sound
  • pantheon.wingpanel-quick-settings
  • pantheon.wingpanel-with-indicators
  • papers
  • papers.dev
  • papers.devdoc
  • phoc
  • phosh
  • phosh-mobile-settings
  • power-profiles-daemon
  • power-profiles-daemon.devdoc
  • streamcontroller
  • thermald
  • thermald.devdoc
  • tokyonight-gtk-theme
  • upower
  • upower.dev
  • upower.devdoc
  • upower.installedTests
  • vimix-gtk-themes
  • waybar
  • wingpanel-indicator-ayatana
  • wingpanel-indicator-namarupa
  • xdg-desktop-portal-gtk
  • xfce.xfce4-power-manager
  • xfce.xfce4-power-manager.dev
  • xfce.xfce4-systemload-plugin
  • xfce.xfce4-weather-plugin

@wegank wegank added the 12.approvals: 2 This PR was reviewed and approved by two reputable people label Jan 10, 2025
@jtojnar jtojnar merged commit 5c4767a into NixOS:master Jan 10, 2025
25 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 101-500 12.approvals: 2 This PR was reviewed and approved by two reputable people
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants