Suspender el portatil en Gnu/Linux Suspend the laptop in GNU / Linux
Pues es sencillo . It is simple. Lo primero que hay que hacer es ver si tenemos el soporte para hacer la suspensión, éste lo da el kernel. The first thing to do is see if we have the support to make the suspension, it gives it the kernel. Ejecutamos: Run:
cat /sys/power/state cat / sys / power / state
La salida de esto debe ser: standby mem disk The output of this should be: standby disk mem
puede ser que falte alguna palabra o que tengais alguna más, no pasa nada. may be missing or a word that I have some more, nothing happens. Lo malo es que os de algún error (cuidado lo teneis que hacer como root), porque significa que no teneis soporte. The downside is that you of an error (be careful what you have to do as root), because it means you have no support.
Si no teneis soporte: If you do not have support:
Teneis que cambiar un parámetro en el kernel y compilar. You have to change a parameter in the kernel and compile. La opcion que teneis que cambiar es: The option that you have to change is:
Power Management Options-> Software suspend (marcarlo) Power Management Options-> Software suspend (mark)
Si teneis soporte: If you have support:
Es muy sencillo, sólo teneis que copiar este script y llamarlo cuando querais suspender el sistema: It's simple, just that you have to copy this script and call it when querais suspend the system:
#!/bin/bash #desmontad todos las particiones que sean de escritura de vfat #porque puede dar problemas serios umount -l /mnt/windows #el -l gracias a flamma, fuerza el desmonte echo shutdown > /sys/power/disk # en vez de disk se puede poner alguna de las opciones #que os salieron antes, pensad que disk es el #hibernar de windows y el mem el suspender. #! / bin / bash # disassemble all the partitions are writing vfat # because it can give serious problems umount-l / mnt / windows # l-thanks to the flamma, force clearing echo shutdown> / sys / power / disk # Instead disk can be one of the options # before you left, think that disk is # overwintering of the windows and mem suspend. echo disk > /sys/power/state echo disk> / sys / power / state
Lo guardais en un archivo que se llame por ejemplo: suspender.sh y acordaros que teneis que ejecutarlo como root, una vez así hazlo ejecutable con What guardais in a file named for example: suspender.sh and agree that you have to run as root, once and do it with executable
chmod x suspender.sh chmod x suspender.sh
El truco que yo he hecho es ( en Gnome) en el panel, pichar en Añadir al panel , le dais a Lanzador de aplicación personalizado , en la ventana que os sale, en nombre poneis lo que querais, en comando: gksudo /ruta_al_archivo/suspender.sh y en icono elegid el que querais. The trick is that I have done (Gnome) on the panel, Piche Add to the panel, she dais to Launcher custom application, in the window that leaves you, on behalf poneis what they want, in command: gksudo / ruta_al_archivo / suspender.sh icon and choose which querais.
Problemas: Problems:
Pues el único que he tenido ha sido el controlador de nvidia, y ¿cómo lo he solucionado?, pues no lo he solucionado, simplemente prefiero suspender el sistema que tener aceleración por ahora. So the only thing I had was the driver nvidia, and how I've solved? Because I have not solved simply prefer to suspend the system that have accelerated now. Además siempre se puede hacer otro esquema para el Xorg, que ya contaré en otro post. In addition you can always do another outline for the Xorg, which already count on another post. Así que he cambiado en xorg.conf nv por nvidia. So I've changed in xorg.conf nv by nvidia.
Mi experiencia: My experience:
La prueba la he hecho en Gnome y con el Firefox 1.5, el Openoffice 2 y el Acrobat Reader 7 abiertos. The test I have done in the Gnome and with Firefox 1.5, Openoffice 2 and Acrobat Reader 7 open.
Ha tardado en suspenderse 19s, y en arrancar 32s, ningún problema. It has taken a suspended 19s and 32s start, no problem.
Ya sabeis alguna duda o sugerencia, postearla. Already sabeis any questions or suggestions, post.
ACTUALIZACION: 24 de Enero del 2006 UPDATE: January 24, 2006
He puesto como hacerlo de una manera mas moderna en la siguiente entrada: Software Suspend 2: suspender en Gnu/Linux (II) I have to do it as a way most modern in the following entry: Software Suspend 2: stay in GNU / Linux (II)




