现象:

  konsole,setting等plasma的系统应用反应缓慢,在滚动条滚动时,尤为明显。

触发条件:

  并不是十分明确的系统滚动升级(Syu)后,产生。

现象收集:

  可疑的dmesg

[   35.728342] nouveau ::00.0: DRM: resuming kernel object tree...
[ 35.728469] nouveau ::00.0: priv: HUB0: 6013d4 badf573f (1e408200)
[ 35.766014] nouveau ::00.0: priv: HUB0: 10ecc0 ffffffff (1b40822c)
[ 35.766423] nouveau ::00.0: DRM: resuming client object trees...

  可疑的journal 1

Oct  :: T7 kernel: nouveau ::00.0: DRM: VRAM:  MiB
Oct :: T7 kernel: nouveau ::00.0: DRM: GART: MiB
Oct :: T7 kernel: nouveau ::00.0: DRM: Pointer to TMDS table invalid
Oct :: T7 kernel: nouveau ::00.0: DRM: DCB version 4.0
Oct :: T7 kernel: nouveau ::00.0: DRM: Pointer to flat panel table invalid

  可疑的journal 2

Oct  :: T7 kwin_x11[]: QPainter::begin: Paint device returned engine == , type:
Oct :: T7 kwin_x11[]: QPainter::setRenderHint: Painter must be active to set rendering hints
Oct :: T7 kwin_x11[]: QPainter::setWindow: Painter not active
Oct :: T7 kwin_x11[]: QPainter::setClipRect: Painter not active
Oct :: T7 kwin_x11[]: QPainter::save: Painter not active
Oct :: T7 kwin_x11[]: QPainter::setRenderHint: Painter must be active to set rendering hints
Oct :: T7 kwin_x11[]: QPainter::setPen: Painter not active
Oct :: T7 kwin_x11[]: QPainter::setBrush: Painter not active
Oct :: T7 kwin_x11[]: QPainter::setClipRect: Painter not active
Oct :: T7 kwin_x11[]: QPainter::drawRects: Painter not active
Oct :: T7 kwin_x11[]: QPainter::restore: Unbalanced save/restore
Oct :: T7 kwin_x11[]: QPainter::save: Painter not active
Oct :: T7 kwin_x11[]: QPainter::setPen: Painter not active
Oct :: T7 kwin_x11[]: QPainter::setBrush: Painter not active
Oct :: T7 kwin_x11[]: QPainter::drawRects: Painter not active
Oct :: T7 kwin_x11[]: QPainter::setRenderHint: Painter must be active to set rendering hints
Oct :: T7 kwin_x11[]: QPainter::setBrush: Painter not active
Oct :: T7 kwin_x11[]: QPainter::setPen: Painter not active
Oct :: T7 kwin_x11[]: QPainter::restore: Unbalanced save/restore
Oct :: T7 kwin_x11[]: QPainter::setFont: Painter not active
Oct :: T7 kwin_x11[]: QPainter::setPen: Painter not active
Oct :: T7 kwin_x11[]: QPainter::fontMetrics: Painter not active
Oct :: T7 kwin_x11[]: QPainter::save: Painter not active
Oct :: T7 kwin_x11[]: QPainter::translate: Painter not active
Oct :: T7 kwin_x11[]: QPainter::restore: Unbalanced save/restore
Oct :: T7 kwin_x11[]: QPainter::save: Painter not active
Oct :: T7 kwin_x11[]: QPainter::translate: Painter not active
Oct :: T7 kwin_x11[]: QPainter::setRenderHint: Painter must be active to set rendering hints
Oct :: T7 kwin_x11[]: QPainter::translate: Painter not active
Oct :: T7 kwin_x11[]: QPainter::scale: Painter not active
Oct :: T7 kwin_x11[]: QPainter::translate: Painter not active

处理步骤:

  基于上面的信息,首先判断是驱动 nouveau 的问题。该驱动指向PCIe地址 04:00.0,查看发现该地址为Nvidia独立显卡。

[tong@T7 ~]$ lspci -nn -s :00.0
:00.0 3D controller []: NVIDIA Corporation GM108M [GeForce 940M] [10de:] (rev a2)
[tong@T7 ~]$

  首先,怀疑是显卡驱动除了问题。需要提到的一个前提时,T450为双显卡笔记本,我在安装系统时变考虑到了Nvidia显卡的兼容性问题,而只安装了集成显卡的驱动。所以,现在怀疑可能是其他包的依赖关系,导致了Nvidia的驱动被安装了。然后由于这个驱动的更新或者兼容导致了现在的问题。接下来进行想法验证。

[tong@T7 ~]$ readlink /sys/bus/pci/devices/\:\:00.0/driver
../../../../bus/pci/drivers/nouveau
[tong@T7 ~]$ lsmod |grep ^nouveau
nouveau
[tong@T7 ~]$ modinfo nouveau |grep filename
filename: /lib/modules/4.7.--ARCH/kernel/drivers/gpu/drm/nouveau/nouveau.ko.gz
[tong@T7 ~]$ pacman -Qo /lib/modules/4.7.--ARCH/kernel/drivers/gpu/drm/nouveau/nouveau.ko.gz
/usr/lib/modules/4.7.--ARCH/kernel/drivers/gpu/drm/nouveau/nouveau.ko.gz is owned by linux 4.7.-
[tong@T7 ~]$ cat /var/log/pacman.log |grep upgraded |grep linux |grep '4.7.6'
[-- :] [ALPM] upgraded linux (4.7.- -> 4.7.-)
[tong@T7 ~]$

  通过以上内容,能够看出独立显卡确实被nouveau驱动所使用,且该驱动包含与内核包中,该包也确实在系统滚动中进行了升级。

  由于我并不需要独立显卡,所以我的思路是将独立显卡禁用掉,从而简单有效的解决这个问题。

  另外,需要指出的是在这个逻辑中包含着一个疑问,就是nouveau驱动的作用到底是什么?在当前系统状态下独立显卡起到的作用时什么?我一直以为当我没有为Nvidia显卡安装驱动的情况下,它就不会被使用,然而事实并非如此,具体的细节等问题我尚没有理解清楚,可以通过阅读archlinux关于xorg的章节进行后续了解。

  回到禁用独立网卡的问题。无外乎几种方法:1. 在硬件层禁用,一般的BIOS里都有这样的选项,但是我的并没有。2. 在系统层面禁用,如udev和kernel等。3. 正确的驱起来,因为这种设计本身就是为了双网卡切换,只有都驱好然后一直使用集成的卡,不使用独立卡,应该也是可以的吧?!Optimus 这个也需要再研究

  我采用禁用nouveau驱动的方式来禁用独立显卡。

[tong@T7 ~]$ cat /etc/modprobe.d/black-list.conf
blacklist nouveau
[tong@T7 ~]$ systemctl reboot

  重启之后,使用 lsmod 以及查看 /sys/bus/pci/devices/0000\:04\:00.0/driver 文件可以判断,独立显卡没有被驱动。

  但是,窗口刷新慢的情况并没有得到解决。接着,换一个思路,也行并不是驱动的问题,通过前文看到的journal2信息,怀疑很有可能是plasma的问题。查看了plasma的文档,其中包含的troubleshooting章节提到了一些有用的信息。

  第一,做了清除所有既有配置的操作,并没有解决问题。

[tong@T7 ~]$ mv ~/.config/plasma* backup/
[tong@T7 ~]$ mv .kde4/ backup/
[tong@T7 ~]$

  第二,清除并重建cache,问题未解决。

$ rm ~/.config/Trolltech.conf
$ kbuildsycoca4 --noincremental

  第三,查看kwin状态,并未获取有用信息。

$ qdbus org.kde.KWin /KWin supportInformation

然后,基于以上显卡及kde配置相关的信息情况,很自然的想到进入kde配置页,调整显示配置,compositor 等内容,进行尝试。

在compositor页面看见系统提示的错误信息,表示compositor没有正确启用。然后,我去除了nouveau的blacklist, 并重启,再次进入conpositor配置页,错误信息消失。窗口刷新问题也神奇的得到修正,

1. 窗口刷新慢的问题消失。

2. nouveau的日志信息仍然存在,journal 2 的日志内容消失。

结论:

1. 由于问题已经不能复现,故无法追查root cause。我猜测应该是清除并重建cache解决了问题,但是查看所以更新包,并没有plasma相关的包被更新,只有几个qt5相关的包。所有更新如下:

[tong@T7 ~]$ cat /var/log/pacman.log |grep 2016-10-06 |grep upgraded
[2016-10-06 15:53] [ALPM] upgraded tzdata (2016f-1 -> 2016g-1)
[2016-10-06 15:53] [ALPM] upgraded iana-etc (20160921-1 -> 20160927-1)
[2016-10-06 15:53] [ALPM] upgraded babl (0.1.16-1 -> 0.1.18-1)
[2016-10-06 15:53] [ALPM] upgraded libsystemd (231-1 -> 231-3)
[2016-10-06 15:53] [ALPM] upgraded bluez (5.41-2 -> 5.42-1)
[2016-10-06 15:53] [ALPM] upgraded bluez-libs (5.41-2 -> 5.42-1)
[2016-10-06 15:53] [ALPM] upgraded breeze-icons (5.26.0-1 -> 5.26.0-2)
[2016-10-06 15:53] [ALPM] upgraded c-ares (1.11.0-1 -> 1.12.0-1)
[2016-10-06 15:53] [ALPM] upgraded openssl (1.0.2.i-1 -> 1.0.2.j-1)
[2016-10-06 15:53] [ALPM] upgraded systemd (231-1 -> 231-3)
[2016-10-06 15:53] [ALPM] upgraded nettle (3.2-2 -> 3.3-1)
[2016-10-06 15:53] [ALPM] upgraded libcups (2.2.0-3 -> 2.2.1-1)
[2016-10-06 15:53] [ALPM] upgraded libx11 (1.6.3-1 -> 1.6.4-1)
[2016-10-06 15:53] [ALPM] upgraded libxi (1.7.6-1 -> 1.7.7-1)
[2016-10-06 15:53] [ALPM] upgraded libxrender (0.9.9-1 -> 0.9.10-1)
[2016-10-06 15:53] [ALPM] upgraded libxrandr (1.5.0-1 -> 1.5.1-1)
[2016-10-06 15:53] [ALPM] upgraded libxfixes (5.0.2-1 -> 5.0.3-1)
[2016-10-06 15:53] [ALPM] upgraded libdrm (2.4.70-1 -> 2.4.71-1)
[2016-10-06 15:53] [ALPM] upgraded mesa (12.0.3-1 -> 12.0.3-2)
[2016-10-06 15:53] [ALPM] upgraded mesa-libgl (12.0.3-1 -> 12.0.3-2)
[2016-10-06 15:53] [ALPM] upgraded libxtst (1.2.2-1 -> 1.2.3-1)
[2016-10-06 15:53] [ALPM] upgraded libtool (2.4.6-5 -> 2.4.6-6)
[2016-10-06 15:54] [ALPM] upgraded chromium (53.0.2785.116-1 -> 53.0.2785.143-1)
[2016-10-06 15:54] [ALPM] upgraded containerd (0.2.3-1 -> 0.2.4-1)
[2016-10-06 15:54] [ALPM] upgraded openjpeg2 (2.1.1-2 -> 2.1.2-1)
[2016-10-06 15:54] [ALPM] upgraded cups (2.2.0-3 -> 2.2.1-1)
[2016-10-06 15:54] [ALPM] upgraded device-mapper (2.02.165-1 -> 2.02.166-1)
[2016-10-06 15:54] [ALPM] upgraded libxv (1.0.10-1 -> 1.0.11-1)
[2016-10-06 15:54] [ALPM] upgraded libmm-glib (1.6.0-1 -> 1.6.2-1)
[2016-10-06 15:54] [ALPM] upgraded libnm-glib (1.4.1dev+33+gc87b89b-1 -> 1.4.2-1)
[2016-10-06 15:54] [ALPM] upgraded xkeyboard-config (2.18-1 -> 2.19-1)
[2016-10-06 15:54] [ALPM] upgraded eclipse-common (4.6.0-1 -> 4.6.1-1)
[2016-10-06 15:54] [ALPM] upgraded eclipse-java (4.6.0-1 -> 4.6.1-1)
[2016-10-06 15:54] [ALPM] upgraded qt4 (4.8.7-9 -> 4.8.7-10)
[2016-10-06 15:54] [ALPM] upgraded fcitx-sogoupinyin (2.0.0.0078-3 -> 2.1.0.0082-1)
[2016-10-06 15:54] [ALPM] upgraded libass (0.13.2-1 -> 0.13.3-1)
[2016-10-06 15:54] [ALPM] upgraded libx264 (2:148.20160613-2 -> 2:148.20160920-1)
[2016-10-06 15:54] [ALPM] upgraded x265 (2.0-1 -> 2.1-1)
[2016-10-06 15:54] [ALPM] upgraded ffmpeg (1:3.1.3-2 -> 1:3.1.4-2)
[2016-10-06 15:54] [ALPM] upgraded gc (7.4.2-4 -> 7.6.0-1)
[2016-10-06 15:54] [ALPM] upgraded ghostscript (9.19-3 -> 9.20-2)
[2016-10-06 15:54] [ALPM] upgraded gst-plugins-bad (1.8.3-1 -> 1.8.3-2)
[2016-10-06 15:54] [ALPM] upgraded hostapd (2.5-2 -> 2.6-2)
[2016-10-06 15:54] [ALPM] upgraded hplip (3.16.8-2 -> 3.16.9-1)
[2016-10-06 15:55] [ALPM] upgraded jsoncpp (1.7.5-1 -> 1.7.6-1)
[2016-10-06 15:55] [ALPM] upgraded lib32-libdrm (2.4.70-1 -> 2.4.71-1)
[2016-10-06 15:55] [ALPM] upgraded lib32-libx11 (1.6.3-1 -> 1.6.4-1)
[2016-10-06 15:55] [ALPM] upgraded lib32-libxfixes (5.0.2-1 -> 5.0.3-1)
[2016-10-06 15:55] [ALPM] upgraded lib32-libxi (1.7.6-1 -> 1.7.7-1)
[2016-10-06 15:55] [ALPM] upgraded lib32-libxrender (0.9.9-1 -> 0.9.10-1)
[2016-10-06 15:55] [ALPM] upgraded lib32-libxrandr (1.5.0-1 -> 1.5.1-1)
[2016-10-06 15:55] [ALPM] upgraded lib32-wayland (1.11.0-1 -> 1.12.0-1)
[2016-10-06 15:55] [ALPM] upgraded lib32-mesa (12.0.3-1 -> 12.0.3-2)
[2016-10-06 15:55] [ALPM] upgraded lib32-mesa-libgl (12.0.3-1 -> 12.0.3-2)
[2016-10-06 15:55] [ALPM] upgraded lib32-mesa-vdpau (12.0.3-1 -> 12.0.3-2)
[2016-10-06 15:55] [ALPM] upgraded lib32-openssl (1:1.0.2.i-1 -> 1:1.0.2.j-1)
[2016-10-06 15:55] [ALPM] upgraded lib32-util-linux (2.28.1-1 -> 2.28.2-1)
[2016-10-06 15:55] [ALPM] upgraded libaccounts-glib (1.22-1 -> 1.23-1)
[2016-10-06 15:55] [ALPM] upgraded qt5-base (5.7.0-2 -> 5.7.0-3)
[2016-10-06 15:55] [ALPM] upgraded libaccounts-qt (1.14-2 -> 1.15-1)
[2016-10-06 15:55] [ALPM] upgraded libmariadbclient (10.1.17-1 -> 10.1.18-1)
[2016-10-06 15:55] [ALPM] upgraded libxvmc (1.0.9-1 -> 1.0.10-1)
[2016-10-06 15:55] [ALPM] upgraded mpfr (3.1.4.p1-1 -> 3.1.5-1)
[2016-10-06 15:55] [ALPM] upgraded linux (4.7.4-1 -> 4.7.6-1)
[2016-10-06 15:56] [ALPM] upgraded lvm2 (2.02.165-1 -> 2.02.166-1)
[2016-10-06 15:56] [ALPM] upgraded mariadb-clients (10.1.17-1 -> 10.1.18-1)
[2016-10-06 15:56] [ALPM] upgraded mariadb (10.1.17-1 -> 10.1.18-1)
[2016-10-06 15:56] [ALPM] upgraded modemmanager (1.6.0-1 -> 1.6.2-1)
[2016-10-06 15:56] [ALPM] upgraded networkmanager (1.4.1dev+33+gc87b89b-1 -> 1.4.2-1)
[2016-10-06 15:57] [ALPM] upgraded nmap (7.12-2 -> 7.30-1)
[2016-10-06 15:57] [ALPM] upgraded openssh (7.3p1-1 -> 7.3p1-2)
[2016-10-06 15:57] [ALPM] upgraded pacman-mirrorlist (20160913-1 -> 20161005-1)
[2016-10-06 15:58] [ALPM] upgraded python-setuptools (1:27.3.0-1 -> 1:28.1.0-1)
[2016-10-06 15:58] [ALPM] upgraded python2-setuptools (1:27.3.0-1 -> 1:28.1.0-1)
[2016-10-06 15:58] [ALPM] upgraded qca-qt5 (2.1.1-5 -> 2.1.1-6)
[2016-10-06 15:58] [ALPM] upgraded qt5-xmlpatterns (5.7.0-1 -> 5.7.0-2)
[2016-10-06 15:58] [ALPM] upgraded qt5-declarative (5.7.0-2 -> 5.7.0-3)
[2016-10-06 15:58] [ALPM] upgraded qt5-tools (5.7.0-1 -> 5.7.0-2)
[2016-10-06 15:58] [ALPM] upgraded rtkit (0.11-5 -> 0.11+6+g417bb7d-1)
[2016-10-06 15:58] [ALPM] upgraded smplayer (16.8.0-1 -> 16.9.0-1)
[2016-10-06 15:58] [ALPM] upgraded sudo (1.8.17.p1-1 -> 1.8.18-1)
[2016-10-06 15:58] [ALPM] upgraded systemd-sysvcompat (231-1 -> 231-3)
[2016-10-06 15:58] [ALPM] upgraded thunderbird (45.3.0-1 -> 45.4.0-1)
[2016-10-06 15:58] [ALPM] upgraded vim-runtime (8.0.0005-1 -> 8.0.0013-1)
[2016-10-06 15:58] [ALPM] upgraded vim (8.0.0005-1 -> 8.0.0013-1)
[2016-10-06 15:58] [ALPM] upgraded wireshark-cli (2.2.0-1 -> 2.2.0-2)
[2016-10-06 15:58] [ALPM] upgraded wireshark-common (2.2.0-1 -> 2.2.0-2)
[2016-10-06 15:58] [ALPM] upgraded wireshark-qt (2.2.0-1 -> 2.2.0-2)
[2016-10-06 15:58] [ALPM] upgraded xf86-input-evdev (2.10.3-1 -> 2.10.4-1)
[2016-10-06 15:58] [ALPM] upgraded xf86-video-intel (1:2.99.917+703+g15c5ff1-1 -> 1:2.99.917+708+g8f33f80-1)
[2016-10-06 15:58] [ALPM] upgraded xterm (325-1 -> 326-1)
[tong@T7 ~]$

2. 在linux这条路上,遇见此类问题是难以避免的。总的结论就是问题解决了,然而我却并不明确的知道如何解决的。而且也不需要深究。

但是,一个指导性的建议就是,应该对这种故障拥有备份机制。即需要一套稳定性高的基础性工具包,来在故障发生时可以继续常规工作。如:FVWM+basic xorg tools。

之前切到kde之后,我就把FVWM都卸载了,现在看来需要重新安装一套了。以用于灾难恢复。

[troubleshoot][archlinux][X] plasma(KDE) 窗口滚动刷新冻结(约延迟10s)(已解决,root cause不明,无法再次复现)的更多相关文章

  1. Mac 电脑鼠标和触摸板滚动方向不一致的问题【已解决】

    当我们使用鼠标连接到 MacBook 时,会发现无论怎么设置,鼠标和触摸板的滚动方向都是相反的,导致不能同时使用鼠标和触摸板 解决方法: 我安装了下面的程序,它只允许您反转鼠标的滚动行为: Scrol ...

  2. 更新记录后关闭子窗口并刷新父窗口的Javascript

    有时我们需要在新打开的窗口里面编辑信息,等编辑完了,需要将当前窗口关闭并且刷新父窗口,以使修改生效,本文就是介绍用 javascript 来实现"更新记录后关闭子窗口并刷新父窗口" ...

  3. JS实现关闭当前子窗口,刷新父窗口

    一.JS实现关闭当前子窗口,刷新父窗口 JS代码如下: <script> function refreshParent() {  window.opener.location.href = ...

  4. jquery实现导航栏跟随窗口滚动

    最近在制作一个模版的时候用到的一个jquery插件,当网站导航滚动到当前可见页面顶部时,固定在顶部并随窗口滚动,有很多的网站前台模版有有类似的效果. smohan.fixednav.js /* * 随 ...

  5. 简单的 jQuery 浮动层随窗口滚动滑动插件实例

    写了一个非常简单的 jQuery 插件实例  浮动层随窗口滚动滑动 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional/ ...

  6. scrollIntoView()窗口滚动

    1.某DIV窗口滚动到顶部: document.getElementById("某DIV的ID").scrollIntoView(true); 2.某DIV窗口滚动到底部: doc ...

  7. js 窗口滚动到一定高度时加载数据

    <script type="text/javascript"> //当窗口滚动到一定高度时 某块页面开始加载数据 window.onload = function() ...

  8. android testview + listview 整体滚动刷新

    listview滚动刷新不再讲述怎么实现 因为想实现整体滚动的效果,初始计划scrollView嵌套listview实现. 问题一:scrollview嵌套listview时,listview只能显示 ...

  9. JS实现关闭当前子窗口,刷新父窗口及调用父窗口的方法

    一.js实现关闭当前子窗口,刷新父窗口 JS代码如下: <script> function refreshParent() {  window.opener.location.href = ...

随机推荐

  1. TeeChart注册方法

  2. 模拟 ZOJ 3736 Pocket Cube

    题目传送门 题意:魔方最多旋转n次,问最多能使多少面颜色相同 分析:6种状态(3种旋转方式*顺逆方向,其他对称的!),首先先打个表,然后很愉快的DFS.自己写的时候费劲脑汁,代码很长,还TLE了... ...

  3. LMT 装机记录

    老毛桃是一个存在很久的文物了,当年在大学的时候,学习委员还专门做了一个PPT来讲老毛桃,现在想想,有点后悔那是不去试一下. 但万幸的是,最近终于彻底理解了工作流程: 1)安装一个LMT的软件,从其官网 ...

  4. netstat -an 提示:不是内部或外部命令

      输入cmd,点击确定按钮:   进入dos操作界面效果:   然后输入netstat -an 然后回车,查看端口: 5 如果输入:netstat -an,提示:不是内部或外部命令,也不是可运行的程 ...

  5. Catching Fish[HDU1077]

    Catching Fish Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)To ...

  6. tiledmap2

    1 1.1 将tiledmap 保存为xml格式 1.2 在unity当中设置摄像机为"Orthogonal", 1.3 拖拽tiledmap prefab从project视图到H ...

  7. 游戏 slider

    using UnityEngine; using System.Collections; public class La : MonoBehaviour { float verticalValue=0 ...

  8. BZOJ1580 : [Usaco2009 Hol]Cattle Bruisers 杀手游戏

    以贝茜为参照物,则贝茜固定于原点,每个杀手是一个圆心在某条射线上的圆. 解出每个杀手可以射杀贝茜的时间区间,然后扫描线即可,时间复杂度$O(n\log n)$. #include<cstdio& ...

  9. 利用java实现的一个发送手机短信的小例子

    今天闲来无事,在微博上看到一个关于用java实现的一个发送手机短信的程序,看了看,写的不太相信,闲的没事,把他整理下来,以后可能用得着 JAVA发送手机短信,流传有几种方法:(1)使用webservi ...

  10. QInputDialog 使用方法

    在Qt中,如果想快速生成一个对话框,可以和用户进行简单的交互,而不需要写一个新的类的时候,就要用到QInputDialog类,这个类就是专门用来建立简单对话框的,其主要能建下列几种对话框: