Touchscreen Issue Resolved

Wish I could help @naquad - But I gave up after hours of messing with grub.d and trying to load the acpi override. I agree’d with Josh’s summation grub sucks or in my words is shit and it was simply not loading or not loading first. I believe arch and bios 0.23 works on systemd. I think this is what
@joshwiththegoodhair is using?

1 Like

Could touchscreen work if we replace grub with systemd on debian/ubuntu derivatives?

1 Like

It’s entirely possible, but I’m not that good with Linux to know exactly how to do so.
I use Ubuntu MATE / Xubuntu primarily for emacs / org-mode and LaTeX / Biblatex & TexLive stuff and even that its a steep learning curve and I’m fairly new at it sorry.

For the sake of testing I’ve moved from GRUB to systemd-boot with acpi_override for BIOS 0.23, now I have those magic lines:

[    0.017282] ACPI: DSDT ACPI table found in initrd [kernel/firmware/acpi/dsdt.aml][0x28dc3]
[    0.017343] ACPI: Table Upgrade: override [DSDT-ALASKA-  A M I ]

But there’s no Goodix Touchscreen device at all and system boots only 1 time of 5, it stalls after “SHA256 validated” message :frowning:

After booting Windows and then booting to Linux it boots 100%. But kworker/0:2-kacpi_notify process does 100% load on 1 core and still no touchscreen. Hence I suspect that version for BIOS 0.23 is not actually working.

In any case this is a huge red flag for me as touchscreen is essential for a device like P2 Max as touchpad here is very small and inconvenient.

I’m thinking we should officially request GPD company to fix this problem for us as they’ve also stated support for Linux (GPD P2 Max: The world's smallest Ultrabook | Indiegogo update at Jul 31, 2019 • 10:31AM) so its time to provide some :slight_smile: Also it’ll be interesting how will they fix it in Ubuntu MATE that’s announced for October.

P. S. There should be absolutely no custom kernels as solution to this problem. Those dark times passed years ago and I don’t want to manually update kernels.

1 Like

Sorry guys for my delay. It’s been a bit busy with work lately.

@naquad - Are you using Xorg or Wayland?

I’ll have some time later today, and I’ll work on installing Mate on USB stick so that I can help get this override loading.

1 Like

Xorg. And MATE will get updates from GPD somewhere in October according to their update at Indiegogo.

I’ve started looking into kernel patch by @PeterCxy and thinking to make it a standalone custom driver: This way no kernel patching needs to be done.

Considering how much issues with BIOS GPD is having I really doubt we’ll have some BIOS level fix in the nearest future.

1 Like

Honestly, the easiest way is to just preload the proper CPIO image - this prevents the need for any kernel or driver package changes that need to be maintained. The only time that CPIO image would need to be updated is if the BIOS changes.

I’m unsure of what the issue is in Ubuntu, but I’m installing it now to work through it. The end result should be a few lines of grub updating that should persist through kernel updates and whatnot. No custom kernel. No custom drivers.

1 Like

Installed standard 64 bit Ubuntu Mate on a USB stick. This should work through any standard Ubuntu kernel updates or package updates. The only time this would stop working is if another version of the GPD BIOS is used (either a version older than v0.23 or newer version). And if a newer version comes out, I will create a new CPIO image for that BIOS version.

This should also work on any Ubuntu variant and the generalized instructions should work for any distribution that uses grub. (Not sure if all distros use grub-mkconfig and /etc/grub.d, but the instructions should be similar.)

  1. Download acpi_override_23
  2. (As root/sudo), placed acpi_override_23 in /boot
  3. Edited /etc/grub.d/10_linux - changed line :225 from initrd ${rel_dirname}/${initrd} to initrd /boot/acpi_override_23 ${rel_dirname}/${initrd}
  4. sudo grub-mkconfig -o /boot/grub/grub.cfg
  5. Rebooted to a working touchscreen

Video of this working in Ubuntu Mate

1 Like
  1. I’m trying to do that in Arch Linux.
  2. Exactly that solution resulting “initrd /boot/acpi_override_23 /boot/initramfs-linux.img” grub config line doesn’t boot at all. It is hanging after the line “Booting Arch Linux…” and nothing is happening.

I suspect this is related to kernel version or GRUB version. GRUB version is 2.04 and kernel is 5.2.11. What are the version in Ubuntu MATE?

Depending on how Arch was installed, you probably don’t need to preface the files with /boot. I use systemd-boot with Arch and EFI at /boot, and I never reference /boot in the loader entry.

I’ve put acpi_override in the same folder where initramfs-linux.img and kernel reside. The path is correct. With systemd-boot there are boot & acpi issues + touchscreen is not visible in the system at all but this patch is definitely applied.

To be precise that’s the whole grub.cfg: - see line #108 for override. This way system does not boot at all.

I’m unsure of what’s going on. If you’re not moving forward outside of grub, the issue is related to path or inability to determine the rootfs.

If I don’t mind originally you’ve been using Arch Linux to test the fix. Could you please share your mkinitcpio.conf? I suspect this is somehow related to GRUB unable to parse acpi_override as initramfs-linux.img is gzip compressed and acpi_override is not.

UPDATE: scratch that. I’ve tried to gzip acpi_override, but no luck. No override has happened.

UPDATE 2: It looks like GRUB actually applies the override with both acpi and initrd ways, but kernel simply doesn’t boot when they’re applied. It is not clear why is that so and looks to be an issue of my particular setup :frowning:

@naquad - I would honestly try systemd-boot over grub. It’s easy to install in Arch and it’s a lot more direct with less config bullshit than grub.

  1. bootctl-install
  2. Create an entry in /boot/loader/entries/arch.conf with:

title arch
linux /vmlinuz-linux
initrd /acpi_override_23
initrd /initramfs-linux.img
options rw

  1. Edit /boot/loader/loader.conf and make sure default is set to arch
  2. Reboot and make sure the EFI entry “Linux Boot Manager” is loaded

I already did so and the effect was 100% load of single core by kworker/0:2-kacpi_notify and no touchscreen in the system at all. But the override was applied successfully, yes.

P. S. Details in the comment above: Touchscreen Issue Resolved

Are you sure you used my acpi_override_23 instead of the one in PeterCxy’s Github releases page? When using his older acpi_override file on my machine with the v0.23 BIOS, I ran into power issues that sound similar to what you were experiencing.

naquad-gpd# ls -l
total 45576
-rw-r--r-- 1 root root   168448 сен 15 17:39 acpi_override
-rwxr-xr-x 1 root root   168448 сен 14 23:37 acpi_override.cpio
drwxr-xr-x 5 root root     4096 сен 15 17:41 grub
-rw-r--r-- 1 root root 30986814 сен 12 18:15 initramfs-linux-fallback.img
-rw-r--r-- 1 root root  9122565 сен 12 18:15 initramfs-linux.img
-rw-r--r-- 1 root root  6203776 сен 10 21:10 vmlinuz-linux
naquad-gpd# wget -q
naquad-gpd# cmp acpi_override_23 acpi_override; echo $?

Absolutely sure.

@joshwiththegoodhair I think there could be another issue: when I’ve been updating BIOS firmwares I’ve skipped a single version: I’ve updated with 0.22 and then 0.23, 0.21 was never applied. Could that be a reason?

UPD: @joshwiththegoodhair is that what you’re seein

g in your BIOS?

UPD 2: I can’t write more replies as a new user :frowning: @joshwiththegoodhair thank you for your help. It looks like this is something related to my system, no idea what it is or what to do about it. I’ll wait for another BIOS update and see what happens. Thank you for your help.

I don’t think that would be an issue. The BIOS flasher completely erases the previous BIOS before flashing the new version.

I’m honestly unsure of what’s going on. I would like to see others try to apply this CPIO image in Ubuntu+grub (now that there’s instructions on how to do so) to see if they have issues with the touchscreen working.