LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 04-30-2005, 09:11 AM   #1
brokenflea
Member
 
Registered: Nov 2003
Distribution: Slackware 11.0, FreeBSD
Posts: 284

Rep: Reputation: 30
ACPI Question


i have hoary running on an old thinkpad i1300 and i'm trying to get acpi to work on it. everytime i select "Suspend the computer" from the Log Out option under system my screen stays the same it doesn't blank out, but when i try to click on an application it just freezes and doesn't open up anything at all. and then i have to manually shut the computer down by turning the power off. here's what my /etc/default/acpi-support looks like:

Code:
# Uncomment the next line to enable ACPI suspend to RAM
ACPI_SLEEP=true

# Comment the next line to disable suspend to disk
#ACPI_HIBERNATE=true

# Change the following to "standby" to use ACPI S1 sleep, rather than S3.
# This will save less power, but may work on more machines
# was mem
ACPI_SLEEP_MODE=mem

# Add modules to this list to have them removed before suspend and reloaded
# on resume. It should look something like MODULES="e1000 ipw2100"
MODULES="wg511v2"

# Should we save and restore state using the VESA BIOS Extensions?
SAVE_VBE_STATE=true

# The file that we use to save the vbestate
VBESTATE=/var/lib/acpi-support/vbestate

# Should we attempt to warm-boot the video hardware on resume?
POST_VIDEO=true

# Should we switch the screen off with DPMS on suspend?
USE_DPMS=true

# Uncomment the next line to switch away from X and back again after resume.
# This is needed for some hardware, but should be unnecessary on most.
# DOUBLE_CONSOLE_SWITCH=true

# Set the following to "platform" if you want to use ACPI to shut down
# your machine on hibernation
HIBERNATE_MODE=shutdown

# Comment this out to disable screen locking on resume
#LOCK_SCREEN=true

# Uncomment this line to have DMA disabled before suspend and reenabled
# afterwards
# DISABLE_DMA=true

# Add services to this list to stop them before suspend and restart them in 
# the resume process.
STOP_SERVICES="mysql "
and here's what my menu.list file looks like in /etc/grub:

Code:

# menu.lst - See: grub(:cool:, info grub, update-grub(:cool:
#            grub-install(:cool:, grub-floppy(:cool:,
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.           
default		0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout		3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title		Windows 95/98/NT/2000
# root		(hd0,0)
# makeactive
# chainloader	+1
#
# title		Linux
# root		(hd0,1)
# kernel	/vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default optons below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specifiv kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
# kopt=root=/dev/hda1 resume=/dev/hda5 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery mode) single
# altoptions=(recovery mode) single

## nonaltoption boot targets option
## This option controls options to pass to only the
## primary kernel menu item.
## You can have ONLY one nonaltoptions line
# nonaltoptions=quiet splash
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## ## End Default Options ##

title		Ubuntu, kernel 2.6.10-5-386 
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.10-5-386 root=/dev/hda1 resume=/dev/hda5 ro quiet splash
initrd		/boot/initrd.img-2.6.10-5-386
savedefault
boot

title		Ubuntu, kernel 2.6.10-5-386 (recovery mode)
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.10-5-386 root=/dev/hda1 resume=/dev/hda5 ro single
initrd		/boot/initrd.img-2.6.10-5-386
savedefault
boot

title		Ubuntu, kernel memtest86+ 
root		(hd0,0)
kernel		/boot/memtest86+.bin  
savedefault
boot

### END DEBIAN AUTOMAGIC KERNELS LIST
will switching to APM help, since its an old notebook (intel 650Mhz, 256 megs ram, cd-r,etc.) or is there a way to get ACPI to get working on this notebook. any advice is appreciated.

TIA
 
Old 05-03-2005, 12:47 PM   #2
littlemidget
Member
 
Registered: Aug 2004
Location: Oslo, Norway.
Distribution: Debian Sarge
Posts: 171

Rep: Reputation: 30
Re: ACPI Question

Quote:
Originally posted by brokenflea
i have hoary running on an old thinkpad i1300 and i'm trying to get acpi to work on it. everytime i select "Suspend the computer" from the Log Out option under system my screen stays the same it doesn't blank out, but when i try to click on an application it just freezes and doesn't open up anything at all. and then i have to manually shut the computer down by turning the power off.
I assume you're trying to put your laptop to sleep. I have a nice little script that does just that. In order to wake up the laptop after the sleep, I need to push the powerbutton until I hear a little sound. Not to long, or else the laptop will reboot. Here's the script:

Code:
#!/bin/bash
# sove.sh (don't call it sleep.sh since there's allready a module with that name).

#Stop the bluetooth service. I need to stop these because they fail afterwards if I don't.
modprobe -r ehci_hcd
modprobe -r uhci_hcd

#sync the disks.
 sync && sync && sync

#Change the screen to VT1 (text mode)
  /usr/bin/chvt 1

#turn off the backlight on the laptop
# (Note: You must have the radeontool installed....)
  radeontool light off

#perform the actual "go-to-sleep" function.
echo "mem" > /sys/power/state

#Pause a second or two to let us sleep.
 sleep 2
#Sleepytime...Everything after this line gets exectued
#after the user resumes...


#switch back to the Xterminal (automatically turns on backlight)
  /usr/bin/chvt 7

#restart services...
modprobe ehci_hcd
modprobe uhci_hcd
 
Old 05-03-2005, 03:46 PM   #3
brokenflea
Member
 
Registered: Nov 2003
Distribution: Slackware 11.0, FreeBSD
Posts: 284

Original Poster
Rep: Reputation: 30
thanks for sharing the script with me. the only problem i'm having with it is, it goes to text mode and then 2 seconds later comes back to X. i've installed kubuntu on my existing gnome setup and the sleep and hibernate works perfect, but for some odd reason it doesn't let me load ndiswrapper everytime i come back from suspend. i always get the Segmentation Fault or Resource Busy in the CLI when i
do
Code:
rmmod ndiswrapper
i tried removing the ndiswrapper before i went into suspend or hibernate but when i come back and type in modprobe ndiswrapper

i get the same message with segmentation fault or resource busy.
I know ubuntu uses the hotplug system and restarting that doesn't help. how do i go about overcoming this problem.
i appreciate all the help

TIA
 
  


Reply



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
Newbie question about acpi jolphil SUSE / openSUSE 14 02-18-2005 12:23 PM
ACPI question mortal Slackware 2 10-02-2004 12:37 AM
a question about ACPI on Pentium mb NeoKaiserSigma Linux - Hardware 0 04-25-2004 06:43 PM
some acpi information and a question Brain Drop Linux - Laptop and Netbook 6 11-29-2003 08:18 PM
Question on how ACPI works jpbarto Linux - Hardware 2 05-23-2003 04:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 10:54 PM.

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
Open Source Consulting | Domain Registration