You are not logged in.

#1 2011-08-04 18:48:46

Niamh
Member
Registered: 2011-03-06
Posts: 18

[SOLVED] Reboot instead of shutdown with laptop mode tools

Hi,

I have Thinkpad Edge E520 and every time I try to shut it down, it reboots instead. One thing I've noticed is that it fails to
unmount filesystems as well. All of this is happening while the LMT is turned on. After I turn it off, filesystems are unmounted
and laptop shuts down normally.
I've tried searching wiki pages and forum, and found that blacklisting "e1000e" should solve it, but it didn't. If anyone has any
suggestions or a solution, I'd be really greateful for it  smile

Last edited by Niamh (2011-08-08 00:47:21)

Offline

#2 2011-08-05 08:22:49

Modeler
Member
From: United Kingdom
Registered: 2011-07-28
Posts: 70

Re: [SOLVED] Reboot instead of shutdown with laptop mode tools

Are you shutting down via the command line, GNOME / KDE or via an ACPI event? If you run "shutdown -h" from single-user mode, does it power off? Can you post your /etc/rc.conf file? I'm fairly new to Arch myself, but will help if I can.

Thanks.


Wirth's law: "Software is getting slower more rapidly than hardware becomes faster"

Offline

#3 2011-08-05 08:46:36

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Reboot instead of shutdown with laptop mode tools

There is a long thread about this: you could try my workaround
https://bbs.archlinux.org/viewtopic.php … 14#p930314


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2011-08-05 09:21:59

Jelle
Member
From: Netherlands
Registered: 2011-01-30
Posts: 84

Re: [SOLVED] Reboot instead of shutdown with laptop mode tools

I had the same thing going on; in the end I solved it by setting ENABLE_AUTO_MODULES=1 to "0" in /etc/laptop-mode/laptop-mode.conf. When I installed laptop-mode-tools, I manually checked and set all the modules I required by hand, but forgot to disable ENABLE_AUTO_MODULES. Initially this worked fine, but as time passed, things started to act up, first only on battery, later also on AC.

I can't pinpoint it, but hopefully it's as easy for you.

Offline

#5 2011-08-06 00:04:43

Niamh
Member
Registered: 2011-03-06
Posts: 18

Re: [SOLVED] Reboot instead of shutdown with laptop mode tools

Modeler wrote:

Are you shutting down via the command line, GNOME / KDE or via an ACPI event? If you run "shutdown -h" from single-user mode, does it power off? Can you post your /etc/rc.conf file? I'm fairly new to Arch myself, but will help if I can.

Thanks.


I was running "shutdown -h 0" from my openbox menu and command line. When on battery, they will both just restart my laptop.
This is my rc.conf, nothing special, but if it helps... smile

   
  1 #
  2 # /etc/rc.conf - Main Configuration for Arch Linux
  3 #
  4 
  5 # -----------------------------------------------------------------------
  6 # LOCALIZATION
  7 # -----------------------------------------------------------------------
  8 #
  9 # LOCALE: available languages can be listed with the 'locale -a' command
 10 # DAEMON_LOCALE: If set to 'yes', use $LOCALE as the locale during daemon
 11 # startup and during the boot process. If set to 'no', the C locale is used.
 12 # HARDWARECLOCK: set to "", "UTC" or "localtime", any other value will result
 13 #   in the hardware clock being left untouched (useful for virtualization)
 14 #   Note: Using "localtime" is discouraged, using "" makes hwclock fall back
 15 #   to the value in /var/lib/hwclock/adjfile
 16 # TIMEZONE: timezones are found in /usr/share/zoneinfo
 17 #   Note: if unset, the value in /etc/localtime is used unchanged
 18 # KEYMAP: keymaps are found in /usr/share/kbd/keymaps
 19 # CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
 20 # CONSOLEMAP: found in /usr/share/kbd/consoletrans
 21 # USECOLOR: use ANSI color sequences in startup messages
 22 #
 23 LOCALE="en_US.UTF-8"
 24 DAEMON_LOCALE="no"
 25 HARDWARECLOCK="UTC"
 26 TIMEZONE="Europe/Zagreb"
 27 KEYMAP="croat"
 28 CONSOLEFONT="lat4-16"
 29 CONSOLEMAP=
 30 USECOLOR="yes"
 31 
 32 # -----------------------------------------------------------------------
 33 # HARDWARE
 34 # -----------------------------------------------------------------------
 35 #
 36 # MODULES: Modules to load at boot-up. Blacklisting is no longer supported.
 37 #   Replace every !module by an entry as on the following line in a file in
 38 #   /etc/modprobe.d:
 39 #     blacklist module
 40 #   See "man modprobe.conf" for details.
 41 #
 42 MODULES=(acpi-cpufreq cpufreq_ondemand)
 43 
 44 # Udev settle timeout (default to 30)
 45 UDEV_TIMEOUT=30
 46 
 47 # Scan for FakeRAID (dmraid) Volumes at startup
 48 USEDMRAID="no"
 49 
 50 # Scan for BTRFS volumes at startup
 51 USEBTRFS="no"
 52 
 53 # Scan for LVM volume groups at startup, required if you use LVM
 54 USELVM="no"
 55 
 56 # -----------------------------------------------------------------------
 57 # NETWORKING
 58 # -----------------------------------------------------------------------
 59 #
 60 # HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
 61 #
 62 HOSTNAME="HQ"
 63 
 64 # Use 'ip addr' or 'ls /sys/class/net/' to see all available interfaces.
 65 #
 66 # Wired network setup
 67 #   - interface: name of device (required)
 68 #   - address: IP address (leave blank for DHCP)
 69 #   - netmask: subnet mask (ignored for DHCP) (optional, defaults to 255.255.255.0)
 70 #   - broadcast: broadcast address (ignored for DHCP) (optional)
 71 #   - gateway: default route (ignored for DHCP)
 72 # 
 73 # Static IP example
 74 # interface=eth0
 75 # address=192.168.0.2
 76 # netmask=255.255.255.0
 77 # broadcast=192.168.0.255
 78 # gateway=192.168.0.1
 79 #
 80 # DHCP example
 81 interface=eth0
 82 address=
 83 netmask=
 84 broadcast=
 85 gateway=
 86 
 87 interface=wlan0
 88 address=
 89 netmask=
 90 broadcast=
 91 gateway=
 92 
 93 # Setting this to "yes" will skip network shutdown.
 94 # This is required if your root device is on NFS.
 95 NETWORK_PERSIST="no"
 96 
 97 # Enable these netcfg profiles at boot-up. These are useful if you happen to
 98 # need more advanced network features than the simple network service
 99 # supports, such as multiple network configurations (ie, laptop users)
100 #   - set to 'menu' to present a menu during boot-up (dialog package required)
101 #   - prefix an entry with a ! to disable it
102 #
103 # Network profiles are found in /etc/network.d
104 #
105 # This requires the netcfg package
106 #
107 #NETWORKS=(main)
108 
109 # -----------------------------------------------------------------------
110 # DAEMONS
111 # -----------------------------------------------------------------------
112 #
113 # Daemons to start at boot-up (in this order)
114 #   - prefix a daemon with a ! to disable it
115 #   - prefix a daemon with a @ to start it up in the background
116 #
117 # If something other takes care of your hardware clock (ntpd, dual-boot...)
118 # you should disable 'hwclock' here.
119 #
120 DAEMONS=(hwclock syslog-ng dbus hal !network @acpid @laptop-mode @wicd @netfs @crond @alsa)
Jelle wrote:

I had the same thing going on; in the end I solved it by setting ENABLE_AUTO_MODULES=1 to "0" in /etc/laptop-mode/laptop-mode.conf. When I installed laptop-mode-tools, I manually checked and set all the modules I required by hand, but forgot to disable ENABLE_AUTO_MODULES. Initially this worked fine, but as time passed, things started to act up, first only on battery, later also on AC.

I can't pinpoint it, but hopefully it's as easy for you.

I tried it. Unfortunately, it didn't work.


jasonwryan wrote:

There is a long thread about this: you could try my workaround
https://bbs.archlinux.org/viewtopic.php … 14#p930314

This partially worked. When I placed the script in a separate .sh file and ran it with sudo, it worked. However when I c/p it in /etc/rc.local.shutdown it doesn't work. I tried placing this as well "su -c /home/marcus/bin/killLMT.sh" in rc.local.shutdown, and it still didn't work. Could you please tell me how to combine it with rc.local.shutdown? smile

Offline

#6 2011-08-06 01:51:11

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Reboot instead of shutdown with laptop mode tools

Niamh wrote:

Could you please tell me how to combine it with rc.local.shutdown? smile

Sure. I just have it in rc.local.shutdown:

/home/jason/path/to/script

if the script is executable it will get run with the correct privileges as it is being called from rc.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2011-08-06 02:44:08

Niamh
Member
Registered: 2011-03-06
Posts: 18

Re: [SOLVED] Reboot instead of shutdown with laptop mode tools

For the sake of it, I moved the script to /usr/bin, changed group and user both to "root" and did "chmod 777 /usr/bin/killLMT.sh" as root. With all that, the script still won't run on shutdown or reboot. Should I perhaps change something in rc.shutdown?

Btw. rc.local.shutdown looks like this:

/usr/bin/killLMT.sh

Offline

#8 2011-08-06 04:07:47

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Reboot instead of shutdown with laptop mode tools

Try deleting the script and starting from scratch.

Add an echo to make sure it is working:

echo "stopping LMT" && rc.d stop laptop-mode

chmod +x it and put it wherever you like. Then use an absolute path to point to it from /etc/rc.local.shutdown

That's all I did.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2011-08-06 22:41:50

Niamh
Member
Registered: 2011-03-06
Posts: 18

Re: [SOLVED] Reboot instead of shutdown with laptop mode tools

After some playing with it, I've got the script running with rc.local.shutdown only  to find out that the laptop still occasionally reboots even with LMT turned off. I'll mark the thread as solved and keep checking wih the one you previously linked (hoping that the problem will be solved with next kernel upgrade). Thank you for your time smile

Offline

#10 2011-08-06 22:49:15

Haptic
Member
Registered: 2009-09-03
Posts: 149

Re: [SOLVED] Reboot instead of shutdown with laptop mode tools

Have you tried just adding

rmmod ehci_hcd

to rc.local.shutdown? It worked for me.

Offline

#11 2011-08-06 23:01:29

Niamh
Member
Registered: 2011-03-06
Posts: 18

Re: [SOLVED] Reboot instead of shutdown with laptop mode tools

That worked. I also had to blacklist "acer_wmi" module, but it shuts down properly now. Thank you smile

About the other problem. Filesystems still fail to unmount during shutdown or reboot proces with LMT turned on.
Could any of the HDD powersaving options be causing that?

Offline

#12 2011-08-07 17:52:21

diegoviola
Member
Registered: 2010-12-16
Posts: 134

Re: [SOLVED] Reboot instead of shutdown with laptop mode tools

Deleted.

Last edited by diegoviola (2023-04-17 22:32:36)

Offline

#13 2011-08-08 00:46:24

Niamh
Member
Registered: 2011-03-06
Posts: 18

Re: [SOLVED] Reboot instead of shutdown with laptop mode tools

Will do. Marking as solved.

Offline

#14 2012-05-02 01:49:41

uberbrodt
Member
Registered: 2011-12-29
Posts: 2

Re: [SOLVED] Reboot instead of shutdown with laptop mode tools

Not trying to re-open this thread, but was curious to see if this was ever submitted to bugzilla.  I just had this issue show up on my Lenovo Ideapad, with the latest updates.

Offline

#15 2012-05-03 02:09:25

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,134

Re: [SOLVED] Reboot instead of shutdown with laptop mode tools

Disabling pm runtime in laptop mode tools worked for me but disabling this obviously reduces power saving. But I'd rather that than not be able to power off in an emergency.

PS There are much more recent threads about this. I just realised the date of the write before last!

Last edited by cfr (2012-05-03 02:11:06)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB