Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dtoverlay settings in /boot/config.txt sporadically applied depending on i2c address / temperature, solution? #131

Open
fhb opened this issue May 16, 2021 · 4 comments

Comments

@fhb
Copy link

fhb commented May 16, 2021

Bug description and reproduction steps

I'm trying to rotate the display and the touch-overlay from portrait to landscape.

I tried both the one-line-installation for the rpi4 with and without "experimental touch fix".

The command "hyperpixel4-rotate left" led to a correct display rotation with inverted touch-overlay and also the rotation did not persist after reboot, so I rotated back with hyperpixel4-rotate normal.

I then edited /boot/config.txt
out-commenting:
#dtoverlay=vc4-fkms-v3d
and adding
display_lcd_rotate=3
and then
dtparam=touchscreen-swapped-x-y=1
dtparam=touchscreen-inverted-x=1
after
dtoverlay=hyperpixel4
or instead writing
dtoverlay=hyperpixel4, touchscreen-swapped-x-y=1, touchscreen-inverted-x=1

complete config.txt:
https://gist.github.com/fhb/4f45b8d86cfb7bb011703334c275983f

This led to a temporary solution with both screens and touch-overlay being rotated properly. But after a reboot of the RPI I'm stuck with the touchscreen x-axis being inverted and my settings in /config.txt regarding the dtoverlay don't seem to have an effect. Reading through the documentation and the documented issues I found that the touchscreen driver tries to connect through i2c to the addresses 0x5d and 0x14, one of them failing. The cause of the dtoverlay settings in /boot/config.txt being applied or ignored seems to be related to the temperature dependent address switch. After shutting down and letting the display and rip4 cool down, the touchscreen connects to 0x14 and the dtoverlay settings get applied. After a "hot" reboot and the touchscreen being connected to 0x5d the setting gets ignored. This seems to be a consistent finding.

  • How do you suggest getting the settings applied to both cases?

  • Is the "experimental touch fix" offered by the installer what's been described as trying to reach both display addresses in Touchscreen fails to connect at boot (Pi 4) #41?

  • Is the i2c error documented below expected behaviour due to trying both addresses in the "experimental touch fix" version?

  • Is my hyperpixel4 already a hardware revised model or can the hardware fix with a 1meg resistor still be applied?

  • I suppose the "experimental touch fix" is not necessary after a the hardware fix?

  • How relevant is the order of instructions in /boot/config.txt? Could this also be the cause of ignored dtoverlay settings?

Your HyperPixel 4 Rectangular, Touch, purchased a week ago, connected via gpio

Your Raspberry Pi RPI4 Revision : b03114 with OctoPi, Raspbian GNU/Linux 10 (buster) 5.10.17-v7l+

Extra debugging information

  • dmesg | grep Goodix for HyperPixel 4.0" Rectangular warm/settings ignored

[ 5.959145] Goodix-TS 11-005d: ID 911, version: 1060
[ 5.983433] Goodix-TS 11-005d: Checking firmware
[ 5.985364] input: Goodix Capacitive TouchScreen as /devices/platform/i2c@0/i2c-11/11-005d/input/input1
[ 5.987206] Goodix-TS 11-0014: i2c test failed attempt 1: -6
[ 6.034212] Goodix-TS 11-0014: i2c test failed attempt 2: -6
[ 6.083566] Goodix-TS 11-0014: I2C communication failure: -6

  • dmesg | grep Goodix for HyperPixel 4.0" Rectangular cold/settings applied

[ 6.241638] Goodix-TS 11-005d: i2c test failed attempt 1: -6
[ 6.274569] Goodix-TS 11-005d: i2c test failed attempt 2: -6
[ 6.323971] Goodix-TS 11-005d: I2C communication failure: -6
[ 6.326096] Goodix-TS 11-0014: ID 911, version: 1060
[ 6.350466] Goodix-TS 11-0014: Checking firmware

  • ls /dev/i2c-*

/dev/i2c-11

  • i2cdetect -y 11

    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- UU -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --

@fhb fhb changed the title dtoverlay settings in /boot/config.txt sporadically applied, cause and solution? dtoverlay settings in /boot/config.txt poradically applied depending on i2c address / temperature, solution? May 16, 2021
@fhb fhb changed the title dtoverlay settings in /boot/config.txt poradically applied depending on i2c address / temperature, solution? dtoverlay settings in /boot/config.txt sporadically applied depending on i2c address / temperature, solution? May 16, 2021
@fhb
Copy link
Author

fhb commented May 19, 2021

There is also flickering and ghosting when connected to 0x5d as you can see in this short video of the display: https://www.dropbox.com/s/y98anzsv20uu9a4/IMG_3753.MOV?dl=0

@Gadgetoid
Copy link
Member

It looks like you've got a mix of old and new settings in your /boot/config.txt-

The non-fix settings are:

dtoverlay=hyperpixel4
dtparam=touchscreen-swapped-x-y=1
dtparam=touchscreen-inverted-x=1

You need to remove these and, instead, add the touchscreen settings under each instance of the touchscreen overlays, like so:

dtoverlay=hyperpixel4-common
dtoverlay=hyperpixel4-0x14
dtparam=touchscreen-swapped-x-y=1
dtparam=touchscreen-inverted-x=1
dtoverlay=hyperpixel4-0x5d
dtparam=touchscreen-swapped-x-y=1
dtparam=touchscreen-inverted-x=1

This should ensure that both 0x14 and 0x5d are configured to match.

I'm a little out of touch with HyperPixel 4 and don't know what's causing the flickering/ghosting. From what I understood with the i2c address switch, it was a race condition during bootup that caused the i2c select pin to be pulled. It shouldn't have any bearing on the display driver at all.

@fhb
Copy link
Author

fhb commented May 20, 2021

Thank you! Setting it this way I don't have to swap the x/y-axis:
https://gist.github.com/fhb/1bf17c090baa2d33301b622b26505b6c

#dtoverlay=vc4-fkms-v3d  
display_lcd_rotate=3  
dtoverlay=hyperpixel4-common  
dtoverlay=hyperpixel4-0x14  
#dtparam=touchscreen-swapped-x-y=1  
dtparam=touchscreen-inverted-x=1  
dtoverlay=hyperpixel4-0x5d  
#dtparam=touchscreen-swapped-x-y=1  
dtparam=touchscreen-inverted-x=1

I'll keep watching but the issue might be resolved with your solution.

The installation of the Hyperpixel 4.0 is far from plug and play and has incomplete instructions.

@Gadgetoid
Copy link
Member

There is also flickering and ghosting when connected to 0x5d as you can see in this short video of the display: https://www.dropbox.com/s/y98anzsv20uu9a4/IMG_3753.MOV?dl=0

I've just seen this flickering on a Pi 400 when detected as 0x5d. A cold boot seemed to fix it. And also the i2c. I wonder if there's something weirder going on with the pin state when hot-plugging/rebooting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants