Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message

X201 Linux doesn't power off after shutdown

Linux on ThinkPads
Post Reply
Message
Author
2f1cafc
Posts: 3
Joined: Fri Jun 05, 2020 7:53 am
Location: Walton on Thames, England

X201 Linux doesn't power off after shutdown

#1 Post by 2f1cafc » Fri Jun 05, 2020 8:01 am

Hello everyone!

I have been using my trusty X201 for a few years, and I love it. But there is one thing that has always annoyed me: it won't poweroff when I shut it down through linux, it just sits there saying "System halted", but in order to complete the power off I have to hold down the power button for a few seconds. This is annoying because if I shut it down and then walk away without waiting, when I come back a few hours later the battery is flat.

I would also like to be able to use this laptop completely remotely using the Wake-On-LAN functionality (which works perfectly) but I can't turn it off remotely because of this issue.

Oddly, if I reboot, it seems to work, in the sense that it shuts down, then *powers off* before powering back on again for the reboot.

I see that quite a few other people are using Linux on this machine. Do you have the same experience, or is shutdown working for you?

I don't have Windows at all, nor the recovery partition, so I can't actually check whether this is just a Linux thing.

I am using Arch Linux with Kernel 5.6, but I have actually seen this behaviour on all kinds of free OSs, I have never found one that shuts down properly.

I have tried things like 'acpi=noirq' and 'acpi_osi=Windows 2012' etc but no luck.

Thanks very much for any advice on this. If anyone does have this working I'd love to compare notes to work out what is different about my set up.

Kind regards, -Paul

atagunov
Junior Member
Junior Member
Posts: 438
Joined: Thu Apr 02, 2020 3:11 pm
Location: London, UK

Re: X201 Linux doesn't power off after shutdown

#2 Post by atagunov » Fri Jun 05, 2020 8:15 am

Interestingly I'd started having the same issue - but intermittently - on my T520 about a month ago. I believe this is a software issue. I didn't have this issue before I did the following set of changes:

- I have installed Ubuntu 20.04
- I have added Logitech C310 camera
- I have added UCA202 USB audio card (doesn't work properly under Linux btw but I use it from a Win10 KVM VM so not a big issue for me)
- I have added "intel_iommu=on iommu=pt" to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub (needed to pass through one of the two USB controllers completely to Win10 in KVM VM)
- I have started using KVM VM with Win10 in it under Linux

I'm blaming the issue on one of these changes, but not sure on which one :) Ah once after waiting long enough I'd seen some text messages on otherwise pitch-black screen of my T520 failing to switch off. Those messages were talking about a USB device. It wasn't clear which USB device they were talking about. There was also some mention of "cache". It does seem this may be related to drivers (kernel modules in Linux) for one of the USB devices..

Actually I have recently disabled snd_usb_audio module by adding "blacklist snd_usb_audio" to a new file called /etc/modprobe.d/blacklist-snd_usb_audio. This is because this UCA202 doesn't work properly under Linux anyway and this is the driver which services it. So I wanted Linux to keep using built-in audio and the VM to use UCA202. Yes I have two sets of headphones now - one for Linux and one for Win10 in VM. If my memory serves me right I think I haven't had the issue of T520 not switching off since then.. But then the issue was intermittent anyway..

If you wait long enough, say leave your X201 in this half-switched-off state overnight, do you see any messages at all on the screen? I would probably repeat the test 2, 3, 10 times even if you get no messages at all. Just to be sure. I didn't see my messages each time I had the issue either only once or twice. Though my messages could be red herring.. Honestly I don't know how to investigate this properly..
X220, 2 *T520

2f1cafc
Posts: 3
Joined: Fri Jun 05, 2020 7:53 am
Location: Walton on Thames, England

Re: X201 Linux doesn't power off after shutdown

#3 Post by 2f1cafc » Fri Jun 05, 2020 3:38 pm

Thanks for the reply, and for sharing your experiences atagunov. I haven't yet left it for as long as, for example, overnight, but I have left it for over an hour and seen nothing on the screen. It could be worth investigating more though, thanks.

One thing that makes me think it might not be related directly to my config is that, among others, I have the same problem with other OSs like NomadBSD.

It also seems really telling to me that I can see it actually power off and then turn back on at the reboot, there must be something happening there.

If anyone here has an X201 that does power of after shutdown, i would love to compare the ACPI DSDT (https://wiki.archlinux.org/index.php/DSDT).

Anyway, thanks again for your input, much appreciated.

dmdsoftware
Junior Member
Junior Member
Posts: 428
Joined: Mon Apr 11, 2005 2:24 pm
Location: Mississauga, Ontario, Canada

Re: X201 Linux doesn't power off after shutdown

#4 Post by dmdsoftware » Mon Aug 17, 2020 10:02 am

Do you guys use Always On for USB power in the BIOS settings? Consider disabling that. It is one of the various things that can prevent a proper power down during shutdown.

I typically will disable everything at the BIOS that I have no intentions of ever using just so that is one less thing to start/stop during bootup/shutdown.
X62 & X62s & X62T SXGA+ i7 5600u 8-16GB
Helix i7
Carbon X1 i5 UHD
W520 4x-i7
Sony Vaio P799 (8" LED 1600x768)
"Think" Ultrabook i7
LegoThinkpad 11"

in storage:
X131e AMD
X60/X60s, X61/X61s/X61T, T61, T420, X30

past:
X20-X24, 390X

atagunov
Junior Member
Junior Member
Posts: 438
Joined: Thu Apr 02, 2020 3:11 pm
Location: London, UK

Re: X201 Linux doesn't power off after shutdown

#5 Post by atagunov » Mon Aug 17, 2020 10:23 am

Thx for the hint! Here's how things are going on by T520 with Ubuntu 20.04: I used to have this in my /etc/default/grub and I was having power-down issue intermittently - sometimes it would shut down normally; sometimes it wouldn't

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on iommu=pt"
A few weeks ago I changed it to

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on"
It seems to have helped. Provided that I properly manually stop my Windows VM running in KVM this T520 always shuts down normally. I think I had the situation once when it wouldn't shut down. Then I think I hadn't stopped VM manually. I'm not sure if the VM not being stopped was the reason. It is possible it wasn't. It is possible it couldn't stop for some other reason. However previously the issue would happen roughly 50% of the times I shut down my T520 and now I've seen it only once in weeks.

To be honest this iommu=pt was probably misguided to start with. I don't know what it means. I just copy-pasted it from somewhere on the internet.
X220, 2 *T520

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 11 guests