Try   HackMD

讓ubuntu 20.04支援新版Intel Display Driver

TL;DR

  • 檢查目前版本
  • 更新kernel
  • 檢查是否支援intel i915
  • 修改grub
  • 更新sudo grub-update

更新Linux Kernel

檢查是否支援Intel Display Driver

$ dmesg | grep i915 -A4 [ 63.021047] snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec [ 63.021595] hdaudio hdaudioC0D2: Unable to configure, disabling [ 63.022947] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input8 [ 63.023348] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input9 [ 63.023637] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1f.3/sound/card0/input10

顯示No i915 binding for Intel HDMI/DP codec

檢查kernel version

uname -sr Linux 5.11.0-44-generic

列出所有可更新kernels

sudo apt search 'linux-image-[0-9].*-generic' linux-image-5.11.0-25-generic/focal-updates,focal-security 5.11.0-25.27~20.04.1 amd64 Signed kernel image generic linux-image-5.11.0-27-generic/focal-updates,focal-security,now 5.11.0-27.29~20.04.1 amd64 [installed,automatic] Signed kernel image generic linux-image-5.11.0-34-generic/focal-updates,focal-security 5.11.0-34.36~20.04.1 amd64 Signed kernel image generic linux-image-5.11.0-36-generic/focal-updates,focal-security 5.11.0-36.40~20.04.1 amd64 Signed kernel image generic linux-image-5.11.0-37-generic/focal-updates,focal-security 5.11.0-37.41~20.04.2 amd64 Signed kernel image generic linux-image-5.11.0-38-generic/focal-updates,focal-security 5.11.0-38.42~20.04.1 amd64 Signed kernel image generic linux-image-5.11.0-40-generic/focal-updates,focal-security 5.11.0-40.44~20.04.2 amd64 Signed kernel image generic linux-image-5.11.0-41-generic/focal-updates,focal-security 5.11.0-41.45~20.04.1 amd64 Signed kernel image generic linux-image-5.11.0-43-generic/focal-updates,focal-security 5.11.0-43.47~20.04.2 amd64 Signed kernel image generic linux-image-5.11.0-44-generic/focal-updates,focal-security,now 5.11.0-44.48~20.04.2 amd64 [installed,automatic] Signed kernel image generic linux-image-5.13.0-21-generic/focal-updates,focal-security 5.13.0-21.21~20.04.1 amd64 Signed kernel image generic linux-image-5.13.0-22-generic/focal-updates,focal-security 5.13.0-22.22~20.04.1 amd64 Signed kernel image generic linux-image-5.13.0-23-generic/focal-updates,focal-security 5.13.0-23.23~20.04.2 amd64 Signed kernel image generic ...略

找到最新是5.13.0-23

更新到最新版kernel

sudo apt install linux-image-5.13.0-23-generic linux-modules-5.13.0-23-generic linux-modules-extra-5.13.0-23-generic

之後重新開機,即更新完kernel

再檢查intel display driver

$ dmesg | grep i915 -A4 [ 1.782726] i915 0000:00:02.0: Your graphics device 4692 is not properly supported by the driver in this kernel version. To force driver probe anyway, use i915.force_probe=4692 module parameter or CONFIG_DRM_I915_FORCE_PROBE=4692 configuration option, or (recommended) check for kernel updates. [ 1.784589] hid-generic 0003:0B05:19AF.0001: hiddev0,hidraw0: USB HID v1.11 Device [AsusTek Computer Inc. AURA LED Controller] on usb-0000:00:14.0-2/input2 [ 1.785025] input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:1c.0/0000:03:00.0/usb3/3-1/3-1:1.0/0003:046D:C077.0002/input/input4 ...(略)

更新grub

編輯/etc/default/grub

原來長這樣

# If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: # info -f grub -n 'Simple configuration' GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="" ...(略)

改成最後一行這樣

# If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: # info -f grub -n 'Simple configuration' GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="quiet i915.force_probe=4692" ...(略)

更新grub

sudo update-grub

然後重開機就行了。

參考資料

https://gist.github.com/Postrediori/556706b28aff3b831d9e41acb47418c5

https://www.team-bob.org/ubuntu-kernel-upgrade/