RESOLVED: a64-pine64+ goodix touchscreen (i2c) fails to load on reboot


 Share

1 1

Recommended Posts

Armbianmonitor:

 5.10.4-sunxi64 pine64 board with goodix 7" mipi-dsi LCD touchscreen.

 

The LCD output is working fine across reboots after enabling the dt overlay using armbian-config.

 

For the touchscreen, I have added "goodix" to /etc/modules and the digitizer works fine from all cold boots:

~$ dmesg | grep -i goodix
[    5.836601] Goodix-TS 1-005d: supply VDDIO not found, using dummy regulator
[    5.843605] Goodix-TS 1-005d: ID k}\xfa, version: 7b6f
[    5.866815] input: Goodix Capacitive TouchScreen as /devices/platform/soc/1c2ac00.i2c/i2c-1/1-005d/input/input5

 

but a reboot leads to either:

[    5.856172] Goodix-TS 1-005d: supply VDDIO not found, using dummy regulator
[    5.856668] Goodix-TS 1-005d: i2c test failed attempt 1: -6
[    5.886780] Goodix-TS 1-005d: ID k}\xfa, version: 7b6f
[    5.909817] input: Goodix Capacitive TouchScreen as /devices/platform/soc/1c2ac00.i2c/i2c-1/1-005d/input/input5

and the screen works

 

or:

$ dmesg | grep -i goodix
[    5.862909] Goodix-TS 1-005d: supply VDDIO not found, using dummy regulator
[    5.864033] Goodix-TS 1-005d: i2c test failed attempt 1: -6
[    5.889397] Goodix-TS 1-005d: i2c test failed attempt 2: -6
[    5.925072] Goodix-TS 1-005d: I2C communication failure: -6

 

a double reboot works.

 

It looks like the i2c bus is not being completely reset in time, but that multiple connection attempts  sometimes succeed.

 

Can anyone suggest a workaround, to force a reset, add more i2c test iterations or provide more time to load from reboot?

 

BR.

 

 

Link to post
Share on other sites

Armbian is a community driven open source project. Do you like to contribute your code?

Hi There, I think I have made some progress

 

This is what I did:

0) Attach a mouse and keyboard so you can type command while the Desktop is running.

 

1)Open a termonal and type:

   sudo apt-get install libts-bin

 

2) Calibrate with this command:
 
   sudo ts_calibrate

 

3) Put these lines in /etc/X11/xorg.conf.d/99-touch.conf

 

Section "InputClass"
    Identifier "Goodix Capacitive TouchScreen"
    Driver "tslib"
    MatchDevicePath "/dev/input/event*"
    MatchProduct "goodix"
EndSection

 

4) Reboot 

 

Now the position is correct but I miss the click :)

Link to post
Share on other sites

Actually to fix this, after step 2 I remove the 99-touch.conf file and added instead this file /etc/X11/xorg.conf.d/40-libinput.conf with this content:

 

Section "InputClass"
    Identifier "libinput touchscreen catchall"
    MatchIsTouchscreen "on"
    MatchDevicePath "/dev/input/event0"
    Driver "libinput"
    Option "Ignore" "on"
EndSection


Section "InputClass"
    Identifier "libinput touchscreen catchall"
    MatchIsTouchscreen "on"
    MatchDevicePath "/dev/input/event1"
    Driver "libinput"
    Option "Ignore" "on"
EndSection


Section "InputClass"
    Identifier "libinput touchscreen catchall"
    MatchIsTouchscreen "on"
    MatchDevicePath "/dev/input/event2"
    Driver "libinput"
    Option "Ignore" "on"
EndSection

 

It seems that there are multiple devices and you need to disable some of them to make this reliably work.

 

PLease let me know if this works for you, I hope this may help other people struggling with this!

 

Link to post
Share on other sites

Hi Lucapinello,

 

Thank you for the tip to make sure ts_uinput -d is running.   For me, the problem with reboot seems to be at a lower level (at goodix module load and before tslib gets loaded).

 

 I am trying to work out how to unload the goodix module before reboot, as a manual removal of the module leads to a working reboot, but am having some trouble writing a systemd service that runs early, before reboot

 

BR.

Link to post
Share on other sites

This is resolved now.  After reading https://www.raspberrypi.org/forums/viewtopic.php?t=216901 I created the following systemd service file:

 

Unit]
Description=unload the goodix driver ahead of reboots to allow it to properly load again when the system restarts

[Service]
ExecStop=/sbin/rmmod goodix
Type=oneshot
RemainAfterExit=true

[Install]
WantedBy=multi-user.target

 

System now comes up with working touchscreen every time:)                                                                                                                                                  ~                                                                                                                                                     ~                        

Link to post
Share on other sites

  • Learnincurve changed the title to RESOLVED: a64-pine64+ goodix touchscreen (i2c) fails to load on reboot

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

1 1