Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 503042 - sys-power/hibernate-script-2.0-r6 stops unrelated services on suspend
Summary: sys-power/hibernate-script-2.0-r6 stops unrelated services on suspend
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alon Bar-Lev (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-02-28 13:30 UTC by v1ne2go
Modified: 2014-03-29 22:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
A patch that solves the problem (hwclock-suspend.patch,418 bytes, patch)
2014-02-28 13:31 UTC, v1ne2go
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description v1ne2go 2014-02-28 13:30:53 UTC
If you activate "SaveClock yes" in /etc/hibernate/common.conf and have services installed that depend on the "clock" service, they are also stopped during suspend, but not restarted afterwards.
This might only apply to systems using OpenRC, which I use (sys-apps/openrc-0.12.4).
In my case, this affects fcron:
# /etc/init.d/hwclock -Z stop
 * stop: fcron hwclock
#

I expect only hwclock to be stopped.

Reproducible: Always

Steps to Reproduce:
1. Use OpenRC, install fcron and hibernate-script
2. Activate "SaveClock yes" in /etc/hibernate/common.conf
2. ps ax -> fcron runs
4. # hibernate
5. resume your system
6. ps ax -> no fcron runs
Actual Results:  
fcron is stopped and remains stopped

Expected Results:  
fcron keeps on running.

I fixed this by ignoring hwclock's dependencies when stopping it, see the attached patch.
Comment 1 v1ne2go 2014-02-28 13:31:26 UTC
Created attachment 371428 [details, diff]
A patch that solves the problem
Comment 2 Alon Bar-Lev (RETIRED) gentoo-dev 2014-02-28 19:53:29 UTC
Hi,

Can you please checkout the following instead:

+           /etc/init.d/hwclock save > /dev/null 2>&1

and:

+           /etc/init.d/hwclock restart > /dev/null 2>&1

BTW: on recent kernels it is better to configure CONFIG_RTC_HCTOSYS than using this option.
Comment 3 v1ne2go 2014-03-26 12:21:04 UTC
This change also works for me.
Thank you for looking at it!

As suggested, I will be switching to clock_hctosys="NO" in the future. Thank you for the hint.