# Ubuntu – Lenovo X220 reboots instead of shutting down

rebootshutdown

When I push the shutdown button in the shutdown dialog my notebook (Lenovo X220) does a restart instead.

I also tried running the "sudo shutdown -P now" from command line -> same result!

Before upgrading to 11.10 everything was fine.

Anybody else experiences this malfunction? Any tips to make it work again?

• I'm here on Xubuntu 11.10 with an x220 i5 and experienced the same issue.

Installing laptop-mode-tools (with aptitude install laptop-mode-tools --without-recommends) fixed it for me.

I came up with another solution that does not involve laptop-mode-tools. Maybe it works for others. The problem seems to occur when power-management for PCI(e) devices is enabled (set to "auto"). Here are two ways to check that:

1. run powertop, switch to the "Tunables" tab and see if your "Runtime PM for PCI*" entries are marked as "Good"
2. cat /sys/bus/pci/devices/*/power/control and see if it outputs some "auto" values. "auto" causes the shutdown problems on my machine while "on" does not.

I created an init.d script to handle that (and other stuff like setting battery charge threshs and the like), available via pastebin.

Note:

• The script runs fine on my machine. This does not mean it will run on others due to missing programs, etc.
• The script does more than (potentially) circumventing the shutdown problem, so please read it first.
• I am not sure that "auto" brings any benefit at all ;)

Hope it helps.