chimeraos icon indicating copy to clipboard operation
chimeraos copied to clipboard

Aya Neo Next Touchscreen Unresponsive

Open minznerjosh opened this issue 1 year ago • 12 comments

Device Version Aya Neo Next (non-pro) 1tb

ChimeraOS Info OS Version: 34 OS Build: 4bcc5f6 Kernel Version: 5.18.14-arch1-1 BIOS Version: V1.16_P4C0M43

Issue The touch screen on the device does not respond to input. I found some discussion of the issue on the chimera discord server but appears no solution was discovered.

minznerjosh avatar Sep 02 '22 10:09 minznerjosh

I somehow managed to get the touchscreen working!

I ssh'd in, cd'd into the /lib/modules/5.18.14-arch1-1/kernel/drivers/input/touchscreen directory, ran sudo rmmod goodix_ts, and then sudo insmod goodix_ts.ko.zst.

~What's surprising to me is that it continues to work even after full reboots!~ I'm too much of a linux noob to understand how this fix worked. Perhaps somebody more experienced could help figure out if there's a way to make it work out-of-the-box going forward.

minznerjosh avatar Sep 04 '22 19:09 minznerjosh

Okay I spoke too soon. The fix continues to work if I restart my NEXT, but if I shut it down and then power it back on the touchscreen ceases to function unless I run the above commands again.

minznerjosh avatar Sep 04 '22 20:09 minznerjosh

Turns out the only thing I need to run after startup to get the touchscreen working is sudo modprobe goodix_ts

minznerjosh avatar Sep 04 '22 20:09 minznerjosh

Here's how I'm hacking around the issue:

  1. Prevented the goodix_ts module from loading automatically by adding blacklist goodix_ts to /etc/modprobe.d/system-tweaks.conf (not sure if this is actually necessary)
  2. Created a systemd service /etc/systemd/system/touchscreen-fix.service containing:
    [Unit]
    Description=Touchscreen fix
    
    [Service]
    Type=oneshot
    ExecStart=modprobe goodix_ts
    ExecStart=rmmod goodix_ts
    ExecStart=modprobe goodix_ts
    
    [Install]
    WantedBy=multi-user.target
    
  3. Started and enabled it with sudo systemctl start touchscreen-fix and sudo systemctl enable touchscreen-fix

The hack seems to be working well so far. I can fully shut down and start the device and the touchscreen works!

minznerjosh avatar Sep 04 '22 21:09 minznerjosh

Oh this is great info. There is an easier way to handle loading modules at boot time though, it's already built into systemd.

Can you try the following:

  • Make a file /etc/modules-load.d/goodix_ts.conf
  • add the module name to the file on line one

Here is an example: https://github.com/ShadowBlip/HandyGCCS/blob/main/handycon.conf

If that works you can submit a PR to include that file. It's simple enough it may be able to be incorporated in the v35 release if it doesn't interfere with other touchscreens. I don't anticipate it would.

pastaq avatar Sep 05 '22 17:09 pastaq

Also, can you take a snapshot of the journalctl and/or dmesg when you modprobe manually, it may help identify the root cause and enable a patch for the driver.

pastaq avatar Sep 05 '22 17:09 pastaq

Your suggestion is what I tried first with no success. ☹️ What's weird is that when I ran lsmod after trying the modules-load.d approach, I did see goodix_ts listed! But the touch screen was still unresponsive... I had to sudo rmmod goodix_ts && sudo modprobe goodix_ts to get it working.

Here are the results of journalctl when I sudo modprobe goodix_ts:

Sep 05 16:36:51 chimeraos dbus-daemon[510]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.144' (uid=0 pid=14252 comm="sudo modprobe goodix_ts")
Sep 05 16:36:51 chimeraos dbus-daemon[510]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.home1.service': Unit dbus-org.freedesktop.home1.service not found.
Sep 05 16:36:51 chimeraos sudo[14252]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Sep 05 16:36:51 chimeraos audit[14252]: USER_ACCT pid=14252 uid=1000 auid=1000 ses=5 msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="gamer" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Sep 05 16:36:51 chimeraos sudo[14252]:    gamer : TTY=pts/1 ; PWD=/home/gamer ; USER=root ; COMMAND=/usr/bin/modprobe goodix_ts
Sep 05 16:36:51 chimeraos audit[14252]: CRED_REFR pid=14252 uid=1000 auid=1000 ses=5 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Sep 05 16:36:51 chimeraos kernel: audit: type=1101 audit(1662410211.368:602): pid=14252 uid=1000 auid=1000 ses=5 msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="gamer" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Sep 05 16:36:51 chimeraos kernel: audit: type=1110 audit(1662410211.368:603): pid=14252 uid=1000 auid=1000 ses=5 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Sep 05 16:36:51 chimeraos sudo[14252]: pam_unix(sudo:session): session opened for user root(uid=0) by gamer(uid=1000)
Sep 05 16:36:51 chimeraos audit[14252]: USER_START pid=14252 uid=1000 auid=1000 ses=5 msg='op=PAM:session_open grantors=pam_systemd_home,pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Sep 05 16:36:51 chimeraos kernel: audit: type=1105 audit(1662410211.371:604): pid=14252 uid=1000 auid=1000 ses=5 msg='op=PAM:session_open grantors=pam_systemd_home,pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Sep 05 16:36:51 chimeraos kernel: Goodix-TS i2c-GDIX1002:00: supply AVDD28 not found, using dummy regulator
Sep 05 16:36:51 chimeraos kernel: Goodix-TS i2c-GDIX1002:00: supply VDDIO not found, using dummy regulator
Sep 05 16:36:51 chimeraos kernel: Goodix-TS i2c-GDIX1002:00: Unexpected ACPI resources: gpio_count 1, gpio_int_idx 0
Sep 05 16:36:51 chimeraos kernel: Goodix-TS i2c-GDIX1002:00: ID 911, version: 1060
Sep 05 16:36:51 chimeraos kernel: input: Goodix Capacitive TouchScreen as /devices/platform/AMDI0010:00/i2c-0/i2c-GDIX1002:00/input/input19
Sep 05 16:36:51 chimeraos sudo[14252]: pam_unix(sudo:session): session closed for user root
Sep 05 16:36:51 chimeraos audit[14252]: USER_END pid=14252 uid=1000 auid=1000 ses=5 msg='op=PAM:session_close grantors=pam_systemd_home,pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Sep 05 16:36:51 chimeraos audit[14252]: CRED_DISP pid=14252 uid=1000 auid=1000 ses=5 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Sep 05 16:36:51 chimeraos kernel: audit: type=1106 audit(1662410211.488:605): pid=14252 uid=1000 auid=1000 ses=5 msg='op=PAM:session_close grantors=pam_systemd_home,pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
Sep 05 16:36:51 chimeraos kernel: audit: type=1104 audit(1662410211.488:606): pid=14252 uid=1000 auid=1000 ses=5 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'

Here's dmesg:

[ 1019.655321] audit: type=1101 audit(1662410603.881:686): pid=18178 uid=1000 auid=1000 ses=5 msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="gamer" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
[ 1019.655618] audit: type=1110 audit(1662410603.881:687): pid=18178 uid=1000 auid=1000 ses=5 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
[ 1019.656768] audit: type=1105 audit(1662410603.881:688): pid=18178 uid=1000 auid=1000 ses=5 msg='op=PAM:session_open grantors=pam_systemd_home,pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
[ 1019.767068] Goodix-TS i2c-GDIX1002:00: supply AVDD28 not found, using dummy regulator
[ 1019.767124] Goodix-TS i2c-GDIX1002:00: supply VDDIO not found, using dummy regulator
[ 1019.767170] Goodix-TS i2c-GDIX1002:00: Unexpected ACPI resources: gpio_count 1, gpio_int_idx 0
[ 1019.767717] Goodix-TS i2c-GDIX1002:00: ID 911, version: 1060
[ 1019.772948] input: Goodix Capacitive TouchScreen as /devices/platform/AMDI0010:00/i2c-0/i2c-GDIX1002:00/input/input23
[ 1019.773520] audit: type=1106 audit(1662410603.998:689): pid=18178 uid=1000 auid=1000 ses=5 msg='op=PAM:session_close grantors=pam_systemd_home,pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
[ 1019.773566] audit: type=1104 audit(1662410603.998:690): pid=18178 uid=1000 auid=1000 ses=5 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_env,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'

minznerjosh avatar Sep 05 '22 20:09 minznerjosh

Okay here's something more telling! journalctl when I run sudo modprobe goodix_ts the very first time on a fresh start with my fix disabled:

Sep 05 16:46:52 chimeraos sudo[8826]: pam_unix(sudo:session): session opened for user root(uid=0) by gamer(uid=1000)
Sep 05 16:46:52 chimeraos kernel: kauditd_printk_skb: 1 callbacks suppressed
Sep 05 16:46:52 chimeraos kernel: audit: type=1100 audit(1662410812.965:530): pid=8826 uid=1000 auid=1000 ses=3 msg='op=PAM:authentication grantors=pam_faillock,pam_permit,pam_faillock acct="gamer" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Sep 05 16:46:52 chimeraos kernel: audit: type=1101 audit(1662410812.965:531): pid=8826 uid=1000 auid=1000 ses=3 msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="gamer" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Sep 05 16:46:52 chimeraos kernel: audit: type=1110 audit(1662410812.965:532): pid=8826 uid=1000 auid=1000 ses=3 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Sep 05 16:46:52 chimeraos kernel: audit: type=1105 audit(1662410812.965:533): pid=8826 uid=1000 auid=1000 ses=3 msg='op=PAM:session_open grantors=pam_systemd_home,pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Sep 05 16:46:52 chimeraos kernel: Goodix-TS i2c-GDIX1002:00: supply AVDD28 not found, using dummy regulator
Sep 05 16:46:52 chimeraos kernel: Goodix-TS i2c-GDIX1002:00: supply VDDIO not found, using dummy regulator
Sep 05 16:46:52 chimeraos kernel: Goodix-TS i2c-GDIX1002:00: Unexpected ACPI resources: gpio_count 1, gpio_int_idx 0
Sep 05 16:46:52 chimeraos kernel: Goodix-TS i2c-GDIX1002:00: Error reading 1 bytes from 0x8140: -121
Sep 05 16:46:53 chimeraos kernel: Goodix-TS i2c-GDIX1002:00: Error reading 1 bytes from 0x8140: -121
Sep 05 16:46:53 chimeraos sudo[8826]: pam_unix(sudo:session): session closed for user root
Sep 05 16:46:53 chimeraos audit[8826]: USER_END pid=8826 uid=1000 auid=1000 ses=3 msg='op=PAM:session_close grantors=pam_systemd_home,pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Sep 05 16:46:53 chimeraos audit[8826]: CRED_DISP pid=8826 uid=1000 auid=1000 ses=3 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Sep 05 16:46:53 chimeraos kernel: Goodix-TS i2c-GDIX1002:00: I2C communication failure: -121
Sep 05 16:46:53 chimeraos kernel: Goodix-TS: probe of i2c-GDIX1002:00 failed with error -121
Sep 05 16:46:53 chimeraos kernel: audit: type=1106 audit(1662410813.025:534): pid=8826 uid=1000 auid=1000 ses=3 msg='op=PAM:session_close grantors=pam_systemd_home,pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Sep 05 16:46:53 chimeraos kernel: audit: type=1104 audit(1662410813.025:535): pid=8826 uid=1000 auid=1000 ses=3 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'

minznerjosh avatar Sep 05 '22 20:09 minznerjosh

So it looks like the enable + disable + enable part of my fix is important. For whatever reason, the driver fails to load the first time, but succeeds the second time. Fun! 🙄

minznerjosh avatar Sep 05 '22 20:09 minznerjosh

I managed to find some relevant info an a linux kernel bug report!

https://bugzilla.kernel.org/show_bug.cgi?id=209061#c37

I am having this same issue on an Aya Neo Next using 5.12 Kernel, I have also tried 5.16 and the issue persists. its the same error from the post about in the dmesg.

https://bugzilla.kernel.org/show_bug.cgi?id=209061#c50

Ok, I think I know what is going on.

For a quick test, on a 5.18 or 5.19 kernel try doing:

sudo rmmod goodix_ts sudo modprobe goodix_ts

I expect that will actually make the touchscreen work, although it is possible that the first failed probe has confused the hw to a point where this does not help.

So regardless of the outcome please also try building a 5.18 or 5.19 kernel with this patch attached. I expect this to fix things for you.

So confirmed that starting it twice is key!

Here's the patch that supposedly fixes this issue: https://bugzilla.kernel.org/attachment.cgi?id=301218

I see it in the linux's main branch: https://github.com/torvalds/linux/blob/53e99dcff61e1523ec1c3628b2d564ba15d32eb7/drivers/input/touchscreen/goodix.c#L895-L904

It was released in Kernel 5.19.

But ChimeraOS currently ships 5.18! So there ya go. If/when ChimeraOS ships 5.19, this will be fixed. Are there any plans to ship an updated kernel version?

minznerjosh avatar Sep 05 '22 22:09 minznerjosh

v35 should ship.with 5.19.6 if everything tests good. Are you willing to try the unstable image to verify? That currently has 5.19.6.

pastaq avatar Sep 06 '22 00:09 pastaq

ChimeraOS 35 was just released with kernel 5.19.9.

Is this issue resolved?

alkazar avatar Sep 21 '22 00:09 alkazar

@alkazar confirmed all is working now!

minznerjosh avatar Oct 06 '22 18:10 minznerjosh