|
Bugzilla – Full Text Bug Listing |
| Summary: | Closing laptop lid interrupts shutdown | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE LINUX 10.0 | Reporter: | Hugo Costelha <hugo.costelha> |
| Component: | Mobile Devices | Assignee: | Forgotten User ZhJd0F0L3x <forgotten_ZhJd0F0L3x> |
| Status: | VERIFIED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Enhancement | ||
| Priority: | P5 - None | CC: | bluedzins, dkukawka |
| Version: | Beta 4 | ||
| Target Milestone: | SUSE Linux 10.1 | ||
| Hardware: | i686 | ||
| OS: | All | ||
| Whiteboard: | |||
| Found By: | Customer | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Hugo Costelha
2005-09-26 15:48:01 UTC
IMHO this exactly what you've instructed the computer. I will look into this to see if we can do something about this. We will need to detect reliably if a shutdown is running and there will still be corner cases (e.g. you select "shutdown" in kde, but kde first saves your documents etc, logs you out and then shuts down the machine) that may lead to a similar problem, but there is room for improvement. Thanks for the suggestion! BTW: this is nothing easily solvable since it probably needs some infrastructure changes, too. This is why i rated this as "enhancement", but i will think about it and work to make it better. We would have to detect if a shutdown is in progress. Any idea how we could do this? Ok, thanks. i commited the following fix to SVN:
Index: sleep_helper_functions
===================================================================
--- sleep_helper_functions (revision 1950)
+++ sleep_helper_functions (working copy)
@@ -336,6 +336,19 @@
DEBUG "Stop services: $SERVICES_TO_RESTART" DEBUG
DEBUG "Modules to unload: $MODULES_TO_UNLOAD" DEBUG
+ ####### first check if the machine is shutting down right now.
+ echo "== checking runlevel ==" >> $LSMOD_LOG
+ D=`runlevel`
+ case $D in
+ *0|*6)
+ echo " system is shutting down or rebooting. Not suspending. '$D'" >> $LSMOD_LOG
+ notify "Shutdown or reboot in progress, not suspending." ERROR CONTINUE $EV_ID
+ progress_finish
+ $SCRIPT_RETURN $EV_ID 1 "Shutdown/reboot in progress, not suspending"
+ EXIT 1
+ ;;
+ esac
+ echo " no shutdown/reboot in progress, good." >> $LSMOD_LOG
+
####### Check for devices which need to be remounted after suspend #######
let PERCENT+=$STEP
[ "$UNMOUNT_FATFS" == "yes" ] && unmount_fatfs "$1" "$EV_ID"
This should detect if the system is on its way to runlevel 6 (reboot) or 0 (shutdown) and refuse to suspend.
*** Bug 157548 has been marked as a duplicate of this bug. *** We got another report that this does not work on Beta7. Maybe when clicking "Logout" in the gnome logout dialog and immediately closing the lid, the system is not yet in runlevel 0 or 6. So this check fails. But there is not much we can do then without extensive interaction between the desktop environment and powersaved. And we will not get this from GNOME. BTW: i do not consider this a real bug. When i click "log out" and then get asked to save the settings (for example), but close the lid too early to notice the question, i'd like it to suspend and not waste my batteries waiting for me to answer the question ;-) The bug is, that teh destop environments do not start the shutdown fast enough. i'd still consider this fixed, at least "as fixed as possible". *** Bug 203470 has been marked as a duplicate of this bug. *** |