Gentoo Forums
Gentoo Forums
Quick Search: in
Suspend on laptop
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Luc484
Veteran
Veteran


Joined: 26 Mar 2005
Posts: 1035
Location: Italy

PostPosted: Thu Jul 14, 2005 12:37 am    Post subject: Suspend on laptop Reply with quote

Hi all. I'm following this guide http://it.gentoo-wiki.com/HOWTO_Software_Suspend_v2 to enable the suspend function for my laptop. The problem is that after emerging suspend2-sources I don't see the newly installed modules in the kernel. This means that I don't have the "Software suspend" and the "Software suspend 2" items in the kernel. Everything remains like before. Does someone have the same problem or has any idea of what I'm doing wrong?
Thanks for any advice.
Back to top
View user's profile Send private message
pem
Guru
Guru


Joined: 29 Aug 2004
Posts: 390
Location: France

PostPosted: Thu Jul 14, 2005 8:26 am    Post subject: Reply with quote

Are you using the sys-kernel/gentoo-sources-2.6.12-r4?
I'm currently trying to apply an "emerge -av sys-kernel/suspend2-sources".
_________________
Registered user #30505
Back to top
View user's profile Send private message
kitano
Apprentice
Apprentice


Joined: 19 Dec 2002
Posts: 228
Location: Munich, Germany, Europe, Earth

PostPosted: Thu Jul 14, 2005 8:27 am    Post subject: Reply with quote

you sure you made your "make config" command in the right dir? just asking, because suspend2-sources is not a patchset but a complete kernel-source, which installs in /usr/src/linux-2.6.12-suspend2-r2

cheers,
kitano
_________________
->searched for a gentoo penguin ->alienated it with "find edges", "saturation", "photocopy" ->encoded quicktime from still ->played with aaxine ->screenshotted ->made it my avatar

only in case you were going to ask what it is...
Back to top
View user's profile Send private message
Luc484
Veteran
Veteran


Joined: 26 Mar 2005
Posts: 1035
Location: Italy

PostPosted: Thu Jul 14, 2005 9:06 am    Post subject: Reply with quote

pem wrote:
Are you using the sys-kernel/gentoo-sources-2.6.12-r4?
I'm currently trying to apply an "emerge -av sys-kernel/suspend2-sources".


Yes, it's my version.
Back to top
View user's profile Send private message
Luc484
Veteran
Veteran


Joined: 26 Mar 2005
Posts: 1035
Location: Italy

PostPosted: Thu Jul 14, 2005 9:08 am    Post subject: Reply with quote

kitano wrote:
you sure you made your "make config" command in the right dir? just asking, because suspend2-sources is not a patchset but a complete kernel-source, which installs in /usr/src/linux-2.6.12-suspend2-r2

cheers,
kitano


This I didn't know. But then what kind of kernel is it? I mean, which version for example?
Thanks for this information.
Back to top
View user's profile Send private message
pem
Guru
Guru


Joined: 29 Aug 2004
Posts: 390
Location: France

PostPosted: Thu Jul 14, 2005 9:11 am    Post subject: Reply with quote

As Kitano kindly said it, applying the patch via emerge create a new kernel in "/usr/src/linux-2.6.12-suspend2-r2". I'm currently building mine to check the progress on suspend2. I'll keep you posted.

NOTE
To fasten the rebuild, you can:
Code:
cd /usr/src
ln -sf linux-2.6.12-suspend2-r2 linux
cp linux-2.6.12-gentoo-r4/.config linux/.config
cd linux
make oldconfig

_________________
Registered user #30505
Back to top
View user's profile Send private message
Luc484
Veteran
Veteran


Joined: 26 Mar 2005
Posts: 1035
Location: Italy

PostPosted: Thu Jul 14, 2005 9:28 am    Post subject: Reply with quote

Sorry but I'm not familiar wiith these things. I can't understand this: when you emerge suspend2 does emerge take the current kernel I have and adds its modules or it uses a predefined kernel version with its addictions?
Thanks for your help on this.
Back to top
View user's profile Send private message
pem
Guru
Guru


Joined: 29 Aug 2004
Posts: 390
Location: France

PostPosted: Thu Jul 14, 2005 9:38 am    Post subject: Reply with quote

From what I've seen, I guess it takes the gentoo-sources-2.6.12-r4 and it applies its patches to create a completely new kernel 2.6.12-suspend2-r2. Thus, by using your .config from the gentoo-sources-2.6.12-r4, you only specify the new options :wink:

Unfortunately on my side, I need some other external modules: ndiswrapper and nvidia. It worked out nicely for nvidia but it did not even compile for the ndiswrapper. That's sad because, this time, this SwSuspend goes a bit farther than the previous one.
_________________
Registered user #30505
Back to top
View user's profile Send private message
Luc484
Veteran
Veteran


Joined: 26 Mar 2005
Posts: 1035
Location: Italy

PostPosted: Thu Jul 14, 2005 10:53 am    Post subject: Reply with quote

I installed klaptopdaemon to manage the power. I tried the button "suspend" but it seems it doesn't work. When I click it, the system terminates the tasks correctly, but then I cannot resume the system. If I close the lid and then I reopen it, the system shuts down and tells me there was a resume fail, then the system boots.
I was wondering what is the difference between this way of managing the power and the use of suspend2 we were talking before.
Hi and thanks.
Back to top
View user's profile Send private message
kitano
Apprentice
Apprentice


Joined: 19 Dec 2002
Posts: 228
Location: Munich, Germany, Europe, Earth

PostPosted: Thu Jul 14, 2005 12:04 pm    Post subject: Reply with quote

yo luc,
tell us, what model of laptop do you have. what is it, what graphics card does it have. this stuff is extra important for suspend. i own an ibm t42p, and it was hell to configure. but finally, it works like a charm and just keeps on humming!

btw: suspend2-sources is based on gentoo-sources with the same release (-r2).

peeking into
Code:
emerge -s suspend2-sources
helps sometimes ;-)

kitano
_________________
->searched for a gentoo penguin ->alienated it with "find edges", "saturation", "photocopy" ->encoded quicktime from still ->played with aaxine ->screenshotted ->made it my avatar

only in case you were going to ask what it is...
Back to top
View user's profile Send private message
Luc484
Veteran
Veteran


Joined: 26 Mar 2005
Posts: 1035
Location: Italy

PostPosted: Thu Jul 14, 2005 12:17 pm    Post subject: Reply with quote

My laptop is a Toshiba Satellite A60-160. The graphic card is a ATI Radeon Mobile 7000. I just configured the new kernel for suspend2. I'm gonna continue to follow the guide to see if this works. One question I have is whether klaptopdaemon can use this suspend software to suspend the system (supposing it works of course :-)).
Hi and thanks for your help.
Back to top
View user's profile Send private message
kitano
Apprentice
Apprentice


Joined: 19 Dec 2002
Posts: 228
Location: Munich, Germany, Europe, Earth

PostPosted: Thu Jul 14, 2005 12:24 pm    Post subject: Reply with quote

sorry, i don't know nothing about kde so far. i am a fluxbox user, an pretty happy with it =)

for X11, what drivers are you using to get your ati card running. if you use fglrx - which are the proprietary drivers from ati - there are a few things you have to keep in your mind when suspending. first of all, the ati-drivers are not able to resume from a suspend state.
the good news: there's a work-around. it's got to do with vbetool and stuff, you can read here, how it is done:
http://forums.gentoo.org/viewtopic-t-347522-highlight-.html

cheers, kitano
_________________
->searched for a gentoo penguin ->alienated it with "find edges", "saturation", "photocopy" ->encoded quicktime from still ->played with aaxine ->screenshotted ->made it my avatar

only in case you were going to ask what it is...
Back to top
View user's profile Send private message
Luc484
Veteran
Veteran


Joined: 26 Mar 2005
Posts: 1035
Location: Italy

PostPosted: Thu Jul 14, 2005 12:34 pm    Post subject: Reply with quote

No I don't think I used the proprietary drivers.
I have to say though that when I suspend the system, everything seems to work ok. The leds changes and its ok. When I want to resume, I click the power button, and led's colors change back again. The problem is that the monitor remains black.
Back to top
View user's profile Send private message
kitano
Apprentice
Apprentice


Joined: 19 Dec 2002
Posts: 228
Location: Munich, Germany, Europe, Earth

PostPosted: Thu Jul 14, 2005 12:43 pm    Post subject: Reply with quote

well, let's get this organized. did you try the new sources, or are you still with your old kernel?

when you got the suspend2-sources running,
please post:

Code:
uname -a


and

your xorg.conf (the relevant parts may be enough, like device section of your graphics adapter)
your /etc/hibernate/hibernate.conf

and other stuff that you guess could be of interest.

we surely can help you then =)

kitano
_________________
->searched for a gentoo penguin ->alienated it with "find edges", "saturation", "photocopy" ->encoded quicktime from still ->played with aaxine ->screenshotted ->made it my avatar

only in case you were going to ask what it is...
Back to top
View user's profile Send private message
Luc484
Veteran
Veteran


Joined: 26 Mar 2005
Posts: 1035
Location: Italy

PostPosted: Thu Jul 14, 2005 1:19 pm    Post subject: Reply with quote

kitano wrote:
well, let's get this organized. did you try the new sources, or are you still with your old kernel?

when you got the suspend2-sources running,
please post:

Code:
uname -a



This is the output:
Code:

2.6.12-suspend2-r2


Quote:

your xorg.conf (the relevant parts may be enough, like device section of your graphics adapter)


Code:

# **********************************************************************
# Graphics device section
# **********************************************************************

# Any number of graphics device sections may be present

# Standard VGA Device:

Section "Device"
    Identifier   "Standard VGA"
    VendorName   "Unknown"
    BoardName   "Unknown"

# The chipset line is optional in most cases.  It can be used to override
# the driver's chipset detection, and should not normally be specified.

#    Chipset   "generic"

# The Driver line must be present.  When using run-time loadable driver
# modules, this line instructs the server to load the specified driver
# module.  Even when not using loadable driver modules, this line
# indicates which driver should interpret the information in this section.

    Driver     "vga"
# The BusID line is used to specify which of possibly multiple devices
# this section is intended for.  When this line isn't present, a device
# section can only match up with the primary video device.  For PCI
# devices a line like the following could be used.  This line should not
# normally be included unless there is more than one video device
# intalled.

#    BusID      "PCI:0:10:0"

#    VideoRam   256

#    Clocks   25.2 28.3

EndSection

# Device configured by xorgconfig:

Section "Device"
    Identifier  "MyCard"
    Driver      "radeon"
    Option      "TVOutput"   "PAL"
    #VideoRam    65536
    # Insert Clocks lines here if appropriate
EndSection

# **********************************************************************


Quote:

your /etc/hibernate/hibernate.conf


Code:

# Example hibernate.conf file. Adapt to your own tastes.
# Options are not case sensitive.
#
# Run "hibernate -h" for help on the configuration items.

##############################################################################
### Choose your Suspend method. You currently have 3 choices:
###
###    suspend2            Software Suspend 2 (requires kernel patches from
###                        http://www.suspend2.net/)
###
###    sysfs_power_state   Uses /sys/power/state to suspend (activates pmdisk
###                        on kernels < 2.6.8, or vanilla swsusp otherwise).
###
###    acpi_sleep          Uses /proc/acpi/sleep to activate swsusp, or other
###                        ACPI sleep state supported by your machine.
###
##############################################################################

### suspend2 (for Software Suspend 2)
UseSuspend2 yes
# Reboot no
# EnableEscape yes
# DefaultConsoleLevel 1
# Compressor lzf
# Encryptor none
# ImageSizeLimit 200
## useful for initrd usage:
# SuspendDevice swap:/dev/hda2
# LoadSuspendModules suspend_swap suspend_lzf suspend_text
# UnloadSuspendModulesAfterResume yes
## Powerdown method - 3 for suspend-to-RAM, 4 for ACPI S4 sleep, 5 for poweroff
# PowerdownMethod 5
## If you experience hangs on resume due to write caching, try this:
# AsyncIOLimit 128
## Any other /proc/software_suspend setting can be set like so:
# ProcSetting expected_compression 50
## Or traditionally like this:
# Suspend2AllSettings 0 0 2056 65535 5
## Or even from the results of hibernate --save-settings with this:
# Suspend2AllSettingsFile /etc/hibernate/suspend-settings.conf
## For filewriter:
# FilewriterLocation /suspend_file 1000
# VerifyFilewriterResume2 yes

### sysfs_power_state
## To use /sys/power/state to suspend your machine (which may offer
## suspend-to-RAM, suspend-to-disk, standby, etc) comment out all the options
## above for Software Suspend 2, below for acpi_sleep, and uncomment this line.
## You may replace mem with any one of the states from "cat /sys/power/state"
#seSysfsPowerState disk
#PowerdownMethod shutdown

### acpi_sleep
## To use ACPI to suspend your machine (via /proc/acpi/sleep), comment out
## all the options above for Software Suspend 2 and sysfs, and uncomment this
## line. The number refers to the ACPI sleep state - 3 is suspend-to-RAM and
## 4 is suspend-to-disk.
# UseACPISleep 4

##############################################################################
### Some global settings
##############################################################################

Verbosity 0
LogFile /var/log/hibernate.log
LogVerbosity 1
# AlwaysForce yes
# AlwaysKill yes
# HibernateVT 15
# Distribution debian (or fedora/gentoo/mandrake/redhat/slackware/suse)
# XDisplay :0

##############################################################################
### Scriptlets
###   Scriptlets provide support for doing all sorts of things before and after
###   suspending. The defaults settings here should work for most people, but
###   you may wish to edit these to taste. Consult "hibernate -h" for help on
###   the configuration settings.
##############################################################################

### bootsplash
## If you use bootsplash, also enabling SwitchToTextMode is recommended if
## you use X, otherwise you may end up with a garbled X display.
# Bootsplash on
# BootsplashConfig /etc/bootsplash/default/config/bootsplash-1024x768.cfg

### clock
SaveClock restore-only

### devices
# IncompatibleDevices /dev/dsp /dev/video*

### diskcache
# DisableWriteCacheOn /dev/hda

### fbsplash (enable SwitchToTextMode if you use this)
# FBSplash on
# FBSplashTheme suspend2

### filesystems
# Unmount /nfsshare /windows /mnt/sambaserver
# UnmountFSTypes smbfs nfs
# UnmountGraceTime 1
# Mount /windows

### grub
# ChangeGrubMenu yes
# GrubMenuFile /boot/grub/menu.lst
# AlternateGrubMenuFile /boot/grub/menu-suspended.lst
# BackupGrubMenuFile /boot/grub/menu.lst.hibernate.bak

### hardware_tweaks
# IbmAcpi yes
# RadeonTool yes

### lilo
# EnsureLILOResumes yes

### lock (generally you only want one of the following options)
# LockConsoleAs root
# LockXScreenSaver yes
# LockKDE yes

### misclaunch
# OnSuspend 20 echo "Good night!"
# OnResume 20 echo "Good morning!"

### modules
# UnloadModules snd_via82cxxx usb-ohci
# UnloadAllModules yes
UnloadBlacklistedModules yes
LoadModules auto
# LoadModulesFromFile /etc/modules

### modules-gentoo
# GentooModulesAutoload yes

### network
# DownInterfaces eth0
# UpInterfaces auto

### programs
# IncompatiblePrograms xmms

### services
# RestartServices postfix
# StopServices alsasound
# StartServices aumix

### vbetool
# EnableVbetool yes
# RestoreVbeStateFrom /var/lib/vbetool/vbestate
# VbetoolPost yes

### xhacks
SwitchToTextMode yes
# UseDummyXServer yes

### xstatus
## This can be set to gnome, kde or x:
# XStatus gnome
# XSuspendText Preparing to suspend...
# XResumeText Resuming from suspend...
## When using XStatus x, and you have xosd installed:
# XosdSettings --font -misc-fixed-medium-r-semicondensed--*-120-*-*-c-*-*-* --colour=Green --shadow 1 --pos bottom --align center --offset 50


I only edited two lines.

Quote:

and other stuff that you guess could be of interest.


I found out that I don't have the file /usr/local/sbin/hibernate. The directory sbin is empty.
Thanks for your patience.
Back to top
View user's profile Send private message
Tsuna
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2005
Posts: 147

PostPosted: Thu Jul 14, 2005 2:07 pm    Post subject: Reply with quote

when you emerge the suspend2 kernel, emerge use a stock vanilla source and patches it with the suspend2 patchset. This patchset is NOT compatible with the gentoo patchset AFAIK
_________________
I am not sending subliminal messages
Back to top
View user's profile Send private message
Luc484
Veteran
Veteran


Joined: 26 Mar 2005
Posts: 1035
Location: Italy

PostPosted: Thu Jul 14, 2005 8:27 pm    Post subject: Reply with quote

OK. Then maybe this is not the right way to get this :-). Does someone know why there is no resume with klaptopdaemon suspend? Does klaptopdaemon use the "sleep states" module of the kernel to suspend the system? I've been googling for some time but found nothing on this problem with klaptopdaemon. Maybe I could have more luck with some other keywords.
Thanks to everyone.
Back to top
View user's profile Send private message
Tsuna
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2005
Posts: 147

PostPosted: Fri Jul 15, 2005 12:25 am    Post subject: Reply with quote

i think it would be wiser to try to get suspend working with the hibernation scripts and once you know it's working try ot get it to work with the klaptopwhatever thingy
don't focus on the kwhateverdaemon, focus on suspend and try to discover where the real problem lies. So you can fix it and then use kthingy to suspend
_________________
I am not sending subliminal messages
Back to top
View user's profile Send private message
Luc484
Veteran
Veteran


Joined: 26 Mar 2005
Posts: 1035
Location: Italy

PostPosted: Fri Jul 15, 2005 10:59 am    Post subject: Reply with quote

Thanks, I'm gonna work on it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum