Bug 1786317 - Goodix touchscreen Kernel module not working after suspend
Summary: Goodix touchscreen Kernel module not working after suspend
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 31
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-24 11:15 UTC by Dahlhoff
Modified: 2020-11-04 12:17 UTC (History)
18 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 12:17:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
dmesg output. Also including modprobe output after suspend/sleep. (127.27 KB, text/plain)
2019-12-24 11:15 UTC, Dahlhoff
no flags Details
ACPIDump of Trekstor (353.75 KB, text/plain)
2019-12-24 20:28 UTC, Dahlhoff
no flags Details
goodix.c driver with patche to fix suspend/resume issues included (32.70 KB, text/plain)
2020-02-01 23:00 UTC, Hans de Goede
no flags Details

Description Dahlhoff 2019-12-24 11:15:26 UTC
Created attachment 1647495 [details]
dmesg output. Also including modprobe output after suspend/sleep.

1. Please describe the problem:

The Goodix touchscreen of the Trekstor Primetab S11B stops working after suspend. Unloading and loading the kernel module (goodix, insmod /lib/modules/5.3.15-300.fc31.x86_64/kernel/drivers/input/touchscreen/goodix.ko.xz) produces and error, but only after suspend.

Output of journal BEFORE SUSPEND when running ``rmmod goodix && modprobe -v goodix``:

kernel: Goodix-TS i2c-GDIX1001:00: i2c-GDIX1001:00 supply AVDD28 not found, using dummy regulator
kernel: Goodix-TS i2c-GDIX1001:00: i2c-GDIX1001:00 supply VDDIO not found, using dummy regulator
kernel: Goodix-TS i2c-GDIX1001:00: ID 928, version: 1040
kernel: input: Goodix Capacitive TouchScreen as /devices/pci0000:00/0000:00:16.3/i2c_designware.3/i2c-8/i2c-GDIX1001:00/input/input20

Output of journal AFTER SUSPEND when running rmmod goodix && modprobe -v goodix:

kernel: Goodix-TS i2c-GDIX1001:00: i2c-GDIX1001:00 supply AVDD28 not found, using dummy regulator
kernel: Goodix-TS i2c-GDIX1001:00: i2c-GDIX1001:00 supply VDDIO not found, using dummy regulator
kernel: Goodix-TS i2c-GDIX1001:00: ID 928, version: 1040
kernel: Goodix-TS i2c-GDIX1001:00: Invalid config (0, 0, 0), using defaults
kernel: input: Goodix Capacitive TouchScreen as /devices/pci0000:00/0000:00:16.3/i2c_designware.3/i2c-8/i2c-GDIX1001:00/input/input21

2. What is the Version-Release number of the kernel:

5.3.15-300.fc31.x86_64



3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :

Untested



4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:

* Boot the device, touchscreen works.
* run ``rmmod goodix && modprobe -v goodix`` -> works.
* Suspend the device and wake it up again. Touchscreen unresponsive. ``rmmod goodix && insmod -v goodix`` produces error.

Interesting note: When device is on AC power and the goodix module is unloaded before sleep/suspend, it SOMETIMES can be loaded after wakeup. 



5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:

yes

6. Are you running any modules that not shipped with directly Fedora's kernel?:

No



7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.



Note: Please contact me if you need further information on the product. I also run a Github repository on this product: https://github.com/bedawi/trekstor-s11b 
- Benjamin

Comment 1 Hans de Goede 2019-12-24 19:49:11 UTC
Benjamin, I happen to be working on some goodix.c changes related to issues like this. For starters, can you please provide an ACPI dump of the device:

sudo acpidump -o acpidump

And then attach the generated acpidump file here? Thanks.

Comment 2 Dahlhoff 2019-12-24 20:28:48 UTC
Created attachment 1647553 [details]
ACPIDump of Trekstor

acpidump attached

Comment 3 Dahlhoff 2019-12-24 20:33:13 UTC
@Hans: I attached the ACPIdump as requested. Many greetings. Benjamin

Comment 4 Hans de Goede 2019-12-28 21:51:56 UTC
Thank you for the acpidump.

I've started a test/scratch-build of a Fedora 31 kernel with some patches which will hopefully help:
https://koji.fedoraproject.org/koji/taskinfo?taskID=39964621

This is still building atm (this take a couple of hours), once it is done building please install the kernel, see:
https://fedorapeople.org/~jwrdegoede/kernel-test-instructions.txt
for instructions on directly installing a kernel from koji.

After installing, please boot into the new kernel, do a suspend/resume and after the suspend/resume do:

dmesg | grep GDIX

And copy and paste the output here. Also please try the touchscreen after the suspend/resume, with some luck it will still work...

Comment 5 Dahlhoff 2020-01-01 11:09:40 UTC
Problem is solved with Kernel 5.4.6-200.rhbz1786317.fc31.x86_64

Here is the output of ``dmesg | grep GDIX`` :

[   10.432254] Goodix-TS i2c-GDIX1001:00: i2c-GDIX1001:00 supply AVDD28 not found, using dummy regulator
[   10.432304] Goodix-TS i2c-GDIX1001:00: i2c-GDIX1001:00 supply VDDIO not found, using dummy regulator
[   10.432352] Goodix-TS i2c-GDIX1001:00: Using ACPI INTI and INTO methods for IRQ pin access
[   10.432867] Goodix-TS i2c-GDIX1001:00: ID 928, version: 1040
[   10.438820] input: Goodix Capacitive TouchScreen as /devices/pci0000:00/0000:00:16.3/i2c_designware.3/i2c-8/i2c-GDIX1001:00/input/input11
[   88.406392] Goodix-TS i2c-GDIX1001:00: Error reading config version: -121, resetting controller

Thanks @Hans de Goede. Let me know if you have more to be tested on the Trekstor S11B.

Comment 6 Hans de Goede 2020-01-01 14:40:02 UTC
Great, thank you for testing.

I will submit the patch series fixing this upstream. Once it has been accepted upstream I can also add (temporarily) the patches as downstream patches to the Fedora kernels.

For now, as a workaround, it is probably best if you stick with the 5.4.6-200.rhbz1786317.fc31.x86_64 kernel.

Comment 7 Dahlhoff 2020-01-31 20:58:28 UTC
(In reply to Hans de Goede from comment #6)
> Great, thank you for testing.
> 
> I will submit the patch series fixing this upstream. Once it has been
> accepted upstream I can also add (temporarily) the patches as downstream
> patches to the Fedora kernels.
> 
> For now, as a workaround, it is probably best if you stick with the
> 5.4.6-200.rhbz1786317.fc31.x86_64 kernel.

Hi Hans, thanks again for your work. 
Would it be possible to get the source code of your modified goodix.c and build a kernel module with dkms? If thats possible it would be helpful until the changes reached the Fedora Kernel.
- Ben

Comment 8 Hans de Goede 2020-02-01 23:00:32 UTC
Created attachment 1657060 [details]
goodix.c driver with patche to fix suspend/resume issues included

You can find the individual patches (all 10 of them) in my personal git tree:
https://github.com/jwrdegoede/linux-sunxi/commits/master

I'm also attaching the reesulting goodix.c file here.

Comment 9 Ben Cotton 2020-11-03 17:06:47 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Hans de Goede 2020-11-04 12:17:45 UTC
In the mean time the patches fixing this have landed quite a while ago, closing.


Note You need to log in before you can comment on or make changes to this bug.