Linux >= 3.7 螢幕亂掉與當機 - Linux

Faithe avatar
By Faithe
at 2015-08-06T22:01

Table of Contents

※ 引述《lantw44 ([+++++++======>])》之銘言:
: 目前這個 Linux >= 3.7 和 Intel Ironlake 的問題已經回報到 DRM/Intel,不過還沒找
: 到真正的解法。
: git bisect 出來的結果是這個 commit:
: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=edef7e6
: 有嘗試過這個 patch:
: --- a/drivers/char/agp/intel-gtt.c
: +++ b/drivers/char/agp/intel-gtt.c
: @@ -581,7 +581,7 @@ static inline int needs_ilk_vtd_wa(void)
: /* Query intel_iommu to see if we need the workaround. Presumably that
: * was loaded first.
: */
: - if ((gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB ||
: + if ((gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_D_IG ||
: gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG) &&
: intel_iommu_gfx_mapped)
: return 1;

這個 patch 已經進 Linux 4.2-rc2:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8b572a4

也收到通知會 backport 回以下版本:
Linux 3.10-stable
Linux 3.14-stable
Linux 4.1-stable
Ubuntu Kernel 3.13.y-ckt
Ubuntu Kernel 3.16.y-ckt
Ubuntu Kernel 3.19.y-ckt

不過對我來說沒什麼感覺,即使有這個 patch 我還是得用 intel_iommu=igfx_off,因為
持續使用一兩個小時以後還是會當機。當然,如果開機過後就擺著不去用它,放一兩個小
時是不會當機的。

: 雖然這可以讓系統正常啟動,display server 也能正常執行,但是會在大約使用一小時
: 之後,在 serial console 收到這個訊息,接著當機,只能按 reset 重開。
: Kernel panic - not syncing: DMAR hardware is malfunctioning
: https://bugs.freedesktop.org/show_bug.cgi?id=91127#c8
: 目前大概是想辦法找比較了解 IOMMU 的人幫忙看看訊息 ......

目前沒得到任何回應,只知道 dmesg 會持續出現這類訊息:

DMAR: DMAR:[DMA Write] Request device [00:02.0] fault addr fde7c000
DMAR:[fault reason 05] PTE Write access is not set

似乎只要螢幕畫面有變化就會讓這個訊息一直產生,直到最後當機。

: ------------------------------------------------------------------------------
: 還有一個類似的問題,但是是在使用 Linux >= 3.19 當作 Xen dom0 時才會發生,同樣
: 也是會讓螢幕亂掉,然後在 display server 啟動時導致系統當機。這個問題也已經回報
: 到 DRM/Intel 和 Xen-devel。
: git bisect 出來的結果是這個 commit:
: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=47591df
: 第一個 workaround 是關閉 VT-d 支援,但這可能會使 PCI passthrough 不能用。方法
: 是在 Xen 的開機參數加上 iommu=off。
: 第二個 workaround 是模仿 Linux 的 intel_iommu=igfx_off,用這個 patch:
: --- a/xen/drivers/passthrough/vtd/quirks.c
: +++ b/xen/drivers/passthrough/vtd/quirks.c
: @@ -74,6 +74,7 @@ int is_igd_vt_enabled_quirk(void)
: if ( !IS_ILK(ioh_id) )
: return 1;
: + return 0;
: /* integrated graphics on Intel platforms is located at 0:2.0 */
: ggc = pci_conf_read16(0, 0, IGD_DEV, 0, GGC);
: 只不過還是沒有找到真正的解法,目前的想法是等 Linux >= 3.7 的那個問題解決以後,
: 看看能不能模仿解決問題的 commit 修改 Xen。

後來發現 Xen 也會印一些跟上面提到 Linux dmesg 裡很像的訊息:

(XEN) [VT-D]DMAR:[DMA Write] Request device [0000:00:02.0] fault addr
73fbff000, iommu reg = ffff82c000203000
(XEN) [VT-D]DMAR: reason 05 - PTE Write access is not set

但我還是不知道該怎麼解決,只好先送了一個比較正常的 workaround,
現在還在 Xen staging:
http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=1463411

在還沒找到解法之前只能繼續用這個 patch 加進去的 iommu=no-igfx 了。

--
Tags: Linux

All Comments

LOG裡一直出現的異常訊息

Mary avatar
By Mary
at 2015-08-06T11:46
想請教一下版上達人 我的LOG裡這些訊息一直出現, 但是不知道是有害無害 能不能幫忙解答一下該不該處理, 還是放任不管它 Aug 5 00:19:17 59-125-121-235 sshd[3126]: Bad protocol version identification and#39;GET htt ...

ubuntu安裝中文輸入法

Doris avatar
By Doris
at 2015-08-06T00:30
大家好 是這樣子的 由於公司需求~所以我安裝了一台OS為linux ubuntu 12.04的電腦 安裝中文輸入法卻好像無法使用 atatand#34; 爬文參考大家作法是利用指令 sudo apt-get install ibus-chewing 我照做後沒啥問題 但是想要用ctrl+spac ...

新細明體是神器嗎...

Aaliyah avatar
By Aaliyah
at 2015-08-04T21:05
因為某些需要,所以從MS中複製明流體(新細明體)出來,然後fc-cache 結果現在什麼都變成新細明體 http://i.imgur.com/aAVgDEY.png 至少原本gnome theme用的Cantarell也變成新細明體... 印象中沒有作對字體的修改 只有手動加入自己要的字體而已 是發生什麼事 ...

script clean file

Skylar DavisLinda avatar
By Skylar DavisLinda
at 2015-08-04T17:01
寫了一支script 用來清理 AP 寫入的 log 不知道是因為AP持續寫入檔案,在將內容清掉後,卻發現AP沒再寫Log進去了!! 這有解嗎? - ...

CentOS 7 新版防火牆

Carol avatar
By Carol
at 2015-08-04T16:20
最近回鍋使用CentOS 7 發覺有些指令都被改過了 不過大致上都雷同 倒是推出了新版的防火牆firewalld 只是我還是習慣使用舊版的防火牆 新版的防火牆發現指令似乎比較直覺簡單 新版防火牆與舊版防火牆的差異在哪裡呢? - ...