Shutdown hangs / no standby - possible Wifi-bug in the kernel

Bug #1724317 reported by Jan Iversen
162
This bug affects 33 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The Shutdown-process hangs. After about two minutes the following message is displayed:

Oct 17 18:47:06 Kahlan kernel: [ 363.170588] INFO: task kworker/u8:2:186 blocked for more than 120 seconds.
Oct 17 18:47:06 Kahlan kernel: [ 363.170592] Tainted: P OE 4.13.0-12-generic #13-Ubuntu
Oct 17 18:47:06 Kahlan kernel: [ 363.170593] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

Two Minutes later this message is displayed:
Oct 17 18:49:07 Kahlan kernel: [ 484.008650] INFO: task kworker/u8:2:186 blocked for more than 120 seconds.
Oct 17 18:49:07 Kahlan kernel: [ 484.008659] Tainted: P OE 4.13.0-12-generic #13-Ubuntu
Oct 17 18:49:07 Kahlan kernel: [ 484.008662] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

This message repeates itself. If I am lucky, my laptop shuts down after some time.

Also standby does not work. I think my wifi-adapter causes this problem.

With Ubuntu 17.04 or Suse 42.3 I cannot reproduce this problem. I found a bug report in the Arch Bug System (https://bugs.archlinux.org/task/55872

In my laptop I have also a Qualcomm Atheros Adapter. Perhaps the linuxkernel has a bug?

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: xorg 1:7.7+19ubuntu3
ProcVersionSignature: Ubuntu 4.13.0-16.19-generic 4.13.4
Uname: Linux 4.13.0-16-generic x86_64
ApportVersion: 2.20.7-0ubuntu3
Architecture: amd64
CompositorRunning: None
CurrentDesktop: KDE
Date: Tue Oct 17 19:08:32 2017
DistUpgraded: Fresh install
DistroCodename: artful
DistroVariant: kubuntu
DkmsStatus:
 bbswitch, 0.8, 4.13.0-12-generic, x86_64: installed
 bbswitch, 0.8, 4.13.0-16-generic, x86_64: installed
 nvidia-384, 384.90, 4.13.0-12-generic, x86_64: installed
 nvidia-384, 384.90, 4.13.0-16-generic, x86_64: installed
ExtraDebuggingInterest: No
GraphicsCard:
 Intel Corporation HD Graphics 5500 [8086:1616] (rev 09) (prog-if 00 [VGA controller])
   Subsystem: Acer Incorporated [ALI] HD Graphics 5500 [1025:0962]
InstallationDate: Installed on 2017-10-07 (10 days ago)
InstallationMedia: Kubuntu 17.10 "Artful Aardvark" - Alpha amd64 (20170926)
MachineType: Acer Aspire VN7-571G
ProcEnviron:
 LANGUAGE=de
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.13.0-16-generic.efi.signed root=UUID=d5a4b134-b39a-4764-99bd-208c9e504fa8 ro quiet splash vt.handoff=7
SourcePackage: xorg
Symptom: display
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/08/2015
dmi.bios.vendor: Insyde Corp.
dmi.bios.version: V1.14
dmi.board.asset.tag: No Asset Tag
dmi.board.name: Aspire VN7-571G
dmi.board.vendor: Acer
dmi.board.version: V1.14
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: Acer
dmi.chassis.version: V1.14
dmi.modalias: dmi:bvnInsydeCorp.:bvrV1.14:bd01/08/2015:svnAcer:pnAspireVN7-571G:pvrV1.14:rvnAcer:rnAspireVN7-571G:rvrV1.14:cvnAcer:ct10:cvrV1.14:
dmi.product.family: Broadwell System
dmi.product.name: Aspire VN7-571G
dmi.product.version: V1.14
dmi.sys.vendor: Acer
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.83-1
version.libgl1-mesa-dri: libgl1-mesa-dri 17.2.2-0ubuntu1
version.libgl1-mesa-glx: libgl1-mesa-glx 17.2.2-0ubuntu1
version.xserver-xorg-core: xserver-xorg-core 2:1.19.5-0ubuntu2
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.10.0-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20170309-0ubuntu1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.15-2

Revision history for this message
Jan Iversen (janiv) wrote :
Revision history for this message
Jan Iversen (janiv) wrote :

Possible affects linux-image-4.13.0-16-generic

affects: xorg (Ubuntu) → ubuntu
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
no longer affects: ubuntu
Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

It should be fixed with next Artful kernel release.

Revision history for this message
Dimitrios Matanis (dimitrios-matanis) wrote :

This also affects me. I can't shutdown my laptop unless I hold down the power button. Happens every time.

Kai-Heng Feng you mention that this will be fixed in the next kernel release. Any idea roughly when that would be?

I tried booting with 4.10 kernel but that didn't seem to work very well on other areas.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Should be less than two weeks.

Revision history for this message
Dimitrios Matanis (dimitrios-matanis) wrote :

Thank you for your swift response. That's good to hear it's not so far away.

In the meantime does anyone know any workaround for restarting/shutting down a stuck system? I don't feel really comfortable holding down the power button every time and unfortunately I have to use ubuntu every day at work.

Revision history for this message
Dimitrios Matanis (dimitrios-matanis) wrote :

I just installed an newer ubuntu mainline kernel (4.13.9) and the issue is fixed as described by Kai-Heng Feng.

The new problem with that now is that closing the laptop lid doesn't do anything, even though I have set the AC and battery action to 'suspend' in dconf-editor.

I do hope that this is just the dev kernel causing this, which I do not intend to keep once the upstream kernel update gets released.

Revision history for this message
Påvel Nicklasson (pavelnicklasson) wrote :

I can confirm the bug on a Lenovo laptop. It may be the Qualcomm Atheros wireless card that is the culprit. I have a Qualcomm Atheros QCA9377 card.
I can also confirm that the newest kernel from the Ubuntu Mainline ppa (http://kernel.ubuntu.com/~kernel-ppa/mainline/), 4.13.10, seems to solve the issue. The computer shuts down as expected. I have no problem with suspend closing the lid.

Revision history for this message
Jan Kaláb (pitel) wrote :

Installing kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/ fixed the issue for me.

Revision history for this message
gernophil (gernophil) wrote :

Any news when the fixed kernel release will be released?

Revision history for this message
mas samarin (samarin1) wrote :

I have same issue,

Revision history for this message
Slava (zvvubuntu) wrote :

The same problem on Lenovo ideapad 110.

Revision history for this message
Viraniac (viraniac) wrote :

Its been more than two weeks now. Could you please confirm when the next kernel will be available?

Revision history for this message
Menachem Shapiro (menachem) wrote :

I just updated to Lubuntu 17.10 and experienced this issue. I have a Qualcomm Atheros QCA9377 card, and kernel version 4.13.0-16-generic had this same issue. I reverted back to 4.10.0-38-generic and the problem went away.

I'm waiting for the next kernel release to see if that solves the problem.

See also this thread: https://askubuntu.com/questions/965856/kworker-blocked-for-more-than-120-seconds-ubuntu-17-10/967440

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote : Re: [Bug 1724317] Re: Shutdown hangs / no standby - possible Wifi-bug in the kernel
Download full text (4.8 KiB)

> On 9 Nov 2017, at 11:19 PM, Menachem Shapiro <email address hidden> wrote:
>
> I just updated to Lubuntu 17.10 and experienced this issue. I have a
> Qualcomm Atheros QCA9377 card, and kernel version 4.13.0-16-generic had
> this same issue. I reverted back to 4.10.0-38-generic and the problem
> went away.
>
> I'm waiting for the next kernel release to see if that solves the
> problem.

The Linux kernel in -proposed should fix the issue.

>
> See also this thread: https://askubuntu.com/questions/965856/kworker-
> blocked-for-more-than-120-seconds-ubuntu-17-10/967440
>
> --
> You received this bug notification because you are subscribed to linux
> in Ubuntu.
> https://bugs.launchpad.net/bugs/1724317
>
> Title:
> Shutdown hangs / no standby - possible Wifi-bug in the kernel
>
> Status in linux package in Ubuntu:
> Confirmed
>
> Bug description:
> The Shutdown-process hangs. After about two minutes the following
> message is displayed:
>
> Oct 17 18:47:06 Kahlan kernel: [ 363.170588] INFO: task kworker/u8:2:186 blocked for more than 120 seconds.
> Oct 17 18:47:06 Kahlan kernel: [ 363.170592] Tainted: P OE 4.13.0-12-generic #13-Ubuntu
> Oct 17 18:47:06 Kahlan kernel: [ 363.170593] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
>
> Two Minutes later this message is displayed:
> Oct 17 18:49:07 Kahlan kernel: [ 484.008650] INFO: task kworker/u8:2:186 blocked for more than 120 seconds.
> Oct 17 18:49:07 Kahlan kernel: [ 484.008659] Tainted: P OE 4.13.0-12-generic #13-Ubuntu
> Oct 17 18:49:07 Kahlan kernel: [ 484.008662] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
>
> This message repeates itself. If I am lucky, my laptop shuts down
> after some time.
>
> Also standby does not work. I think my wifi-adapter causes this
> problem.
>
> With Ubuntu 17.04 or Suse 42.3 I cannot reproduce this problem. I
> found a bug report in the Arch Bug System
> (https://bugs.archlinux.org/task/55872
>
> In my laptop I have also a Qualcomm Atheros Adapter. Perhaps the
> linuxkernel has a bug?
>
> ProblemType: Bug
> DistroRelease: Ubuntu 17.10
> Package: xorg 1:7.7+19ubuntu3
> ProcVersionSignature: Ubuntu 4.13.0-16.19-generic 4.13.4
> Uname: Linux 4.13.0-16-generic x86_64
> ApportVersion: 2.20.7-0ubuntu3
> Architecture: amd64
> CompositorRunning: None
> CurrentDesktop: KDE
> Date: Tue Oct 17 19:08:32 2017
> DistUpgraded: Fresh install
> DistroCodename: artful
> DistroVariant: kubuntu
> DkmsStatus:
> bbswitch, 0.8, 4.13.0-12-generic, x86_64: installed
> bbswitch, 0.8, 4.13.0-16-generic, x86_64: installed
> nvidia-384, 384.90, 4.13.0-12-generic, x86_64: installed
> nvidia-384, 384.90, 4.13.0-16-generic, x86_64: installed
> ExtraDebuggingInterest: No
> GraphicsCard:
> Intel Corporation HD Graphics 5500 [8086:1616] (rev 09) (prog-if 00 [VGA controller])
> Subsystem: Acer Incorporated [ALI] HD Graphics 5500 [1025:0962]
> InstallationDate: Installed on 2017-10-07 (10 days ago)
> InstallationMedia: Kubuntu 17.10 "Artful Aardvark" - Alpha amd64 (20170926)
> MachineType: Acer Aspire VN7-571G
> ProcEnviron:...

Read more...

Revision history for this message
gernophil (gernophil) wrote :

So, there has been a new kernel release today. Can we expect an update for this Ubuntu release or do we have to wait for the next Ubuntu version? Anything official about this bug?

Revision history for this message
Sebastian Thürrschmidt (thuerrschmidt) wrote :

@gernophil: If by a "new kernel release" you mean Linux 4.14, you won't see that in artful. That's not how kernel updates are done in Ubuntu. For more details see https://wiki.ubuntu.com/Kernel/FAQ.

Back to the bug in question. I have an Acer Aspire E5-573 32DN laptop with a Qualcomm Atheros QCA9377 wireless adapter that suffers from the symptoms described in here. It runs fine with the 4.13.10-041310 mainline kernel, as suggested above.

I also tried the kernel packages from -proposed (4.13.0-17.20) but those wouldn't even boot right. Did anybody else have more success?

Revision history for this message
Harry Bear (harrybear310) wrote :

Been lurking on this bug and hoped it would be fixed with the new 4.13.0-17 kernel update, which I just installed after wrestling with the unreliable apt-get mechanisms for over an hour by the way (but that's a topic for another bug) but no such luck. This buggy beast is still hanging on shutdown with the 4.13.0-17 kernel.

Revision history for this message
Harry Bear (harrybear310) wrote :

My hardware by the way is an Asus Zenbook pro laptop with the Intel dual band wireless-AC 7260 adapter and nvidia GTX 960M

Revision history for this message
Sebastian Thürrschmidt (thuerrschmidt) wrote :

For me everything's fine after yesterday's kernel update. Shutdown and suspend work as expected. So this bug seems to have been fixed indeed, for the Qualcomm Atheros QCA9377 chip at least.

The current kernel (4.13.0-17-generic #20-Ubuntu SMP Mon Nov 6 10:04:08) appears to be unchanged from the one I previously tried to install from proposed, so I guess the boot problems that I encountered where due to some mistake of my own.

Revision history for this message
Bougron (francis-bougron) wrote :

hello
A saw a user with 4.13.0-17
"menuentry 'Ubuntu' --cls-uuid --set=root f0641efe-a392-4030-8271-de6b3db19912
 .........
 linux /boot/vmlinuz-4.13.0-17-generic.efi.signed root=UUID=f0641efe-a392-4030-8271-de6b3db19912 ro quiet splash pci=noaer $vt_handoff
 initrd /boot/initrd.img-4.13.0-17-generic

he can't shutdown because
INFO: Task kworker .... blocked for more than 120 seconds
INFO: Task thermald .... blocked for more than 120 seconds

https://pix.tdct.org/upload/original/1511441932.jpg

Revision history for this message
Slava (zvvubuntu) wrote :

Kernel update 4.13.0-17 fixed bug for me.

Revision history for this message
gernophil (gernophil) wrote :

After the kernel update I was able to shutdown succesfully two times. Without taking any further chances I'm now stuck at the poweroff again. I only see the blinking cursor on the top right corner that normally apears before the splash screen shows up. Seems to be another poweroff bug.

@Sebastian Thürrschmidt: Thanks for the clarification

Revision history for this message
gernophil (gernophil) wrote :

The new bug seems to be related to the proprietary nVidia Driver (384.90). I don't have anymore poweroff problems when I use prime-select intel. However, this is not related to this bug.

Revision history for this message
Massimo Bacilieri (massimo-bacilieri) wrote :

SOLVED.
Starting from your suggestion, having I a rtl8723be based wifi card, I made a simple test:

$ sudo su
# service network-manager stop
# modprobe -r rtl8723be
# modprobe -r rtl8723_common rtl_pci
# modprobe -r rtlwifi
# killall -9 wpa_supplicant

then shutdown: the system halted perfectly. I retryed several time, and always worked.

So, simply, I made a script in /usr/local/sbin/wireless-stop.sh:

#!/bin/bash
service network-manager stop
modprobe -r rtl8723be
modprobe -r rtl8723_common rtl_pci
modprobe -r rtlwifi
killall -9 wpa_supplicant

then an entry in /etc/init.d/wireless:

#!/bin/sh
### BEGIN INIT INFO
# Provides: wireless
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop: 0 6
# Short-Description: unload wifi modules
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
case "$1" in
 start)
  # do nothing at start
  ;;
 stop)
  log_daemon_msg "Removing wifi modules from kernel"
  /usr/local/sbin/wireless-stop.sh
  ;;
 restart|force-reload)
  # do nothing at restart and reload
  ;;
 status)
  # no mean to ask for a status.
  ;;
 *)
  echo "Usage: /etc/init.d/wireless stop"
  exit 1
  ;;
esac

then, just symlink in /etc/rc0.d (shutdown) and /etc/rc6.d (restart):

# cd /etc/rc0.d && ln -s /etc/init.d/wireless K00wireless
# cd /etc/rc6.d && ln -s /etc/init.d/wireless K00wireless

et voilà. Shutdown and restart now works.

Revision history for this message
Sherri W (sherri-wheeler) wrote :

Bug appears to have returned for Ubuntu 16.04 in kernel 4.4.0-169-generic. Also happens in 4.4.0-168.

Does not occur with 4.4.0-166.

All apt updates installed.

Revision history for this message
William Trammell (contagiousbadger) wrote :

Bug also possibly found on 18.04, kernel 5.0.0-36-generic; will need confirmation. (First occurrence)

Revision history for this message
William Trammell (contagiousbadger) wrote :

Power cycling does not appear to trigger the bug, as well as attempting to recreate the original circumstances (turning off wireless through system tray + shutdown).

Specs:
Dell Inspiron 17 3000 (Reg Model P35E)
Ubuntu 18.04.1, kernel 5.0.0-36-generic
Qualcomm Atheros QCA9377 wireless adapter

Revision history for this message
Pedi (pedi-t) wrote :

I can confirm that the bug still exits in kernel: 5.3.0-28-generic (in my case with Linux Mint 19.3)

Sony Vaio product: VPCSE2J9E v: C60A4YXE
Intel Centrino Advanced-N 6230 [Rainbow Peak] driver: iwlwifi

I tried the workaround by @massimo-bacilieri (thanks!) manually and this worked fine.

Revision history for this message
Jonny Giger (ubuntu-user-723) wrote :

I am having this same problem with Xubuntu 20.04 kernel 5.4.0-60-generic

As soon as I plug in the wifi adapter, all terminal commands hang, no programs open, and shutdown hangs.

Interface: wlxe84e06584470
Driver: mt76x2u

lsusb:
Bus 001 Device 004: ID 0e8d:7612 MediaTek Inc. 802.11ac WLAN

dmesg:
INFO: task kworker/u12:4:200 blocked for more than 120 seconds.
Tainted: P OE 5.4.0-60-generic #67-Ubuntu

Workqueue: phy0 ieee80211_iface_work [mac80211]

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.