Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

linux prevent lid close suspend

Posted on 2014-12-23
8
Medium Priority
?
342 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 36

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 36

Assisted Solution

by:Kimputer
Kimputer earned 2000 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 36

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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

618 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