hal system power suspend linux script tries to read stdin but there is none
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
hal (Ubuntu) |
Expired
|
Undecided
|
Unassigned | ||
Bug Description
Binary package hint: hal
Package: hal
Version: 0.5.10-5ubuntu8
Attempted command:
sudo dbus-send --print-reply --system --dest=
/org/
org.
Expected result: suspend the computer
Actual result: nothing
Investigation:
Running hal with "sudo /usr/sbin/hald --daemon=no --verbose=yes --use-syslog" and retrying, found in syslog:
Mar 5 18:22:50 piyo hald[7915]: 18:22:50.326 [I] hald_dbus.c:4025: failed with 'org.freedeskto
Looked into /usr/lib/
# Urh. Do any BIOSen handle this correctly?
if [ $seconds_to_sleep != "0" ] ; then
alarm_
fi
That's the source of the error in syslog.
Fix: Removing the "read seconds_to_sleep" and the check if it equals zero fixes the issue.
This is frustrating because even if you give seconds_to_sleep a value, the script doesn't even attempt to use it and actual wake the machine up automatically. The following command should work very well for almost any BIOS:
echo "+00-00-00 00:00:$
But for now, please remove this half-baked feature or give the script a better test such as:
if [ -t 0 -a -z "$seconds_to_sleep" -a "$seconds_to_sleep" -gt "0" ]; then
setup_
fi
Thank you for taking the time to report this bug and helping to make Ubuntu better. We are sorry that we do not always have the capacity to look at all reported bugs in a timely manner. There have been many changes in Ubuntu since that time you reported the bug and your problem may have been fixed with some of the updates. It would help us a lot if you could test it on a currently supported Ubuntu version. When you test it and it is still an issue, kindly upload the updated logs by running apport-collect 198693 and any other logs that are relevant for this particular issue.