[ltp] Rebooting when going to hibernation

Dmitry E. Mikhailov linux-thinkpad@linux-thinkpad.org
Tue, 20 May 2008 10:43:19 +0600


Add to /etc/rc.local

It's executed after the SysV stuff, it's the last script before the login 
manager starts. My /etc/rc.local has a whole bunch of tuning:

[tn@ibm ~]$ cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
echo -n 200 > /sys/devices/platform/i8042/serio1/sensitivity
echo -n 1 > /sys/devices/platform/i8042/serio1/press_to_select
echo 3000 > /proc/sys/vm/dirty_writeback_centisecs
echo LID > /proc/acpi/wakeup
modprobe tp_smapi
#modprobe uinput
#modprobe tpm-atmel
modprobe hdaps
modprobe thinkpad_acpi
echo auto_enable>/proc/acpi/ibm/video
echo -n 40 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
echo -n 70 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh
/sbin/ethtool -s eth0 wol d
iwpriv eth1 set_power 5
iwconfig eth1 txpower 15 power period 3 power timeout 300u all
iwconfig eth1 txpower off
echo -n 1 > /sys/devices/pci0000:00/0000:00:1e.0/0000:04:02.0/rf_kill
#modprobe snd-bt-sco
echo ffff> /proc/acpi/ibm/hotkey
echo enable> /proc/acpi/ibm/hotkey
#rmmod thinkpad_acpi
echo -n unload > /sys/block/sda/queue/protect_method
echo -n ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo -n 1 > /sys/devices/platform/hdaps/invert
echo -n 25 > /sys/devices/platform/hdaps/sampling_rate
set KDE_IS_PRELINKED 1
export KDE_IS_PRELINKED


> Hi,
>
> Thank you for answering.
>
> On Mon, May 19, 2008 at 8:01 AM, Dmitry E. Mikhailov
>
> <sexandvodka@gmail.com> wrote:
> > Please first try to check if the pure hibernation works.
> > First, boot to the single user commandline mode by adding 'single' (with
> > no quotes) to the kernel  paremeters list in GRUB or your bootloader.
>
> I did it and it went to hibernation, and then reboot. So I assume the
> problem is not with the kernel.
>
> > If it would not help, the problem is in the kernel. Let's take a look at
> > the contents of...
> > [root@ibm power]# cat /sys/power/disk
> > I get that:
> > [platform] test testproc shutdown reboot
>
> I get that too.
>
> > Brackets show active mode. Platform = shut down via firmware. Shutdown =
> > just shut down. Reboot = just reboot. If your choice is PLATFORM, try
> > changing it to SHUTDOWN. It may (or may not) indicate buggy firmware.
>
> I changed to "shutdown" and went to hibernation with :
> echo -n "disk" > /sys/power/state
>
> Everything went fine. The laptop went to hibernation and didn't
> reboot. So I boot and things went well as they should. Now I have to
> find out how to make it persistent (or to which script should I add
> the last echo).
>
> Thanks for the help, my problem is solved, and as you said before, it
> could be a buggy firmware.
>
> Pierre Massat.