![udevadm monitor解释拔掉交流电时的错误](https://linux22.com/image/898004/udevadm%20monitor%E8%A7%A3%E9%87%8A%E6%8B%94%E6%8E%89%E4%BA%A4%E6%B5%81%E7%94%B5%E6%97%B6%E7%9A%84%E9%94%99%E8%AF%AF.png)
当我在 MSI PE607Rd 上插入或拔出充电器时,Ubuntu 会冻结。
我该如何继续?
答案1
我也遇到过这个问题。
首先,我使用 启用了笔记本电脑中的电池图标dconf editor
。
我还遇到了关机冻结问题,为了解决这个问题,我更改了设置/etc/default/grub/
并设置了apci=force
。这解决了该问题。
而且,当我最终重新启动时,两个问题都得到了解决,并且插入或拔出充电器冻结的问题也得到了解决。
尝试启用电池图标并在 grub 中设置apci=force
。
这可能会对您有所帮助。现在它对我来说运行良好。
答案2
udevadm monitor
解释拔掉交流电时的错误
首先启动电脑,插入交流电。然后输入sudo udevadm monitor
wait a second and unplug the AC。你的屏幕将如下所示:
$ sudo udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent
KERNEL[5888.768785] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:3f/ACPI0003:00/power_supply/ACAD (power_supply)
KERNEL[5888.799754] add /module/thinkpad_acpi (module)
UDEV [5888.800544] add /module/thinkpad_acpi (module)
KERNEL[5888.824515] remove /module/thinkpad_acpi (module)
UDEV [5888.824827] remove /module/thinkpad_acpi (module)
UDEV [5889.752862] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:3f/ACPI0003:00/power_supply/ACAD (power_supply)
KERNEL[5889.804222] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:3f/PNP0C0A:03/power_supply/BAT1 (power_supply)
UDEV [5889.805394] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:3f/PNP0C0A:03/power_supply/BAT1 (power_supply)
问题是它在上面的列表中停在哪里了?
udevadm monitor
解释插入交流电时的错误
接下来,在电池供电的情况下重新启动机器。sudo udevadm monitor
重新开始。插入交流电,您的屏幕将如下所示:
$ sudo udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent
-KERNEL[5905.564769] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:3f/ACPI0003:00/power_supply/ACAD (power_supply)
KERNEL[5905.597141] add /module/thinkpad_acpi (module)
UDEV [5905.598205] add /module/thinkpad_acpi (module)
KERNEL[5905.624567] remove /module/thinkpad_acpi (module)
UDEV [5905.625432] remove /module/thinkpad_acpi (module)
KERNEL[5906.632639] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:3f/PNP0C0A:03/power_supply/BAT1 (power_supply)
UDEV [5906.635327] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:3f/PNP0C0A:03/power_supply/BAT1 (power_supply)
UDEV [5906.716708] change /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:3f/ACPI0003:00/power_supply/ACAD (power_supply)
第二个问题是您的机器在上面的列表中什么时候锁定?
用于gedit /var/log/syslog
查看错误消息
现在在机器仍插入电源的情况下重新启动它。再次登录并输入gedit /var/log/syslog
。
滚动列表到你的机器崩溃的时间并查找错误消息:
Dec 15 15:43:34 alien upowerd[1685]: (upowerd:1685): UPower-Linux-WARNING **: treating change event as add on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9:1.2/0003:046D:C52B.0004/0003:046D:2010.0007/power_supply/hidpp_battery_0
Dec 15 15:43:39 alien kernel: [ 5800.616352] acpi INT3400:00: Unsupported event [0x86]
Dec 15 15:43:46 alien kernel: [ 5807.735823] snd_hda_codec_ca0132 hdaudioC0D0: ca0132 DSP downloaded and running
Dec 15 15:43:46 alien kernel: [ 5807.912730] acpi INT3400:00: Unsupported event [0x86]
Dec 15 15:45:07 alien kernel: [ 5888.842935] ata2.00: exception Emask 0x10 SAct 0x0 SErr 0x50000 action 0xe frozen
Dec 15 15:45:07 alien kernel: [ 5888.842938] ata2.00: irq_stat 0x00400000, PHY RDY changed
Dec 15 15:45:07 alien kernel: [ 5888.842939] ata2: SError: { PHYRdyChg CommWake }
Dec 15 15:45:07 alien kernel: [ 5888.842942] ata2.00: failed command: IDENTIFY DEVICE
Dec 15 15:45:07 alien kernel: [ 5888.842944] ata2.00: cmd ec/00:01:00:00:00/00:00:00:00:00/40 tag 12 pio 512 in
Dec 15 15:45:07 alien kernel: [ 5888.842944] res 50/00:00:00:00:00/00:00:00:00:00/00 Emask 0x10 (ATA bus error)
Dec 15 15:45:07 alien kernel: [ 5888.842946] ata2.00: status: { DRDY }
Dec 15 15:45:07 alien kernel: [ 5888.842949] ata2: hard resetting link
Dec 15 15:45:08 alien kernel: [ 5889.554959] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Dec 15 15:45:08 alien kernel: [ 5889.557410] ata2.00: configured for UDMA/133
Dec 15 15:45:08 alien kernel: [ 5889.567686] ata2: EH complete
Dec 15 15:45:08 alien kernel: [ 5889.675349] acpi INT3400:00: Unsupported event [0x86]
Dec 15 15:45:24 alien kernel: [ 5906.215059] snd_hda_codec_ca0132 hdaudioC0D0: ca0132 DSP downloaded and running
Dec 15 15:45:25 alien kernel: [ 5906.503964] acpi INT3400:00: Unsupported event [0x86]
Dec 15 15:47:17 alien kernel: [ 6018.982028] ata2.00: exception Emask 0x10 SAct 0x0 SErr 0x50000 action 0xe frozen
Dec 15 15:47:17 alien kernel: [ 6018.982038] ata2.00: irq_stat 0x00400000, PHY RDY changed
Dec 15 15:47:17 alien kernel: [ 6018.982044] ata2: SError: { PHYRdyChg CommWake }
Dec 15 15:47:17 alien kernel: [ 6018.982048] ata2.00: failed command: CHECK POWER MODE
Dec 15 15:47:17 alien kernel: [ 6018.982057] ata2.00: cmd e5/00:00:00:00:00/00:00:00:00:00/00 tag 5
Dec 15 15:47:17 alien kernel: [ 6018.982057] res 50/00:00:00:00:00/00:00:00:00:00/00 Emask 0x10 (ATA bus error)
Dec 15 15:47:17 alien kernel: [ 6018.982062] ata2.00: status: { DRDY }
Dec 15 15:47:17 alien kernel: [ 6018.982070] ata2: hard resetting link
Dec 15 15:47:18 alien kernel: [ 6019.697995] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Dec 15 15:47:18 alien kernel: [ 6019.700625] ata2.00: configured for UDMA/133
Dec 15 15:47:18 alien udisksd[2389]: Error performing housekeeping for drive /org/freedesktop/UDisks2/drives/HGST_HTS721010A9E630_JR10004M303XVF: Error updating SMART data: Error sending ATA command CHECK POWER MODE: Unexpected sense data returned:#0120000: 70 00 05 00 00 00 00 0a 00 50 00 00 21 04 00 00 p........P..!...#0120010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................#012 (g-io-error-quark, 0)
Dec 15 15:47:18 alien kernel: [ 6019.710827] ata2: EH complete
就我而言,我看到了错误消息,但我的笔记本电脑没有被锁定。因为我已经有一长串错误消息需要清理,而且我从来不用电池运行笔记本电脑,所以我会忽略这些错误。
记下笔记并谷歌搜索
谷歌搜索对于找到有同样问题及其解决方案的其他人有很大帮助。
- 将错误消息复制并粘贴到您的谷歌搜索栏中。
- 将“Ubuntu Linux”附加到搜索字符串的末尾。
- 删除系统日志中的唯一数字,例如一天中的时间或秒数。
- 首先关注来自 Ask Ubuntu、Launchpad.net 和 ArchLinux 的搜索结果。