Re: [問題] Linux >= 3.7 螢幕亂掉與當機

看板Linux作者 ([+++++++======>])時間10年前 (2015/07/07 23:23), 編輯推噓0(006)
留言6則, 3人參與, 最新討論串3/4 (看更多)
※ 引述《lantw44 (#######################)》之銘言: : 自從升級到 Fedora 18 後,嘗試過 : Linux 3.7 3.7.2 3.7.3 3.7.7 3.7.8 3.7.9 3.8 : 都會在載入 i915 驅動後螢幕變得亂七八糟、無法閱讀 : X Window 無法正常啟動,並會在約半分鐘後當機 : 螢幕上看起來有類似 kernel panic 的訊息 : CPU: Intel(R) Core(TM) i5 CPU 650 @ 3.20GHz : 圖形是內建的 Intel(R) Ironlake Desktop : 因此目前只能繼續用 3.6.10-2.fc17.x86_64 : 請問這問題有方法可解決嗎? 結果實際上這個問題一直到了 Linux 4.1 都還沒有解決,目前只知道有個 workaround: intel_iommu=on intel_iommu=igfx_off 不過根據 Linux 文件中 Intel-IOMMU.txt 所說,如果 intel_iommu=igfx_off 可以解決 任何問題,那就應該視為 bug,要回報給他們知道。 這個問題只有在特定硬體會發生,至少我在其他電腦都沒看過,也沒聽說過有這個問題。 這個問題發生的時候,螢幕畫面會變成這個樣子: https://bugs.freedesktop.org/attachment.cgi?id=115079 接著等到 display server (Xorg 或 Wayland) 啟動,過沒多久系統就會完全當機,如果 有接 serial console 也會看到 kernel 印出 GPU hang 和一些 backtrace。這時候就只 能手動按 reset 重開機了。 ※ 引述《lantw44 (#######################)》之銘言: : 終於,經過半年,這問題在 Linux 3.11 解決了 : 我把 intel_iommu=off 從 kernel 開機參數拿掉 : 可以正常開機,也可以開 Xorg,不會當機了 我覺得實際上這個問題應該從來沒有解決過,因為預設就是 intel_iommu=off,刪掉這個 參數實際上什麼也沒改變。 ------------------------------------------------------------------------------ 目前這個 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; 雖然這可以讓系統正常啟動,display server 也能正常執行,但是會在大約使用一小時 之後,在 serial console 收到這個訊息,接著當機,只能按 reset 重開。 Kernel panic - not syncing: DMAR hardware is malfunctioning https://bugs.freedesktop.org/show_bug.cgi?id=91127#c8 目前大概是想辦法找比較了解 IOMMU 的人幫忙看看訊息 ...... ------------------------------------------------------------------------------ 還有一個類似的問題,但是是在使用 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。 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 175.181.43.117 ※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1436282580.A.368.html

07/08 10:46, , 1F
還好我堅持不用 X-Window
07/08 10:46, 1F

07/09 23:09, , 2F
3.8 以後 baytrail 部份的顯示驅動也炸了
07/09 23:09, 2F

07/09 23:10, , 3F
有些機器就是只能用 nomodeset
07/09 23:10, 3F

07/09 23:22, , 4F
用 nomodeset 會很慢而且沒有我要的螢幕解析度
07/09 23:22, 4F

07/09 23:22, , 5F
在找到真正的解法前大概就是繼續用 workaround 了
07/09 23:22, 5F

07/09 23:23, , 6F
只是我找到的 Xen workaround 要改 code 有點麻煩
07/09 23:23, 6F
文章代碼(AID): #1Lc-xKDe (Linux)
文章代碼(AID): #1Lc-xKDe (Linux)