-
-
Notifications
You must be signed in to change notification settings - Fork 366
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
NUT doesn't support "inhibitor interface" #1070
Labels
service/daemon start/stop
General subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug
systemd
Milestone
Comments
Seems related to #1833 |
Some docs on this:
Posted some questions at systemd/systemd#34004 |
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…m systemctl if pkg-config is missing [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…tworkupstools#1070] Thanks to "Ropid" for contributing this file via networkupstools#1833 (comment) Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…etworkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…us API) [networkupstools#1070] Thanks to pointers from systemd/systemd#34004 Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…NHIBITOR availability for default installation of nut-sleep.service [networkupstools#1833, networkupstools#1070, networkupstools#2596] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…kupstools#1070] Snow-ball several libsystemd pseudo-code and real code examples. Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…rkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…er systemd which we do not use now [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…ble systemd_bus connection [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…f a call() failed, and auto-close it on exit [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…etworkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…workupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…uce Uninhibit() and isPreparingForSleep() methods [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…etworkupstools#1070] This commit adds support to process the systemd (later potentially equivalent) framework signals about going to sleep or waking up, to grab and release the locks which can hold up the actual start of sleep mode. Later work would focus on not shutting down because of the time jump when we wake up :) Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…-up [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…and stress that older hacks for the purpose may be obsolete now [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
@Callisos : Cheers, FWIW, a PR with implementation attempt is posted, practical testing would be welcome :) |
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…ith_description() for better journal logging [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
…rkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 19, 2024
Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 21, 2024
…setting clocks on UPS readings [networkupstools#1070] Also make sure it is treated as a reload and not initial load! Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 21, 2024
…her isInhibitSupported/isPreparingForSleepSupported [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 21, 2024
…eepSupported to avoid needless decisions and logs on some deployments [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 21, 2024
…one between loop cycles [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 21, 2024
…etworkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 21, 2024
…ging, add notes that we mark methods unsupported at run-time [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 21, 2024
…tion, report also if we can monitor changes of sleep/wake state [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 21, 2024
…e a value from an aborted older loop cycle, make sure it is up to date now just before we handle it [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 21, 2024
…too long [networkupstools#1070] Treat *any* clock jump same as OS sleep (act to avoid stale UPS info), even if it was not a suspend/hibernate event but e.g. summer/winter time change or just upsmon suspended by a debugger or blocked stdio. Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 21, 2024
] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 21, 2024
…1070, networkupstools#2597] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 22, 2024
…etworkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Aug 22, 2024
… negative time jumps [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
This was referenced Aug 23, 2024
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Dec 5, 2024
…mely high verbosity level is on) [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Dec 5, 2024
…originally opened it [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Dec 5, 2024
…tor_status also if exit_flag gets raised (e.g. Ctrl+C during the wait) [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Dec 5, 2024
…etween main loop cycles [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Dec 5, 2024
… from time_t to more precise timeval [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Dec 5, 2024
… from time_t to more precise timeval [networkupstools#1070] Signed-off-by: Jim Klimov <[email protected]>
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Dec 6, 2024
…ID that originally opened it [networkupstools#1070]" This reverts commit a6496a6: close from a child process does not seem to impact parent, but a non-close is a memory leak when such child exits.
jimklimov
added a commit
to jimklimov/nut
that referenced
this issue
Dec 6, 2024
…ID that originally opened it [networkupstools#1070]" This reverts commit a6496a6: close from a child process does not seem to impact parent, but a non-close is a memory leak when such child exits. Signed-off-by: Jim Klimov <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
service/daemon start/stop
General subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug
systemd
I would like NUT to hibernate my PC instead of shutting it down when ONBATT event is registered. So I've put:
SHUTDOWNCMD "systemctl hibernate" to /etc/ups/upsmon.conf.
But this works only once, unless there's a hack in /usr/lib/systemd/system-sleep/ which stops nut-server.service during hibernation and starts it during wake up, there also needs to be starting of nut-monitor.service specified. Otherwise nut-monitor.service reports to be "inactive (dead)" after waking up so no ONBATT event is registered and thus no hibernation takes place. In openSUSE's NUT package, currently there's a hack /usr/lib/systemd/system-sleep/nut.sh for it and is broken so it needs to be fixed manually.
After checking "man systemd-sleep", it states that scripts in /usr/lib/systemd/system-sleep/ are considered hacks for applications not using the so called "inhibitor interface".
If NUT would use inhibitor interface, there wouldn't be a need for /usr/lib/systemd/system-sleep/ hacks implemented by individual distros and my PC could be hibernated by NUT without problem.
Tested in OS: openSUSE Leap 15.3. with NUT v.2.7.4.
Related mailing list discussion
And continuation
The text was updated successfully, but these errors were encountered: