Slackware 13.0 e tuxonice [RISOLTO]
Inviato: sab 19 set 2009, 8:55
Sto cercando di far funzionare la sospensione (suspend to ram) sul mio portatile, grazie alla patch rilasciata da Tuxonice (l'ex suspend2).
Come si potrebbe immaginare, sulla 12.2 andava tutto bene, con la nuova release di Slackware un po' meno.
Allora, vi spiego cosa ha fatto: ho applicato la patch per il mio kernel (il classico 2.6.29.6-smp della 13.0), avviato la ricompilazione, impostato il boot loader così:
dopodiché ho fatto in modo che, all'atto della chiusura del coperchio del laptop, quest'ultimo andasse in sospensione.
Sfruttando i consigli presenti in quest'articolo, ho impostato in questa maniera i seguenti due file di acpi:
e:
Ora, all'atto della chiusura del portatile, l'unica cosa che si verifica è la chiusura della sessione di KDE.
In pratica, per mandare la macchina in sospensione devo lanciare manualmente il comando hibernate.
Dimenticavo, questo è il mio file di configurazione del servizio di sospensione:
Faccio presente che, seguendo questa metodologia, con la 12.2 non ho mai avuto alcun problema.
Cosa mi dite?
Burroughs.
Come si potrebbe immaginare, sulla 12.2 andava tutto bene, con la nuova release di Slackware un po' meno.
Allora, vi spiego cosa ha fatto: ho applicato la patch per il mio kernel (il classico 2.6.29.6-smp della 13.0), avviato la ricompilazione, impostato il boot loader così:
Codice: Seleziona tutto
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sda3
label = Slacky
read-only
append="resume=swap:/dev/sda2"Sfruttando i consigli presenti in quest'articolo, ho impostato in questa maniera i seguenti due file di acpi:
Codice: Seleziona tutto
root@mody:~# cat /etc/acpi/acpi_handler.sh
#!/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
;;
lid) /etc/acpi/lid.sh
;;
*) logger "ACPI action $2 is not defined"
;;
esac
;;
*)
logger "ACPI group $1 / action $2 is not defined"
;;
esacCodice: Seleziona tutto
root@mody:~# cat /etc/acpi/lid.sh
#!/bin/sh
if [ "`cat /proc/acpi/button/lid/LID/state | grep open`" = "" ];
then
/usr/sbin/hibernate
fiIn pratica, per mandare la macchina in sospensione devo lanciare manualmente il comando hibernate.
Dimenticavo, questo è il mio file di configurazione del servizio di sospensione:
Codice: Seleziona tutto
root@mody:~# cat /etc/hibernate/common.conf
# Configuration options common for suspending to disk or RAM.
# Options are not case sensitive.
#
# See hibernate.conf(5) for help on the configuration items.
##############################################################################
### Some global settings
##############################################################################
Verbosity 0
LogFile /var/log/hibernate.log
LogVerbosity 1
# LogTimestamp yes
# 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
#DirectIsa
### devices
# IncompatibleDevices /dev/dsp /dev/video*
### diskcache
# DisableWriteCacheOn /dev/hda
### fbsplash (enable SwitchToTextMode if you use this)
# FBSplash on
# FBSplashTheme tuxonice
### 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
# see http://bugs.debian.org/317479
# RemountXFSBoot yes
### hardware_tweaks
# IbmAcpi yes
# RadeonTool yes
# Runi915resolution yes
# FullSpeedCPU yes
### lilo
# EnsureLILOResumes yes
### lock (generally you only want one of the following options)
## For console you need vlock available.
## For x you need xscreensaver-command-command available.
## For gnome you need gnome-screensaver-command available.
## For kde you need dcop, kscreensaver available.
## For XAuto you need xautolock available.
## For Xtr you need xtrlock available.
## For Freedesktop (for example KDE4) you need dbus-send available
# LockConsoleAs root
# LockXScreenSaver yes
# LockGnomeScreenSaver yes
# LockFreedesktop
LockKDE yes
# LockXLock yes
# LockXAutoLock yes
# LockXtrLock yes
### misclaunch
OnSuspend 20 echo "Buona notte!"
OnResume 20 echo "Buongiorno!"
### modules
# UnloadModules snd_via82cxxx usb-ohci
# UnloadAllModules yes
UnloadBlacklistedModules yes
LoadModules auto
# LoadModulesFromFile /etc/modules
### modules-gentoo
# GentooModulesAutoload yes
### network
# DownInterfaces eth0
# UpInterfaces auto
### networkmanager
# EnableNMReconnect yes
### pause_audio
# MuteAudio yes
# PauseAudio yes
### pcmcia
# EjectCards yes
### programs
# IncompatiblePrograms xmms
### services
# RestartServices laptop_mode anacron
# StopServices alsasound
# StartServices aumix
### vbetool
# EnableVbetool yes
# RestoreVbeStateFrom /var/lib/vbetool/vbestate
# VbetoolPost yes
# RestoreVCSAData yes
### xhacks
SwitchToTextMode yes
# UseDummyXServer yes
# DummyXServerConfig xorg-dummy.conf
### xstatus
## This can be set to gnome, kde or x:
## For gnome you need zenity available.
## For kde you need dcop, kstart, kdialog available.
## For x you need to have xosd OR xmessage available.
# XStatus gnome
# XmessageDisable yes
# 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
### xbacklight
# BackLight yes
### gaim
## You need to have dbus, gaim_remote available.
# LogoutGaim yes
# GaimRestoreStatus yes
# GaimLogoutMessage Hibernating
# GaimLoginMessage Back from hibernation
### pidgin
# LogoutPidgin yes
# PidginRestoreStatus yes
# PidginLogoutMessage Hibernating - bye!
# PidginLoginMessage I'm back!
### SSH and PGP keys
AgentsClearGPG yes
AgentsClearSSH yes
### Virtualbox
SuspendVirtualbox yesCosa mi dite?
Burroughs.