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

现象:

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

触发条件:

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

现象收集:

  可疑的dmesg

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

  可疑的journal 1

Oct 07 14:00:33 T7 kernel: nouveau 0000:04:00.0: DRM: VRAM: 1024 MiB
Oct 07 14:00:33 T7 kernel: nouveau 0000:04:00.0: DRM: GART: 1048576 MiB
Oct 07 14:00:33 T7 kernel: nouveau 0000:04:00.0: DRM: Pointer to TMDS table invalid
Oct 07 14:00:33 T7 kernel: nouveau 0000:04:00.0: DRM: DCB version 4.0
Oct 07 14:00:33 T7 kernel: nouveau 0000:04:00.0: DRM: Pointer to flat panel table invalid

  可疑的journal 2

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

处理步骤:

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

[[email protected] ~]$ lspci -nn -s 04:00.0
04:00.0 3D controller [0302]: NVIDIA Corporation GM108M [GeForce 940M] [10de:1347] (rev a2)
[[email protected] ~]$ 

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

[[email protected] ~]$ readlink /sys/bus/pci/devices/0000\:04\:00.0/driver
../../../../bus/pci/drivers/nouveau
[[email protected] ~]$ lsmod |grep ^nouveau
nouveau              1482752  0
[[email protected] ~]$ modinfo nouveau |grep filename
filename:       /lib/modules/4.7.6-1-ARCH/kernel/drivers/gpu/drm/nouveau/nouveau.ko.gz
[[email protected] ~]$ pacman -Qo /lib/modules/4.7.6-1-ARCH/kernel/drivers/gpu/drm/nouveau/nouveau.ko.gz
/usr/lib/modules/4.7.6-1-ARCH/kernel/drivers/gpu/drm/nouveau/nouveau.ko.gz is owned by linux 4.7.6-1
[[email protected] ~]$ cat /var/log/pacman.log |grep upgraded |grep linux |grep ‘4.7.6‘
[2016-10-06 15:55] [ALPM] upgraded linux (4.7.4-1 -> 4.7.6-1)
[[email protected] ~]$ 

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

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

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

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

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

[[email protected] ~]$ cat /etc/modprobe.d/black-list.conf
blacklist nouveau
[[email protected] ~]$ systemctl reboot

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

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

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

[[email protected] ~]$ mv ~/.config/plasma* backup/
[[email protected] ~]$ mv .kde4/ backup/
[[email protected] ~]$ 

  第二,清除并重建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相关的包。所有更新如下:

[[email protected] ~]$ 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)
[[email protected] ~]$ 

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

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

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

时间: 2024-10-07 06:47:28

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

基于vue的下拉刷新&滚动刷新指令

小编最近在实现移动端列表页面显示的时候一直在思考如何实现列表的自动更新数据,对于大多数Native App或者Web App,在列表的底部增加"加载更多"的按钮也是解决这样的问题一种交互的方式,当然,这样的交互其实还好,不过根据用户的操作习惯来看,似乎滚动刷新更多数据和下拉刷新当前数据的操作方式,更符合用户对列表分页数据的读取习惯,因此,在这里小编想简单的说说,这次在小编系统中所使用的下拉刷新和滚动刷新的实现方式! 其实,这种实现数据加载的原理很简单 在滚动刷新的时候,需要在列表滚动到

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

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

项目实战:滚动刷新场景(从ArrayList到LinkedList)

如果有这样一个需求,有这样一个列表显示数据,现假设一共显示25项,初始状态为空. 首先从0-24添加数据,满了之后,覆盖最早数据,即继续从0-24追加数据. 习惯性思维ArrayList开始搞. java.util 类 ArrayList<E> java.lang.Object java.util.AbstractCollection<E> java.util.AbstractList<E> java.util.ArrayList<E> 所有已实现的接口:

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

一.JS实现关闭当前子窗口,刷新父窗口 JS代码如下: <script> function refreshParent() { window.opener.location.href = window.opener.location.href; window.close(); } </script> html页面代码如下: <input type="button" id="btn1" class="btn" valu

JavaScript:关闭弹出窗口时刷新父窗口

JavaScript:关闭弹出窗口时刷新父窗口 2010-08-13 09:25:29|  分类: 代码示例 |举报 |字号 订阅 说明: 关闭弹出窗口时刷新父窗口也可以说是关闭子窗口时自动刷新父窗口中的信息,即用户通过window对象的open()方法打开一个新窗口(子窗口),当用 户在该子窗口中进行了数据库操作(如数据添加.修改和删除等)之后,关闭子窗口时,系统会自动刷新父窗口来实时更新信息; 思路和技术: 主要应用window.open()语句打开新窗口,并在新窗口中应用opener属性,

js关闭子窗口,刷新父窗口

父页面js:function btnAdd_onclick() {window.open("xxx.jsp", "","height=600, width=650, top=100, left=200,z-look=yes,toolbar=yes, menubar=no, scrollbars=yes, resizable=yes ,alwaysRaised=yes,location=no, status=yes" );} function re

在winform中,关闭窗口时刷新父窗口(原来打开此窗口的窗口)

如何在关闭窗口时刷新父窗口(原来打开此窗口的窗口,不一定是mdi窗口), 这种事情在b/s里很简单,但在winform里却不那么好办.因为你不能关闭第一个窗口时再打开另一个窗口,如果这样的话新窗口就一起被关闭了.但是正因为这样,我们可以让刷新的动作在关闭子窗口时进行,当然所有的动作是在父窗口中进行的.晕,不知道说明白了没有.还是看一下例子吧public partial class Customer : Form    {        public Customer()        {    

selenium之窗口滚动

在这里和大家分享一下,selenium里面常用于处理窗口滚动的方法. location_once_scrolled_into_view 一般用于定位窗口底部元素.将窗口拉到最底部. window.scrollTo(x,y)  js方法将窗口拉动到指定的X,Y坐标上.如果需要将窗口拉到最底部,可以使用Y=document.body.scrollHeight 具体代码如下: e=driver.find_element_by_xpath("//*[text()='联系我们']")   #需要

universal image loader在listview/gridview中滚动时重复加载图片的问题及解决方法

在listview/gridview中使用UIL来display每个item的图片,当图片数量较多需要滑动滚动时会出现卡顿,而且加载过的图片再次上翻后依然会重复加载(显示设置好的加载中图片) 最近在使用UIL遇到了这个问题,相信这个问题许多使用UIL的人都碰到过 现在把解决方法贴出来给有同样问题的朋友做参考 先看下UIL的工作流程 在已经允许内存,存储卡缓存的前提下,当一个图片被请求display时,首先要判断图片是否缓存在内存中,如果false则尝试从存储卡读取,如果依然不存在最后才从网络地址