Link to home
Start Free TrialLog in
Avatar of Mark
Mark

asked on

linux prevent lid close suspend

I have a VIAO VGN-p530H mini netbook running Slackware 14.1, kernel xxx. When I close the lid, the computer hangs. In fact I have to power down to reset. What I want is for nothing to happen when I close the lid; no action.

The link http://slackware.osuosl.org/slackware_source/ap/pm-utils/README.SLACKWARE suggested a script to determine my supported modes:
root@viao:/# for i in hibernate suspend suspend-hybrid ; do
>     pm-is-supported --$i \
>       && echo "$i is supported" \
>       || echo "$i is not supported" ;
>   done
hibernate is supported
suspend is supported
suspend-hybrid is supported

Open in new window

My /var/log/messages from just after closing the lid gives:
/var/log/messages
Dec 24 04:35:05 viao logger: ACPI action lid is not defined

Open in new window

My /etc/acpi/acip_handler.sh has:
#!/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

Open in new window

and /etc/acpi/events/default is:
# This is the ACPID default configuration, it takes all
# events and passes them to /etc/acpi/default.sh for further
# processing.

# event keeps a regular expression matching the event. To get
# power events only, just use something like "event=button power.*"
# to catch it.
# action keeps the command to be executed after an event occurs
# In case of the power event above, your entry may look this way:
#event=button power.*
#action=/sbin/init 0

# Optionally you can specify the placeholder %e. It will pass
# through the whole kernel event message to the program you've
# specified.

event=.*
action=/etc/acpi/acpi_handler.sh %e

Open in new window

Despite having located these various elements I have little clue as to how to change acpi settings to do what I want, and I haven't found any specific solutions web surfing.
Avatar of Kimputer
Kimputer

Your  /etc/acpi/acip_handler.sh file (along with the log file output) suggest the LID closing action does NOTHING in the system at all (it only displays message, nothing more).
That suggest that your VAIO will react the same say (some lower level BIOS with linux interaction where you have no control over) even if we implement a LID CLOSE function.

Try upgrading EVERYTHING you possibly can (including drivers/optional drivers/kernel/acpid packages)
Are  you using any GUI/Windows manager (X/Gnome/KDE)?
Avatar of Mark

ASKER

Kimputer: > Your  /etc/acpi/acip_handler.sh file (along with the log file output) suggest the LID closing action does NOTHING in the system at all ... Try upgrading EVERYTHING you possibly can ...

Hmmm, I was afraid of that. In fact, I did upgrade everything already. This poster: http://www.linuxquestions.org/questions/slackware-14/lid-close-lockup-4175522108/#post5254435 found that lid closing didn't work with 14.1 kernels  3.10.17, 3.12.24 and 3.16.4but did work with kernel 3.4.66. Perhaps I should give that a shot? My current version is 3.14.24. How would I locate a specific version kernel like this.

I used to have Ubuntu installed on this same computer, not sure of kernel version, and I recall that closing the lid did not shutdown the computer. So, perhaps a kernel change might work.

What do you think?
SOLUTION
Avatar of Kimputer
Kimputer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark

ASKER

That did the trick? Now, closing the lid has no effect either when running X or at the command line.

Do you have any idea what config file is modified by this tool? Both /etc/acpi/acip_handler.sh and /etc/acpi/events/default are unchanged.
Sadly I don't know exactly. I suspect both the KDE power management as well as acpid responded, and you solved it correctly by setting the option in KDE.
Avatar of Mark

ASKER

Well, it would have been nice to know where this is set as I don't use KDE that often, but I guess I can do so when needed for this setting.
Avatar of Mark

ASKER

My posting describes the detail of the solution in anticipation of Kimputer's posting. Kimputer's posting led me to the solution.