Solved

linux prevent lid close suspend

Posted on 2014-12-23
8
316 Views
Last Modified: 2015-01-01
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
Comment
Question by:jmarkfoley
  • 5
  • 3
8 Comments
 
LVL 35

Expert Comment

by:Kimputer
ID: 40516263
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
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40516685
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
 
LVL 35

Assisted Solution

by:Kimputer
Kimputer earned 500 total points
ID: 40517557
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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 1

Accepted Solution

by:
jmarkfoley earned 0 total points
ID: 40517730
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
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40517809
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
 
LVL 35

Expert Comment

by:Kimputer
ID: 40517850
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
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40520113
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
 
LVL 1

Author Closing Comment

by:jmarkfoley
ID: 40526455
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
nagios 1 33
CentOS create a user with predefined MD5 Hashed password 17 84
How code a 301 redirect for folder files -> 1 file 2 39
How to enable sync between two yum repo? 1 30
Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now