[暂时解决]13.2 睡眠唤醒内核崩溃(usb hub无法唤醒)

先说下过程,机器先是睡眠了,然后唤醒,电源启动,屏幕无显示,唤醒失败,重启,进入系统,睡眠,进入睡眠后(电源灯灭了,电池灯闪),2 秒左右进行唤醒,可以正常唤醒,再次进行睡眠,15 分钟后,唤醒失败,这次情况是,唤醒屏幕这起,显示到 KDM,鼠标键盘无法操作,过两秒后 KDM 挂了,自动跳到 tty 显示下面的图


然后 CapsLK 灯不断闪,再过几秒后自动重启。重新开机后查看日志没有看到相关的错误信息下面附件是导出的日志

sudo journalctl --since "2014-11-07 14:50:00" > ~/sleep_bad.log

这是其中唤醒那一段

11 月 07 15:11:47 openSUSE.linux NetworkManager[841]: <info> sleep requested (sleeping: no  enabled: yes)
11 月 07 15:11:47 openSUSE.linux NetworkManager[841]: <info> sleeping...
11 月 07 15:11:47 openSUSE.linux NetworkManager[841]: <info> (wlp2s0): device state change: activated -> unmanaged (reason 'sleeping') [100 10 37]
11 月 07 15:11:47 openSUSE.linux NetworkManager[841]: <info> (wlp2s0): deactivating device (reason 'sleeping') [37]
11 月 07 15:11:47 openSUSE.linux dhclient[2190]: Received signal 15, initiating shutdown.
11 月 07 15:11:47 openSUSE.linux NetworkManager[841]: Received signal 15, initiating shutdown.
11 月 07 15:11:47 openSUSE.linux dhclient[2190]: DHCPRELEASE on wlp2s0 to 192.168.1.1 port 67 (xid=0x43aab824)
11 月 07 15:11:47 openSUSE.linux NetworkManager[841]: DHCPRELEASE on wlp2s0 to 192.168.1.1 port 67 (xid=0x43aab824)
11 月 07 15:11:48 openSUSE.linux NetworkManager[841]: <warn> (wlp2s0): DHCP client pid 2190 didn't exit, will kill it.
11 月 07 15:11:48 openSUSE.linux NetworkManager[841]: <info> (wlp2s0): canceled DHCP transaction, DHCP client pid 2190
11 月 07 15:11:48 openSUSE.linux avahi-daemon[758]: Withdrawing address record for fe80::9ed2:1eff:fe58:348b on wlp2s0.
11 月 07 15:11:48 openSUSE.linux avahi-daemon[758]: Leaving mDNS multicast group on interface wlp2s0.IPv6 with address fe80::9ed2:1eff:fe58:348b.
11 月 07 15:11:48 openSUSE.linux avahi-daemon[758]: Interface wlp2s0.IPv6 no longer relevant for mDNS.
11 月 07 15:11:48 openSUSE.linux avahi-daemon[758]: Withdrawing address record for 192.168.1.251 on wlp2s0.
11 月 07 15:11:48 openSUSE.linux avahi-daemon[758]: Leaving mDNS multicast group on interface wlp2s0.IPv4 with address 192.168.1.251.
11 月 07 15:11:48 openSUSE.linux avahi-daemon[758]: Interface wlp2s0.IPv4 no longer relevant for mDNS.
11 月 07 15:11:48 openSUSE.linux kernel: wlp2s0: deauthenticating from 78:a1:06:87:8a:36 by local choice (Reason: 3=DEAUTH_LEAVING)
11 月 07 15:11:48 openSUSE.linux kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready
11 月 07 15:11:48 openSUSE.linux kernel: cfg80211: Calling CRDA to update world regulatory domain
11 月 07 15:11:48 openSUSE.linux NetworkManager[841]: <info> NetworkManager state is now ASLEEP
11 月 07 15:11:48 openSUSE.linux kernel: cfg80211: World regulatory domain updated:
11 月 07 15:11:48 openSUSE.linux kernel: cfg80211:  DFS Master region: unset
11 月 07 15:11:48 openSUSE.linux kernel: cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
11 月 07 15:11:48 openSUSE.linux kernel: cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
11 月 07 15:11:48 openSUSE.linux kernel: cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
11 月 07 15:11:48 openSUSE.linux kernel: cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
11 月 07 15:11:48 openSUSE.linux kernel: cfg80211:   (5170000 KHz - 5250000 KHz @ 160000 KHz), (N/A, 2000 mBm), (N/A)
11 月 07 15:11:48 openSUSE.linux kernel: cfg80211:   (5250000 KHz - 5330000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
11 月 07 15:11:48 openSUSE.linux kernel: cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
11 月 07 15:11:48 openSUSE.linux kernel: cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
11 月 07 15:11:48 openSUSE.linux kernel: cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
11 月 07 15:11:48 openSUSE.linux nm-dispatcher[2198]: Dispatching action 'down' for wlp2s0
-- Reboot --

sleep_bad.log (332 KB)

你的日志是很常见的 NetworkManager 关闭打开的过程… 睡眠必然发生的。没什么稀奇。
自己英文过关的话读读也能判断的,没有 fail,error 什么的,连 warning 都没有。

这是内核崩溃(OOPS)的表现。这里有一篇文章你看下:

zh.opensuse.org/openSUSE:%E5%9B%9E%E6%8A%A5%E5%86%85%E6%A0%B8%E6%95%85%E9%9A%9C

你可能需要安装 yast2-kdump 然后配置做下转储,不然是抓不到错误消息的。

嗯 ,我就是看到没有什么问题,我先看下故障转存晚点再看看,下班再弄

catch 到了,看了下,应该是 usb 的问题,唤醒不了,我专门也试了一下把所有 的 USB 设备拨了还是那样,这可以到 bugzilla 报 BUG?catch 到的内容包含了一个内核,内核就不上传到论坛了,大家都一样

eveblue @openSUSE ~/2014-11-07-23:25 $ cat dmesg.txt |grep ERROR
  139.507057] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 1.
  139.660032] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 1.
  139.977422] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 2.
  140.130453] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 2.
  140.447774] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 3.
  140.600807] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 3.
  150.949864] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 2.
  151.102868] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 2.
  151.420212] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 1.
  151.573247] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 1.
  151.890595] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 3.
  152.043572] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 3.
eveblue @openSUSE ~/2014-11-07-23:25 $ cat dmesg.txt |grep fail
    3.919177] usb: failed to peer usb3-port2 and usb2-port2 by location (usb3-port2:none) (usb2-port2:usb3-port1)
    3.919180] usb usb3-port2: failed to peer to usb2-port2 (-16)
  139.507058] usb 2-4: hub failed to enable device, error -22
  139.660047] usb 2-4: hub failed to enable device, error -22
  139.977423] usb 2-6: hub failed to enable device, error -22
  140.130455] usb 2-6: hub failed to enable device, error -22
  140.447775] usb 2-7: hub failed to enable device, error -22
  140.600808] usb 2-7: hub failed to enable device, error -22
  150.949865] usb 2-6: hub failed to enable device, error -22
  151.102869] usb 2-6: hub failed to enable device, error -22
  151.420213] usb 2-4: hub failed to enable device, error -22
  151.573262] usb 2-4: hub failed to enable device, error -22
  151.890596] usb 2-7: hub failed to enable device, error -22
  152.043573] usb 2-7: hub failed to enable device, error -22
  162.809385] Kernel panic - not syncing: usb 2-4: unrecoverable failure

dump_crash.tgz (638 KB)

报吧,内核不会修,只能找专业的。注意标题别像这个这样了。

Sent from my iPhone 5s using Tapatalk

试一下 factory 的 stable(3.17)版本的内核看看?

因为睡眠后为法唤醒导致内核崩溃,可以睡眠前运行下面语句,更换 old_scheme_first 的状态,可以暂时解决无法唤醒的问题

# echo Y > /sys/module/usbcore/parameters/old_scheme_first