• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 348
  • Last Modified:

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.
0
jmarkfoley
Asked:
jmarkfoley
  • 5
  • 3
2 Solutions
 
KimputerCommented:
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)?
0
 
jmarkfoleyAuthor Commented:
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?
0
 
KimputerCommented:
Actually I was hoping you were using an older kernel, and could update that. Going back to a year old kernel isn't recommended (they're updated for a reason, not for the least, security updates).
So you didn't answer the other question, KDE/Gnome? If so, graphic drivers upgrade could help. Acpid version?
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
jmarkfoleyAuthor Commented:
I believe I'm using KDE. In fact, I'm using it as I type this. I rarely use X on Linux, but am at the moment. In anticipating your suggestion, I navigated to Application Launcher > System Settings > Power Management, and set 'Button Event Management / when laptop lid closed' to "Do nothing". I'm about to try it now. Will post back results ....
0
 
jmarkfoleyAuthor Commented:
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.
0
 
KimputerCommented:
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.
0
 
jmarkfoleyAuthor Commented:
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.
0
 
jmarkfoleyAuthor Commented:
My posting describes the detail of the solution in anticipation of Kimputer's posting. Kimputer's posting led me to the solution.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now