Skip to content

Commit

Permalink
gpd-win-max: Not currently supported by 22.04
Browse files Browse the repository at this point in the history
Kernel 5.15 include a partial EDID fix. The old workaround of supplying a EDID blob no longer works. If no EDID blob is supplied the display is corrupt.
https://wiki.archlinux.org/title/GPD_Win_Max#GPD_Win_Max_2020_kernel_requirement
  • Loading branch information
flexiondotorg committed Jun 16, 2022
1 parent d9b9ded commit cc2eacb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
2 changes: 2 additions & 0 deletions data/gpd-win-max-new.cfg
@@ -0,0 +1,2 @@
GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX} fbcon=rotate:1 video=eDP-1:800x1280"
GRUB_GFXMODE=800x1280x32
31 changes: 26 additions & 5 deletions umpc-ubuntu-respin.sh
Expand Up @@ -166,6 +166,17 @@ fi

# Enable Intel SNA, DRI3 and TearFree.
inject_data "${INTEL_CONF}"
case "${UMPC}" in
gpd-win-max)
case ${VERSION} in
22.04*)
GRUB_D_CONF="${SQUASH_OUT}/etc/default/grub.d/${UMPC}-new.cfg"
echo "ERROR! GPD Win Max is only supported by Ubuntu 20.04 to 21.10."
exit 1
;;
esac
;;
esac

# Rotate the monitor.
inject_data "${MONITOR_CONF}"
Expand Down Expand Up @@ -281,11 +292,21 @@ case ${UMPC} in
# See also: https://aur.archlinux.org/packages/goodix-gpdwin3-dkms/
;;
gpd-win-max)
# Add device specific EDID
inject_data "${SQUASH_OUT}/usr/lib/firmware/edid/${UMPC}-edid.bin"
sed -i "s/GRUB_CMDLINE_LINUX=\"/GRUB_CMDLINE_LINUX=\"fbcon=rotate:1 video=eDP-1:800x1280 drm.edid_firmware=eDP-1:edid\/${UMPC}-edid.bin/" "${GRUB_DEFAULT_CONF}"
sed -i "s/quiet splash/fbcon=rotate:1 video=eDP-1:800x1280 drm.edid_firmware=eDP-1:edid\/${UMPC}-edid.bin fsck.mode=skip quiet splash/g" "${GRUB_BOOT_CONF}"
sed -i "s/quiet splash/fbcon=rotate:1 video=eDP-1:800x1280 drm.edid_firmware=eDP-1:edid\/${UMPC}-edid.bin fsck.mode=skip quiet splash/g" "${GRUB_LOOPBACK_CONF}"
# Add device specific EDID on Ubuntu 21.10 are earlier
# https://patchwork.kernel.org/project/intel-gfx/cover/20210817204329.5457-1-anisse@astier.eu/#24416791
case "${VERSION}" in
22*)
sed -i "s/GRUB_CMDLINE_LINUX=\"/GRUB_CMDLINE_LINUX=\"fbcon=rotate:1 video=eDP-1:800x1280/" "${GRUB_DEFAULT_CONF}"
sed -i "s/quiet splash/fbcon=rotate:1 video=eDP-1:800x1280 fsck.mode=skip quiet splash/g" "${GRUB_BOOT_CONF}"
sed -i "s/quiet splash/fbcon=rotate:1 video=eDP-1:800x1280 fsck.mode=skip quiet splash/g" "${GRUB_LOOPBACK_CONF}"
;;
*)
inject_data "${SQUASH_OUT}/usr/lib/firmware/edid/${UMPC}-edid.bin"
sed -i "s/GRUB_CMDLINE_LINUX=\"/GRUB_CMDLINE_LINUX=\"fbcon=rotate:1 video=eDP-1:800x1280 drm.edid_firmware=eDP-1:edid\/${UMPC}-edid.bin/" "${GRUB_DEFAULT_CONF}"
sed -i "s/quiet splash/fbcon=rotate:1 video=eDP-1:800x1280 drm.edid_firmware=eDP-1:edid\/${UMPC}-edid.bin fsck.mode=skip quiet splash/g" "${GRUB_BOOT_CONF}"
sed -i "s/quiet splash/fbcon=rotate:1 video=eDP-1:800x1280 drm.edid_firmware=eDP-1:edid\/${UMPC}-edid.bin fsck.mode=skip quiet splash/g" "${GRUB_LOOPBACK_CONF}"
;;
esac
;;
topjoy-falcon)
# Frame buffer rotation
Expand Down

0 comments on commit cc2eacb

Please sign in to comment.