Skip to content

Instantly share code, notes, and snippets.

@r-da
Created September 11, 2023 13:38
Show Gist options
  • Save r-da/305b20bf3bf00392bdac3ba3b01576f7 to your computer and use it in GitHub Desktop.
Save r-da/305b20bf3bf00392bdac3ba3b01576f7 to your computer and use it in GitHub Desktop.
How to enable HDMI on HP Zbook Power 15 G9 (i7-12800H) with Ubuntu 22.04

How to enable HDMI on HP Zbook Power 15 G9 (i7-12800H) with Ubuntu 22.04

Problem: Linux does not recognize the HDMI port on the HP Zbook Power 15 G9 with Intel Graphics.

Disclaimer: Use Modifications at Your Own Risk

The instructions provided here involve making changes to your system settings and files. Please be aware that these modifications may have an impact on the stability and functionality of your system.

You undertake these actions at your own risk, and it is your responsibility to ensure that you have backed up your data and are prepared to deal with any potential issues that may arise from these modifications.

The information provided is intended for educational or informational purposes only and should be performed by individuals with the necessary knowledge and expertise. If you are unsure about any step or its potential consequences, seek assistance from a qualified professional.

Neither the author nor any associated parties can be held responsible for any damage, data loss, or other issues that may occur as a result of following these instructions. Proceed with caution and take appropriate precautions to safeguard your system and data.

Solution

The following instructions are specific to Ubuntu 22.04.3 LTS.

Retrieve the Intel VBT BIOS:

  • cat /sys/kernel/debug/dri/0/i915_vbt > intel_vbt

You can decode the file with the command intel_vbt_decode intel_vbt. You should find a device like the following:

Child device info:
  Device handle: 0x0080 (LFP 2 (eDP))
  Device type: 0x1806 (unknown)

The device is not correctly identified, but is an HDMI port; we can replace the wrong identifier 0x1806 with 0x60d2, which is DEVICE_TYPE_HDMI according to the kernel file intel_vbt_defs.h.

Instructions:

  1. Create a copy of the dumped bios file: cp i915_vbt i915_hdmi_vbt
  2. Use a hexadecimal editor to replace 80 00 06 18 with 80 00 D2 60, to identify video device 2 as DEVICE_TYPE_HDMI.
  3. Copy the file to /lib/firmware/:
    • -rw-rw-r-- 1 root root 9216 Aug 21 12:09 /lib/firmware/i915_hdmi_vbt
  4. On ubuntu, to add the new firmware to initramfs, create the file /etc/initramfs-tools/hooks/i915_vbt with the following content:
    #!/bin/sh -e
    
    PREREQS=""
    
    prereqs() { echo "$PREREQS"; }
    
    case "$1" in
        prereqs)
        prereqs
        exit 0
        ;;
    esac
    
    . /usr/share/initramfs-tools/hook-functions
    
    add_firmware i915_hdmi_vbt
  5. Create the file /etc/modprobe.d/i915.conf with the following content, to enable the modified firmware:
    • options i915 vbt_firmware=i915_hdmi_vbt
  6. Update initramfs with sudo update-initramfs -u
  7. Verify that the new vbt file is present in the initramfs:
    • lsinitramfs /boot/initrd.img-$(uname -r)|grep i915_hdmi_vbt
  8. Power off and restart: the HDMI should be working now.
@notorand-it
Copy link

Very well! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment