Comment 35 for bug 1964916

Revision history for this message
Leon Le (iamleon) wrote :

Solution: Build a kernel for HP Omni 120 based on Linux kernel 6.4.13

Step 1: Download Linux kernel 6.4.13 and extract:
"wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.4.13.tar.xz"
"tar xvf linux-6.4.13.tar.xz"

Step 2: Install additional packages for building a kernel
"sudo apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison"

Step 3: Configure Kernel
Navigate to the linux-6.4.13 : "cd inux-6.4.13"
Copy the existing Linux config file: "cp -v /boot/config-$(uname -r) .config"
Make a default configuration file: "make menuconfig" -> Save -> Exit

Step 4: Edit drivers/gpu/drm/drm_edid.c in folder linux-6.4.13 (Visit https://gitlab.freedesktop.org/nouvelles/kernel/-/commit/2682768bde745b10ae126a322cdcaf532cf88851 for more details)
Remove
 /* Some EDIDs have bogus h/vtotal values */
 if (mode->hsync_end > mode->htotal)
  mode->htotal = mode->hsync_end + 1;
 if (mode->vsync_end > mode->vtotal)
  mode->vtotal = mode->vsync_end + 1;
Add
 /* Some EDIDs have bogus h/vsync_end values */
 if (mode->hsync_end > mode->htotal) {
  drm_dbg_kms(dev, "[CONNECTOR:%d:%s] reducing hsync_end %d->%d\n",
       connector->base.id, connector->name,
       mode->hsync_end, mode->htotal);
  mode->hsync_end = mode->htotal;
 }
 if (mode->vsync_end > mode->vtotal) {
  drm_dbg_kms(dev, "[CONNECTOR:%d:%s] reducing vsync_end %d->%d\n",
       connector->base.id, connector->name,
       mode->vsync_end, mode->vtotal);
  mode->vsync_end = mode->vtotal;
 }

Step 5: Start building the kernel. Note: It may take hours to complete.
"scripts/config --disable SYSTEM_TRUSTED_KEYS"
"scripts/config --disable SYSTEM_REVOCATION_KEYS"
"sudo make -j$(nproc)"
Press Enter 2 times to confirm the default options for the generation of new certificates.

Step 6: Install the compiled kernel
"sudo make modules_install"
then
"sudo make install"

Reboot and the flickering disappear. This issue has been existing for over a decade, so I hope anyone suffering from this issue can now fix it.