Last active
September 15, 2019 16:16
-
-
Save joshskidmore/cf1f84d70d276615576850f494c12f9c to your computer and use it in GitHub Desktop.
p2max-dsdt-check.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
_dmesg=$(dmesg) | |
bios_version=$(echo -e "$_dmesg" | grep GPD | awk '{ print $9 }') | |
echo "You are running GPD P2 BIOS version $bios_version" | |
if [[ "$_dmesg" =~ "20190816" ]]; then | |
echo "You have the DSDT for v0.23 loaded (joshwiththegoodhair version)" | |
[[ "$bios_version" == "0.23" ]] && echo "Congrats! This is the proper version for your BIOS. Touchscreen should be working." | |
[[ "$bios_version" != "0.23" ]] && echo "ERROR: You've loaded the wrong version of the DSDT override for your BIOS. Try loading PeterCxy's version: https://github.com/PeterCxy/gpd_p2_max_acpi/releases/download/20190825/acpi_override" | |
elif [[ "$_dmesg" =~ "20190703" ]]; then | |
echo "You have the DSDT for < v0.23 loaded (PeterCxy version)" | |
[[ "$bios_version" != "0.23" ]] && echo "This *should* be the proper DSDT to match your BIOS." | |
[[ "$bios_version" == "0.23" ]] && echo "ERROR: You need to upgrade your DSDT override to match BIOS version v0.23. Load this override instead: http://josh.sh/acpi_override_23" | |
elif ! [[ "$_dmesg" =~ "Phsical table override" ]]; then | |
echo "Error: You have no DSDT override loaded! Visit https://gpdsupport.com/t/touchscreen-issue-resolved/132/67 and use the override for BIOS version $bios_version" | |
else | |
echo "Unable to determine whether DSDT has been loaded" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment