Linux UI 经常冻结不到 1 秒

Linux UI 经常冻结不到 1 秒

Linux 桌面(Xubuntu 16.04)经常冻结(每分钟多次),持续时间少于 1-2 秒,然后恢复正常运行。

在冻结期间,只有鼠标光标可以移动。

无论是否连接交流适配器,都会发生错误。

笔记本电脑是 Thinkpad E550,配备英特尔 i7-5500U、16GB RAM 和三星 SSD 850 EVO 120GB。平均负载在 0.5 到 0.7 之间。

据称smartctlSSD 没有错误,并且在每次关机前都会进行修剪。

即使关闭第二个图形适配器的电源,使用也vgaswitcheroo无济于事:

# sudo cat /sys/kernel/debug/vgaswitcheroo/switch 
0:DIS: :DynPwr:0000:05:00.0
1:IGD:+:Pwr:0000:00:02.0

电源管理已在 ThinkPad BIOS 中设置为性能。

每次微冻结后,系统日志中都会出现以下消息:

Jan 18 09:37:54 localhost kernel: [ 2868.686075] [drm] probing gen 2 caps for device 8086:9c98 = 5323c42/0
Jan 18 09:37:54 localhost kernel: [ 2868.686082] [drm] PCIE gen 2 link speeds already enabled
Jan 18 09:37:54 localhost kernel: [ 2868.693583] [drm] PCIE GART of 2048M enabled (table at 0x00000000002E8000).
Jan 18 09:37:54 localhost kernel: [ 2868.693688] radeon 0000:05:00.0: WB enabled
Jan 18 09:37:54 localhost kernel: [ 2868.693690] radeon 0000:05:00.0: fence driver on ring 0 use gpu addr 0x0000000080000c00 and cpu addr 0xffff8800355ffc00
Jan 18 09:37:54 localhost kernel: [ 2868.693692] radeon 0000:05:00.0: fence driver on ring 1 use gpu addr 0x0000000080000c04 and cpu addr 0xffff8800355ffc04
Jan 18 09:37:54 localhost kernel: [ 2868.693693] radeon 0000:05:00.0: fence driver on ring 2 use gpu addr 0x0000000080000c08 and cpu addr 0xffff8800355ffc08
Jan 18 09:37:54 localhost kernel: [ 2868.693694] radeon 0000:05:00.0: fence driver on ring 3 use gpu addr 0x0000000080000c0c and cpu addr 0xffff8800355ffc0c
Jan 18 09:37:54 localhost kernel: [ 2868.693695] radeon 0000:05:00.0: fence driver on ring 4 use gpu addr 0x0000000080000c10 and cpu addr 0xffff8800355ffc10
Jan 18 09:37:54 localhost kernel: [ 2868.695260] radeon 0000:05:00.0: fence driver on ring 5 use gpu addr 0x0000000000075a18 and cpu addr 0xffffc90002835a18
Jan 18 09:37:54 localhost kernel: [ 2868.795722] radeon 0000:05:00.0: VCE init error (-110).
Jan 18 09:37:54 localhost kernel: [ 2868.989381] [drm] ring test on 0 succeeded in 1 usecs
Jan 18 09:37:54 localhost kernel: [ 2868.989388] [drm] ring test on 1 succeeded in 1 usecs
Jan 18 09:37:54 localhost kernel: [ 2868.989392] [drm] ring test on 2 succeeded in 1 usecs
Jan 18 09:37:54 localhost kernel: [ 2868.989410] [drm] ring test on 3 succeeded in 2 usecs
Jan 18 09:37:54 localhost kernel: [ 2868.989417] [drm] ring test on 4 succeeded in 4 usecs
Jan 18 09:37:54 localhost kernel: [ 2869.165112] [drm] ring test on 5 succeeded in 2 usecs
Jan 18 09:37:54 localhost kernel: [ 2869.165118] [drm] UVD initialized successfully.
Jan 18 09:37:54 localhost kernel: [ 2869.165153] [drm] ib test on ring 0 succeeded in 0 usecs
Jan 18 09:37:54 localhost kernel: [ 2869.165183] [drm] ib test on ring 1 succeeded in 0 usecs
Jan 18 09:37:54 localhost kernel: [ 2869.165213] [drm] ib test on ring 2 succeeded in 0 usecs
Jan 18 09:37:54 localhost kernel: [ 2869.165241] [drm] ib test on ring 3 succeeded in 0 usecs
Jan 18 09:37:54 localhost kernel: [ 2869.165269] [drm] ib test on ring 4 succeeded in 0 usecs
Jan 18 09:37:55 localhost kernel: [ 2869.812290] [drm] ib test on ring 5 succeeded

答案1

这可能是由于电源管理造成的。

设置电源管理性能不一定会限制 CPU c 状态和 p 状态。您可能需要在 BIOS 中手动设置这些参数(将 c 状态设置为最大 c1,并禁用 pstate)。

此外,还有新的英特尔驱动程序可以覆盖这些设置,需要使用内核命令行将其禁用,例如

intel_idle.max_cstate=0,
intel_pstate=禁用,处理器.max_cstate=0

但不确定这些是否适用于 Ubuntu。请检查。

答案2

此主题这表明问题可能来自英特尔显卡驱动程序。通过切换到 UXA 加速,该问题可能会得到(一定程度上)解决。这可以通过添加

Option      "AccelMethod"  "uxa"

到相关Device部分xorg.conf

相关内容