pm-suspend aborts if highest numbered CPU offline, as of kernel 4.2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pm-utils (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Kernel 4.2 includes a significant commit (87549141d516ae
If the failed echo is not the last pass through the loop, then
the bad exit code gets overwritten with a good one before
the loop exits. If the failed echo is the last pass through the loop, due to the highest numbered CPU being offline, then then 94cpufreq returns an error code and pm-suspend aborts.
So what is needed is something like (and this doesn't actually work yet):
hibernate_cpufreq()
{
( cd /sys/devices/
for x in cpu[0-9]*; do
# if cpufreq is a symlink, it is handled by another cpu. Skip.
[ -L "$x/cpufreq" ] && continue
# if we do not have a scaling_governor file, skip.
[ -f "$gov" ] || continue
+ # if the CPU is offline, skip, unless no file, i.e. CPU0.
+ [ $(cat "$x/online") = "1" -o ! -f "$x/online" ] || continue
Or
+ if [ $(cat "$x/online") = "1" ] || [ ! -f "$x/online" ]; then
+ continue;
+ fi
Or something similar that actually works.
# if our temporary governor is not available, skip.
done )
}
Or just force a good return code at the end (which is what I'm doing now, so that I can move on).
Note: I also filed this same bug report upstream.
https:/
Changed in pm-utils (Ubuntu): | |
status: | Incomplete → Invalid |
As of kernel 4.4-rc1 this bug becomes invalid, as the kernel was patched such that this issue no longer occurs.
I'll wait until kernel 4.4 is finished, check again, then set the status of this bug report to invalid.