VectorLinux
December 19, 2014, 11:37:35 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Suspend to RAM: Fails after accidental power loss <SOLVED>  (Read 3456 times)
LLL
Global Moderator
Vectorite
*****
Posts: 263


The sun is shining...


« on: December 07, 2009, 09:09:49 pm »

So...suspend to RAM has been working well and fine, and then I made an 'oops' by unplugging my stand-by machine while the battery was out, which powered it off instantly, and resulted in an unclean filesystem on boot. Nothing surprising so far. BUT, now suspend doesn't work. More specifics below - any thoughts appreciated. I'm pretty good at Googling and tinkering, but stuck here.

My machine:
- VL 6.0, Xfce, Kernel 2.6.27.12
- Thinkpad T43p
- Xfce-Power-Manager and pm-utils for power management

- Suspend used to work when I...
  • pressed the sleep key
  • closed the lid
  • chose suspend from the shutdown menu

- Now none of those do anything, nor does running 'pm-suspend' from a terminal as root (just clears the line with no error or output)
- Running 'suspend' (no "pm") as root does this...
Quote
root:# suspend
[1]+  Stopped                 su
...and kicks me back to being a normal user (not sure what's happening here)
- Hibernate still works as before, whether selecting from the Xfce menu or running 'hibernate' (running pm-hibernate does nothing)

- I've checked the logs...
/var/log/acpid
Quote
[Mon Dec  7 23:32:27 2009] executing action "/etc/acpi/acpi_handler.sh button/lid LID 00000080 0000000a"
[Mon Dec  7 23:32:27 2009] BEGIN HANDLER MESSAGES
[Mon Dec  7 23:32:27 2009] END HANDLER MESSAGES
[Mon Dec  7 23:32:27 2009] action exited with status 0
[Mon Dec  7 23:32:27 2009] completed event "button/lid LID 00000080 0000000a"
/var/log/messages
Quote
Dec  7 23:24:11 Vector logger: ACPI group ac_adapter / action AC is not defined
Dec  7 23:24:11 Vector logger: ACPI group processor / action CPU is not defined
Dec  7 23:24:11 Vector logger: ACPI group thermal_zone / action THM0 is not defined
Dec  7 23:24:11 Vector logger: ACPI group battery / action BAT0 is not defined
Dec  7 23:24:11 Vector logger: ACPI group battery / action BAT0 is not defined
Dec  7 23:24:53 Vector logger: ACPI group ac_adapter / action AC is not defined
Dec  7 23:24:53 Vector logger: ACPI group processor / action CPU is not defined
Dec  7 23:24:53 Vector logger: ACPI group thermal_zone / action THM0 is not defined
Dec  7 23:24:53 Vector logger: ACPI group battery / action BAT0 is not defined
Dec  7 23:24:56 Vector logger: ACPI group battery / action BAT0 is not defined
Dec  7 23:32:03 Vector logger: ACPI group ibm / action hotkey is not defined
Dec  7 23:32:20 Vector logger: ACPI action lid is not defined
/var/log/pm-suspend.log
Quote
Sun Nov 29 20:23:08 EST 2009: performing suspend
...which makes me think acpid is seeing the events, but doesn't know what to do with them...which leaves me wondering: Is acpid supposed to kick these things into gear, or is it HAL and pm-utils that takes this on now? The pm-suspend.log shows the last time my computer went into suspend prior to my pulling the plug and starting this mess, but nothing since (despite repeated lid-closings, and running 'pm-suspend' from a terminal as root with no result).

- My /etc/acpi/acpi_handler.sh file is as below, mostly undefined. Again, not sure if this means it's not setup correctly, or if HAL/pm-utils is supposed to be handling these events now.
Quote
cat acpi_handler.sh
#!/bin/sh
# Default acpi script that takes an entry for all actions

IFS=${IFS}/
set $@

case "$1" in
  button)
    case "$2" in
      power) /sbin/init 0
         ;;
      *) logger "ACPI action $2 is not defined"
         ;;
    esac
    ;;
  *)
    logger "ACPI group $1 / action $2 is not defined"
    ;;
esac

- Reinstalling pm-utils and Xfce-Power-Manager doesn't fix the problem

Any thoughts?

Thanks,

LLL
« Last Edit: December 09, 2009, 05:43:11 am by LLL » Logged

Lost & Lovin' Linux...living on:
VectorLinux 6.0 with XFCE on Thinkpad T43p (2.13 GHz | 2GB | 60GB)
LLL
Global Moderator
Vectorite
*****
Posts: 263


The sun is shining...


« Reply #1 on: December 09, 2009, 05:42:14 am »

Well what do you know: Sometimes posting for help is the best way to help yourself! With a renewed sense of hope (knowing a VL'er might come to the rescue), my creative problem solving energy was restored, and I began to wonder: Doesn't pm-powersave throw a "lock" on things? And wouldn't this lock still be in place as a result of my accidental power loss while suspended to RAM? The answer is yes.

Removing (as root) the stale /var/run/pm-utils/locks/pm-suspend.lock file has allowed my machine to suspend again.

A 10-second fix that took 10 hours to discover.

Thanks to all who looked in!

LLL

P.S. Marking thread as solved - any questions, please shout!
Logged

Lost & Lovin' Linux...living on:
VectorLinux 6.0 with XFCE on Thinkpad T43p (2.13 GHz | 2GB | 60GB)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!