Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hibernate to ram
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
dorian-gray84
Tux's lil' helper
Tux's lil' helper


Joined: 23 Apr 2005
Posts: 107
Location: Ravenna

PostPosted: Mon Aug 21, 2006 11:04 am    Post subject: hibernate to ram Reply with quote

Sto cercando di far funzionare l'hibernate to ram nel mio portatile ma non sembra funzionare.
A dir la verita' non so nemmeno se lo supporti ma credo di si' visto che quando c'era installato anche windows sul quel so funzionava.

Cmq ho seguito la guida al risparmio energetico su gentoo org.

In breve ecco i passi seguiti.

Ho scaricato i suspend2-sources e configurato il kernel attivando gli acpi sleep state.
Ho configurato /etc/hibernate/ram.conf, eccolo:

Code:

ironic ~ # cat /etc/hibernate/ram.conf
# Example ram.conf file for suspending to RAM. Adapt to your own tastes.
# Options are not case sensitive.
#
# Run "hibernate -h" for help on the configuration items.

### sysfs_power_state
UseSysfsPowerState mem

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

Verbosity 0
LogFile /var/log/hibernate.log
LogVerbosity 3
# AlwaysForce yes
# AlwaysKill yes
# HibernateVT 15
Distribution gentoo
# 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
# LockXLock yes
# LockXAutoLock 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

### pcmcia
# EjectCards yes

### programs
# IncompatiblePrograms xmms

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

### vbetool
# EnableVbetool yes
# RestoreVbeStateFrom /var/lib/vbetool/vbestate
# VbetoolPost yes
# RestoreVCSAData 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


Il caricamento dei moduli al ritorno dalla sospensione l'ho disattivato (temporanemante) per evitare problemi, una volta che funziona il tutto sistemo meglio le cose.

Il problema sta nel fatto che lanciando il comando "hibernate-ram" il computer va correttamente in sospensione.
Quando pero' vado per riattivarlo tutto "sembra" rimanere bloccato.
Ho detto sembra perche' in realta anche se il monitor non funziona viene data corrente al lettore cd e alla tastiera (la luce delle maiuscole funziona) ma se provo a scrivere "halt" ad esempio non succede nulla. Inoltre la luce che indica il macinare della cpu rimane morta.
Sono quindi costretto a spegnere brutalmente.

Guardando i log:
Code:
ironic ~ # cat /var/log/hibernate.log

Starting suspend at lun ago 21 12:24:32 CEST 2006
hibernate-ram: [01] Executing CheckLastResume ...
hibernate-ram: [01] Executing LockFileGet ...
hibernate-ram: [01] Executing NewKernelFileCheck ...
hibernate-ram: [10] Executing EnsureSysfsPowerStateCapable ...
hibernate-ram: [11] Executing XHacksSuspendHook1 ...
hibernate-ram: [20] Executing MiscLaunchAuxFunc1 ...
Executing echo "Good night!"...
Good night!
hibernate-ram: [30] Executing ServicesStop ...
Executing /etc/init.d/alsasound stop
 * WARNING:  you are stopping a boot service.
 * Storing ALSA Mixer Levels ...                                          [ !! ]
 * Unloading ALSA ...                                                     [ ok ]
 * Unloading ALSA modules ...                                             [ ok ]
hibernate-ram: [45] Executing FSTypesUnmount ...
hibernate-ram: [60] Executing NetworkStop ...
Bringing down interface eth0
 * Unmounting network filesystems ...                                     [ ok ]
 * Stopping eth0
 *   Bringing down eth0
 *     Stopping dhcpcd on eth0 ...                                        [ ok ]
 *     Shutting down eth0 ...                                             [ ok ]
hibernate-ram: [89] Executing SaveKernelModprobe ...
Saved /proc/sys/kernel/modprobe is /sbin/modprobe
hibernate-ram: [91] Executing ModulesUnloadAll ...
Unloading module radeon...
Unloading module udf...
Unloading module af_packet...
Unloading module cpufreq_ondemand...
Unloading module cpufreq_conservative...
Unloading module cpufreq_powersave...
Unloading module p4_clockmod...
Unloading module battery...
Unloading module ac...
Unloading module button...
Unloading module thermal...
Unloading module usbhid...
Unloading module ehci_hcd...
Unloading module ohci_hcd...
Unloading module psmouse...
Unloading module radeonfb...
Unloading module 8139too...
Unloading module drm...
Unloading module cpufreq_performance...
Unloading module speedstep_lib...
Unloading module freq_table...
Unloading module processor...
Unloading module fb...
Unloading module i2c_algo_bit...
Unloading module cfbcopyarea...
Unloading module cfbimgblt...
Unloading module cfbfillrect...
Unloading module crc32...
Unloading module i2c_core...
hibernate-ram: [91] Executing ModulesUnloadBlacklist ...
Unloading blacklisted modules listed /etc/hibernate/blacklisted-modules
Module version for ipw2100 is
Module version for ipw2200 is
Module version for ndiswrapper is
hibernate-ram: [95] Executing XHacksSuspendHook2 ...
xhacks: changing console from 1 to 15
hibernate-ram: [99] Executing DoSysfsPowerStateSuspend ...
hibernate-ram: Activating sysfs power state mem ...


sembra pero' che anche se viene data corrente al computer non parte la fase di ripistino della sessione.

A cosa puo' essere dovuto?
le mie idee erano:

1) configurazione sbagliata di ram.conf
2) lvm2, puo' dar fastidio che abbia tutte le partizioni tranne / e boot su lvm2?
3) l'acpi del mio portatile non supporta l'hibernate to ram
4) boh?!

ah, il mio portatile e' un toshiba satellite pro A60
Back to top
View user's profile Send private message
syntaxerrormmm
Guru
Guru


Joined: 17 Apr 2005
Posts: 449
Location: Romano di Lombardia - BG - ITALY

PostPosted: Mon Aug 21, 2006 12:37 pm    Post subject: Re: hibernate to ram Reply with quote

dorian-gray84 wrote:
Sto cercando di far funzionare l'hibernate to ram nel mio portatile ma non sembra funzionare.
Mi viene difficile pensare che un pc, la cui immagine di esecuzione venga salvata in RAM, possa riprendere la sua sessione al reboot: la RAM viene cancellata ad ogni boot, quindi tu prima salvi un'immagine che, alla riaccensione successiva all'ibernazione, viene cancellata subito... Sarà che non me ne intendo...

Ciao.
_________________
"Every rule can be broken, but no rule may be ignored."

Last.fm - Gentoo 2006.1 on:
Acer Aspire 1355LC - suspend2-sources-2.6.18-r3
IBM Thinkpad T30 - suspend2-sources-2.6.19-r3
Back to top
View user's profile Send private message
dorian-gray84
Tux's lil' helper
Tux's lil' helper


Joined: 23 Apr 2005
Posts: 107
Location: Ravenna

PostPosted: Mon Aug 21, 2006 1:14 pm    Post subject: Reply with quote

No, quello che voglio fare io e' quello che in windows viene chiamato sospensione.

In pratica si entra in uno stato in cui si cava alimentazione al computer mantenendone pero' un minimo per alimentare la ram in modo da non perdere i dati.
Quando si esce da questo stato si rida corrente a tutte le componenti del pc e si ripristina il contenuto della ram.
In questo modo il computer e' acceso ma il suo consumo e' pari a 0 o quasi.
E' utile ad esempio nei portatili quando chiudi il monitor, in questo modo oltre a spegnere il monitor si disattiva tutto il resto (scheda video, audio, usb, dischi...) tranne la ram.
Vantaggi: consumo minimo e non occorre spegnere il pc.

Poi esiste anche l'hibernate to disk che invece salva il contenuto della ram nella partizione di swap o in un file su disco prima di spegnere il computer.
Al riavvio poi si carica quest'immagine salvata invecedi far partire la classica fase di boot.
Questo e' utile invece quando vuoi che riaccendendo la macchina il suo stato sia uguale a quello in cui era prima di essere spenta.
Ad esempio sei hai openoffice, firefox, vim, e amarok aperti e poi fai un hibernate to disk quando riaccendi la macchina te li ritrovi aperti e con gli stessi dati di quando hai ibernato.
In pratica e' come fare una fotografia del tuo sistema (e quindi della tua ram) prima di spegnere il pc e rispristinare questa fotografia alla successiva accensione.
Ma questa seconda cosa (hibernate to disk) non e' quello che voglio fare io. Per il momento almeno.

Forse mi ero espresso male prima, spero di essere stato piu' chiaro stavolta. Sorry!
Back to top
View user's profile Send private message
dorian-gray84
Tux's lil' helper
Tux's lil' helper


Joined: 23 Apr 2005
Posts: 107
Location: Ravenna

PostPosted: Tue Aug 22, 2006 1:06 pm    Post subject: Reply with quote

up
Back to top
View user's profile Send private message
Luca89
Advocate
Advocate


Joined: 27 Apr 2005
Posts: 2107
Location: Agrigento (Italy)

PostPosted: Wed Aug 23, 2006 8:08 am    Post subject: Reply with quote

Quote:
1) configurazione sbagliata di ram.conf

prova a usare come tipo di sospensione un altro di quelli supportati dal tuo pc, la lista la trovi in:
Code:
[ ~ ] $ cat /sys/power/state
standby mem
[ ~ ] $


Quote:
2) lvm2, puo' dar fastidio che abbia tutte le partizioni tranne / e boot su lvm2?

lo escludo, ho una situazione identica alla tua e funziona.

Inoltre: il suspend to disk funziona? almeno così possiamo escludere qualche problema agli script di ibernazione.
_________________
Running Fast!
Back to top
View user's profile Send private message
dark_knight
Tux's lil' helper
Tux's lil' helper


Joined: 22 Apr 2006
Posts: 112

PostPosted: Wed Aug 23, 2006 8:33 am    Post subject: Reply with quote

dorian-gray84 wrote:
No, quello che voglio fare io e' quello che in windows viene chiamato sospensione.

Giusto per essere chiari: quello che vuoi fare tu è quello che in windows si chiama "standby" (=hibernate to ram), perchè "sospensione" è sinonimo di "hibernate to disk" ;)

Meglio evitare confusione :)
Back to top
View user's profile Send private message
dorian-gray84
Tux's lil' helper
Tux's lil' helper


Joined: 23 Apr 2005
Posts: 107
Location: Ravenna

PostPosted: Wed Aug 23, 2006 1:23 pm    Post subject: Reply with quote

Ok...allora uso termini inglesi...

L'hibernate to disk funziona bene e difatti lo uso spesso anche se ancora devo fare un po' di fine-tuning sulla sua configurazione (ricaricare moduli, bloccare le sessioni, ecc...)

Dando un
Code:
ironic ~ # cat /sys/power/state
mem


Pero' mi sembrava che ci fosse anche standby una volta... e' possibile?
Back to top
View user's profile Send private message
dema
Tux's lil' helper
Tux's lil' helper


Joined: 14 May 2006
Posts: 88
Location: Padova - Italy

PostPosted: Thu Aug 24, 2006 8:33 am    Post subject: Reply with quote

anch'io ho lo stesso problema... portatile (toshiba m50) che esegue correttamente il processo di sospensione e che si blocca (o meglio, che resta con lo schermo completamente nero) durante il resume... se riesci a risolverlo fai felice anche me perché ci ho provato per un bel pò, poi ho desistito... :-(

per curiosità, che bios hai? phoenix?

ciao
Back to top
View user's profile Send private message
dema
Tux's lil' helper
Tux's lil' helper


Joined: 14 May 2006
Posts: 88
Location: Padova - Italy

PostPosted: Thu Aug 24, 2006 8:35 am    Post subject: Reply with quote

dorian-gray84 wrote:
Dando un
Code:
ironic ~ # cat /sys/power/state mem


cosa significa quando tra gli stati supportati c'è solo "mem" e non anche "standby"?
Back to top
View user's profile Send private message
dorian-gray84
Tux's lil' helper
Tux's lil' helper


Joined: 23 Apr 2005
Posts: 107
Location: Ravenna

PostPosted: Thu Aug 24, 2006 9:40 am    Post subject: Reply with quote

Si' il bios e' phenix alla versione aggiornato alla versione 1.9 mi sembra.
Non e' solo un problema di schermo nero, guardando i log si nota proprio che non parte nessun processo di resume dallo stato di ibernazione.

Non so cosa significhi il fatto che in /sys/power/state ci sia solo la voce "mem"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) 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