LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 08-30-2009, 04:34 AM   #1
meetscott
Samhain Slackbuild Maintainer
 
Registered: Sep 2004
Location: Phoenix, AZ, USA
Distribution: Slackware
Posts: 411

Rep: Reputation: 42
Slackware 13 Suspend


Well, since no one else has started one, I guess I'll be the first on suspend for Slackware 13.

I have 2 laptops that would suspend perfectly under Slackware 12.2. Slamd64 12.2 also worked. Now, on Slackware 13, 64 bit, suspend no longer works when I close the laptop lid. It goes into suspend okay, but when I open the lid, it appears to come out of it except there is no display or keyboard available. I have to do a hard reset to get everything back.

For now, I have disabled suspend altogether in power management. I am interested to know if anyone else has suspend working. I think this might be a kde 4 issue, but I'm not sure.

Anyone with any thoughts or experience on this? I will not be upgrading my work laptop until I have found a reliable solution to this because I love coming into work, opening my display and having everything exactly as I left it. I consider it a must have feature now.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 08-30-2009, 05:31 AM   #2
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 227Reputation: 227Reputation: 227
Well It's been working just fine with my slackware64 laptop for some time.

I only suspend to disk as it just seems safer than suspend to ram.
 
Old 08-30-2009, 05:40 AM   #3
vinegaroon
Member
 
Registered: Sep 2008
Posts: 99

Rep: Reputation: 21
If you manually run "pm-suspend" (as root), does resuming work okay?
 
Old 08-30-2009, 08:14 AM   #4
grissiom
Member
 
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423

Rep: Reputation: 45
what hardware are you using? Both suspend and hibernate work fine here in Slackware64.
 
Old 08-30-2009, 09:04 AM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,450
Blog Entries: 4

Rep: Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505
Hi,

Quote:
Originally Posted by meetscott View Post
Well, since no one else has started one, I guess I'll be the first on suspend for Slackware 13.

I have 2 laptops that would suspend perfectly under Slackware 12.2. Slamd64 12.2 also worked. Now, on Slackware 13, 64 bit, suspend no longer works when I close the laptop lid. It goes into suspend okay, but when I open the lid, it appears to come out of it except there is no display or keyboard available. I have to do a hard reset to get everything back.
Hardware specifics?

Quote:
Originally Posted by meetscott View Post
For now, I have disabled suspend altogether in power management. I am interested to know if anyone else has suspend working. I think this might be a kde 4 issue, but I'm not sure.
How? Specifics?


Quote:
Originally Posted by meetscott View Post
Anyone with any thoughts or experience on this? I will not be upgrading my work laptop until I have found a reliable solution to this because I love coming into work, opening my display and having everything exactly as I left it. I consider it a must have feature now.
We really cannot provide help when the specifics for what you are doing or wanting to do. Not enough information.

Which kernel? Hardware information? Any commands, config files or utilities that produced the error should be posted.

I consider proper information within a post to be a must have in order to aid that same person.
 
Old 08-30-2009, 10:24 AM   #6
Xelain
LQ Newbie
 
Registered: Jul 2009
Distribution: Slackware 13.0
Posts: 1

Rep: Reputation: 1
I think I had the very same problem.

My laptop would perfectly go into RAM suspension as it did with 12.2, but when I want it back, it seemed to come back to life again, but screen wouldn't show anything, and keyboard wouldn't respond to any key presses.

It was a new installation, so what I did was to install and configure the nvidia drivers, run nvidia-xconfig, edit xorg.conf to delete references to keyboard and mouse (i like how hald has managed them), and test again. From this time on, suspension is working for me as it should have always been!.

I hope this could help you!.
 
Old 08-30-2009, 10:48 AM   #7
em21701
Member
 
Registered: Feb 2008
Location: Rhode Island, USA
Distribution: Slackware12.2 & Slackware64-13
Posts: 247

Rep: Reputation: 40
My machine suspends and resumes fine with Slackware64. I do have to hit the keyboard to get it to come back from suspend to RAM the mouse won't bring i back. The screen will flash then go black, at which time I have to hit a key again because I have lock on resume set. Perhaps you are seeing something like this?
 
Old 08-30-2009, 11:04 AM   #8
BrZ
Member
 
Registered: Apr 2009
Distribution: Slackware
Posts: 505

Rep: Reputation: 84
I had that same problem when using Catalyst (fglrx). Solved when x (mesa, etc.) was upgraded and I was able to use the open driver.
 
Old 08-31-2009, 11:50 AM   #9
meetscott
Samhain Slackbuild Maintainer
 
Registered: Sep 2004
Location: Phoenix, AZ, USA
Distribution: Slackware
Posts: 411

Original Poster
Rep: Reputation: 42
Great responses everyone! I wasn't sure whether I wanted to spend any time on this right now. Apparently people do have it working so I'm a little more inclined to try harder. If you add up the past few years of dealing with suspend, I've probably spent more time on complete failure with that issue, than any other. When it just worked in Slackware 12.2 I was completely shocked and grateful.

@onebuck
I didn't post specifics for a reason. I thinks that's clear. I wanted lots of responses from a broad range of people without a bunch of hardware specifics. It seemed reasonable to me that it wasn't working for a lot of people when it was a software change.

First Laptop: HP Pavilion dv5000 running the radeon graphics driver and a 64 bit Turion, single core processor. This is my Slackware64 test system.

Second Laptop: Dell Latitude D630 with a Core 2 Duo, 64 bit processor. This has Integrated Intel Graphics, I believe 965. I have not tried this on yet because it is my work computer.

I have used 2 methods, each with the same result: "pm-suspend" as root, and to answer the earlier question it does not come out of it. I have also tried with the power management in KDE. This is what I have normally used in Slackware 12.2, but "pm-suspend" also worked.

@Xelain and @BrZ
Great ideas. I do have keyboard references in xorg.conf. I will remove those. I will also try new drivers as well. Thanks for the suggestions. I'll report back the results.
 
Old 08-31-2009, 12:39 PM   #10
botnet
Member
 
Registered: May 2009
Posts: 158

Rep: Reputation: 40
I have been using suspend to ram by means of the following script graciously provided by a member of this forum whose name escapes me on Slackware 13 64.

Hopefully this will help.


Code:
#!/bin/sh
# Release version: 1.05/June 24 2009
# suspend2 -- offers some flexibility when locking/suspending your desktop.
# Does not use any LRMI or PCI-register weirdness-- this script is intended
# for machines with non-crappy BIOSes and proper ACPI implementations.
#
# Copyright (C) <2009> <Sasha Alexandr> <crawlingwithsnakes at hush dot com>
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#
# Testing done on: Slackware 11.0 - kernel 2.6.30
# Testing hardware: MSI P6N-SLI-FI (MS-7350)
# Intel E2160 Core2 CPU
# nVidia chipset MCP51/430i BIOS 2.7
# Ethernet: Realtek 8211BL using forcedeth driver.
# Video: 2x eVGA eGeForce 7300/7200 PCI-E cards.
# Video: nVidia binary version 185.18.14
# DE: KDE 3.5.4 & xscreensaver for locking session.
#--proposed changes:     ------------------------------------
#--test 'suspend to disk' support (I don't use it yet)
#--move script to /usr/bin for execution without $PATH
#------------------------------------------------------------
#--<changelog:>     -----------------------------------------
# v1.01  - adjust 'Usage:' text; tidy some code.
#        - support _list_ of NICs; add logging yes/no option
#        - divert net-restart output to $console
# v1.02  - clean up some junk that was outputting to console
#        - clarify comments & Usage:
#        - adjustable args for net & session-lock
#        - add a bit more sanity checking.
# v1.03  - fix more unwanted junk coming on screen after wake-up.
# v1.04  - kill undead backgrounded process when cancel suspend
#        - remove one function; put that code elsewhere.
# v1.05  - shorten help-page console output horizontal chars.
#        - tighten code a bit.
#--</changelog>
#-------------------------------------------------------------
#--<known bugs:>
# - none right now..
#--</known bugs>
#------------------------------------------------------------
setup () {
#-------------------------------adjustable stuff-------------
# unplug/reinsert any kernel modules you've determined
# cause problems suspending/resuming on your machine.
# If you use the hangcheck-timer, it MUST be a module and
# it MUST be removed before suspend, reinserted after resume.
# If hangcheck-timer is built static into the kernel, suspend
# will only work once; subsequent suspends will resume
# immediately all by themselves.
unplug_list=""
insert_list="" # if empty, unplug list is used
want_to_log_the_process='y' # change to y to log the suspend
# separate multiple NICs below with spaces like 'eth0 eth1'
NIC='eth0' # stop this/these before suspending to ram/disk
#------------------------------non-adjustable stuff-----------
suspend2_log=/var/log/suspend2.log
log_pidfile=/var/run/suspend2_logpid
fork_pidfile=/var/run/suspend2_forkpid
pm_debug_exist=/sys/power/pm_test
#--------------------------------adjustable stuff-------------
# Common paths to stuff - verify/adjust for your system:
kernel_log=/var/log/kernel.log
modprobe=/sbin/modprobe
hwclock=/sbin/hwclock
tail=/usr/bin/tail
ifconfig=/sbin/ifconfig
net_init_script=/etc/rc.d/rc.inet1
net_init_script_arg='restart'
session_locker=/usr/X11R6/bin/xscreensaver-command
session_locker_arg='-lock'
console=/dev/tty1
#--------------------------------------------pm debug---------
 debug_pm_does_exist () {
  # To test/debug your system's suspend abilities, read the kernel
  # documentation about enabling/using CONFIG_PM_DEBUG
  # note: only one line must be uncommented at any time.
  #
  echo -n none > /sys/power/pm_test # really suspend (default)
  #echo -n freezer > /sys/power/pm_test # least invasive test
  #echo -n devices > /sys/power/pm_test # test device susp/resume
  #echo -n platform > /sys/power/pm_test # only w/suspend to disk
  #echo -n processors > /sys/power/pm_test # test CPU susp/resume
  #echo -n core > /sys/power/pm_test # most invasive test
 }
[ -f $pm_debug_exist ] && debug_pm_does_exist
#---------------------------------------------end pm debug-----
} # end setup
# Do not edit below here unless you know what you're doing.
#--------------------------------------------------------------

usage () {
  [ "$1" = 'error' ] && echo -e "\nError: bad, missing, or extra parameter."
  for i in standby mem disk; do
     [ "`echo $methods | grep -o $i`" ] && eval $i='1' || unset i
  done;
 unset list
 echo -e "\nUsage: shows what suspend methods are currently available"
 echo -e "on your machine. To suspend immediately, just specify the type of"
 echo -e "suspend you want, and optionally the 'lock' option, which"
 echo -e "locks your desktop session before suspending."
 echo -e "If you want the machine to automatically suspend at a later time"
 echo -e "then use the additional options: 'inmins=xx' will cause suspend"
 echo -e "after xx minutes. 'insecs=xx' causes suspend after xx seconds."
 echo -e "'inhrs=xx' will suspend after xx hours. The 'time=HHMM' option allows a"
 echo -e "HHMM format of time-of-day. Due to the nature of the \`date\` command,"
 echo -e "some adjustment is done depending on the time entered."
 echo -e "If you get unsatisfactory results with the time=HHMM option"
 echo -e "give me an example & description of what happened and I will maybe"
 echo -e "look into it. Use 'cancel' to abort any pending suspends, and"
 echo -e "'status' to see if there are any pending suspends."
 echo -e "As of this writing (version 1.0x), suspend to disk has not been"
 echo -e "tested by me at all. It should work fine-- it's reputed to be"
 echo -e "less troublesome than suspending to ram. Standby and suspend to ram"
 echo -e "both work on my system. If you find a bug, i.e. something"
 echo -e "really dumb/obvious that I missed, point it out; I'll fix it."
 echo -e "If you're so inclined, you can run this from a crontab or an icon/kicker"
 echo -e "button with a command something like: kdesu /path/to/script <args> .\n"
 echo -e "Usage: $0 ` [ "$standby" ] && list="standby"; [ "$mem" ] && list="$list mem"; [ "$disk" ] && list="$list disk"; echo "$list" | sed 's/^[ ]//;s/ /|/g'` [[inmins=mm|insecs=ss|inhours=hh]|[time=HHMM] [lock]] [cancel] [status]\n"
 exit 1
}

logging () {
[ "$want_to_log_the_process" = 'n' ] && return;
case $1 in
  start) $tail -f $kernel_log > $suspend2_log &
	 echo $! > $log_pidfile ;;
  stop) if [ -f $log_pidfile ]; then
	deadlog=`cat $log_pidfile`
	kill $deadlog > /dev/null 2>&1 &
	wait
	fi
	;;
esac;
}

get_jobs () {
unset fpid running_jobs
if [ -f $fork_pidfile ]; then
 fpid=`cat $fork_pidfile`; running_jobs=` ps -p $fpid -o command= `
fi;
}

message () {
[ "$1" = 'S' ] && echo -e "\n`date` (suspend2: Going into $action-sleep now.)\n" > $console
[ "$1" = 'R' ] && echo -e "\n`date` (suspend2: Waking up now.)\n" > $console
}

do_standby () {
 sleep $seconds
# 'standby' doesn't need any module-unplugging.
# I switch to vt1 just for the status messages.
 chvt 1; message S
 [ "$lock" = 'lock' ] && $session_locker $session_locker_arg > /dev/null 2>&1
 logging start
 echo -n standby > /sys/power/state
# resuming now:
 $hwclock --hctosys
 message R
 logging stop
 chvt 1
} # end of 'do_standby'

do_suspend () {
 sleep $seconds
 chvt 1; message S; sleep 2 # (legacy?) change to non-X console to prevent corrupt video
 [ "$lock" = 'lock' ] && $session_locker $session_locker_arg > /dev/null 2>&1
 logging start
# take down NIC(s) (optional - we restart whole network anyway later)
 interface_list="`echo $interfaces | sed 's/[ ]/\n/g'`"
 for NICs in `echo -e "$NIC"`; do
  $ifconfig $NICs down
 done;
# unplug modules known to give problems:
 for mod in $unplug_list; do
  [ "`lsmod | grep $mod`" ] && $modprobe -r $mod
 done;
 echo -n $action > /sys/power/state
# Resuming now;
 $hwclock --hctosys # adjust OS clock
 message R
# reinsert removed modules
 [ -z "$insert_list" ] && insert_list="$unplug_list"
 for mod in $insert_list; do
  $modprobe $mod
 done;
 sleep 1 # let things settle
# Kill any running dhcpcd & restart networking as during a cold boot:
 [ "`ps ax | grep dhcpcd`" ] && killall -q dhcpcd
 $net_init_script $net_init_script_arg > $console
 logging stop
 chvt 1
} # end of 'do_suspend'

# Script entry point:

setup

if [ "$1" = 'fork' ]; then
# we're the forked, already-configured instance:
 seconds=$3; lock=$4;
 case $2 in
   standby)
	do_standby &
	echo $! > $fork_pidfile
	exit 0
	;;
   *)
	action=$2
	do_suspend &
	echo $! > $fork_pidfile
	exit 0
	;;
 esac;

else # We haven't been set up yet, so deal with cmdline args:

 unset action units; let seconds=0; lock='unlocked'
 methods=`cat /sys/power/state`

 for param in $*; do
  case $param in
   lock) lock='lock' ;;
   standby|mem|disk) [ "`echo $methods | grep -o $param`" -a ! "$action" ] && action=$param || usage error ;;
   status) get_jobs
	   echo -e "\nRunning suspend2 process: ` [ "$running_jobs" ] && echo -e "($fpid) $running_jobs" || echo "None." `\n"
	   exit 0 ;;
   cancel)
	logging stop; get_jobs
	if [ "$fpid" ]; then
	 bloody_die=`ps ax | grep $(pgrep -P $fpid) | gawk '{/^.[:digit:]+[ ]$/;print $1}'`
	 kill $fpid > /dev/null 2>&1 &
	 wait; kill $bloody_die > /dev/null 2>&1 &
	 wait; rm -f $fork_pidfile; rm -f $log_pidfile
	fi;
	echo -e "\nAny pending suspend2 has been canceled.\n"
	exit 0
	;;
   inmins*) [ ! "$units" ] && units='mins' || usage error
	let seconds=`echo $param | gawk -v FS== '{/^inmins=[:digit:]+$/;print $2}'`*60 ;;
   insecs*) [ ! "$units" ] && units='secs' || usage error
	let seconds=`echo $param | gawk -v FS== '{/^insecs=[:digit:]+$/;print $2}'` ;;
   inhours*) [ ! "$units" ] && units='hrs' || usage error
	let seconds=`echo $param | gawk -v FS== '{/^inhours=[:digit:]+$/;print $2}'`*3600 ;;
   time*)
	[ ! "$units" ] && units='time' || usage error
	timegiven="`echo $param | gawk -v FS== '{/^time=[:digit:][:digit:][:digit:][:digit:]$/;print $2}'`"
	[ ! "$timegiven" ] && usage error
	let unixtimethen=`date -d "$timegiven" +%s`
	[ $unixtimethen -lt `date +%s` ] && let unixtimethen=unixtimethen+86400
	let seconds=unixtimethen-`date +%s`
	;;
   usage) usage ;;
       *) usage error ;;
  esac;
 done;

 get_jobs

 if [ "$running_jobs" ]; then
  echo -e "\nThere's already a suspend2 instance running. Cancel that one first.\n" && exit 1
 fi;
 if [ "$action" ]; then
  $0 fork $action $seconds $lock
  $0 status
  exit 0
 else
  usage error
 fi;
fi;

# EOF
 
Old 08-31-2009, 12:43 PM   #11
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
http://www.linuxquestions.org/questi...cript.-734443/

You can find the lastest version at the above LQ link.

Sasha
 
Old 08-31-2009, 01:29 PM   #12
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,450
Blog Entries: 4

Rep: Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505
Hi,

Quote:
Originally Posted by meetscott View Post
Great responses everyone! I wasn't sure whether I wanted to spend any time on this right now. Apparently people do have it working so I'm a little more inclined to try harder. If you add up the past few years of dealing with suspend, I've probably spent more time on complete failure with that issue, than any other. When it just worked in Slackware 12.2 I was completely shocked and grateful.

@onebuck
I didn't post specifics for a reason. I thinks that's clear. I wanted lots of responses from a broad range of people without a bunch of hardware specifics. It seemed reasonable to me that it wasn't working for a lot of people when it was a software change.

First Laptop: HP Pavilion dv5000 running the radeon graphics driver and a 64 bit Turion, single core processor. This is my Slackware64 test system.

Second Laptop: Dell Latitude D630 with a Core 2 Duo, 64 bit processor. This has Integrated Intel Graphics, I believe 965. I have not tried this on yet because it is my work computer.

I have used 2 methods, each with the same result: "pm-suspend" as root, and to answer the earlier question it does not come out of it. I have also tried with the power management in KDE. This is what I have normally used in Slackware 12.2, but "pm-suspend" also worked.

@Xelain and @BrZ
Great ideas. I do have keyboard references in xorg.conf. I will remove those. I will also try new drivers as well. Thanks for the suggestions. I'll report back the results.
No it was not clear!

The number with suspend problems is few. Your particular problems may not be the same as others may fair with their machine. To arbitrarily request information and apply that to your unique problems may well open or create other problems on your hardware. One must match software specifications with ones hardware.

Now if you had requested 'Slackware 13 Suspend problems with HP Pavilion dv5000' and expected to resolve with information from users of the same equipment/problem then you do have related issues or solutions. Arbitrarily requesting information to a general audience and expecting reply's to adapt to your problems may just create other problems for your hardware.

I suggest that you get your system configuration setup properly before even considering the KDE tools.
 
Old 08-31-2009, 03:11 PM   #13
mudangel
Member
 
Registered: May 2008
Location: Ohio
Distribution: Slackware
Posts: 267

Rep: Reputation: 48
Suspend doesn't work right on my laptop, but I'm pretty sure it's to do with the bios, not Slackware. It's a Toshiba Satellite L355.
 
Old 08-31-2009, 03:46 PM   #14
manwichmakesameal
Member
 
Registered: Aug 2006
Distribution: Slackware
Posts: 800

Rep: Reputation: 100Reputation: 100
@ mudangel, I have a Toshiba Satellite L305D-S5934 and suspend works great.
 
Old 08-31-2009, 03:56 PM   #15
mudangel
Member
 
Registered: May 2008
Location: Ohio
Distribution: Slackware
Posts: 267

Rep: Reputation: 48
Maybe there's hope then ;^) Did you have to do anything special to get it to work? Mine has an "InsydeH20" bios, version 1.9; I was thinking that may be the problem, as I'd never heard of that 'til I got this laptop. I'll appreciate any help/information I can get with this!
 
  


Reply

Tags
slackware13


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NVidia proprietary driver + suspend to ram (Slackware 12.1) El Nigromante Slackware 6 10-15-2008 12:16 PM
Slackware 12 suspend Tux-Slack Slackware 10 08-10-2007 05:46 PM
slackware + suspend-to-ram? janhe Slackware 7 07-05-2007 11:05 AM
Unreliable suspend to disk with Slackware 10.2 c10 Slackware 2 04-17-2006 05:55 AM
Suspend / Resume scripts on slackware 9 boney Slackware 0 06-19-2003 03:09 AM


All times are GMT -5. The time now is 08:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration