Hyperpixel 4.0 digitiser not working

Hi.

I got Hyperpixel 4 to work in Volumio 2.673 on a Raspberry PI 2 Model B. The screen works perfectly (very nice!), but I cannot make the touch capability work (no /dev/input/touchscreen node).

In dmseg, I can see that the goodix driver is not being loaded at boot:

[   10.926918] i2c /dev entries driver
[   11.011425] systemd-udevd[176]: starting version 215
[   11.539022] gpio-10 (i2c@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[   11.539134] gpio-11 (i2c@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[   11.541982] i2c-gpio i2c@0: using lines 10 (SDA) and 11 (SCL)
[   11.674806] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[   11.677763] bcm2835_vc_sm_cma_probe: Videocore shared memory driver

In /var/log/boot.log, the screen is correctly initiated:

[ OK ] Started HyperPixel 4.0" LCD Display Initialization.

The i2cdetect shows:

volumio@volumio:~$ sudo i2cdetect -y 3
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- 5d -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Then, tt is in present in /sys/bus/i2c/devices/i2c-3

volumio@volumio:/sys/bus/i2c/devices/i2c-3$ ls -latr
total 0
drwxr-xr-x 4 root root    0 Dec 15 14:44 ..
-rw-r--r-- 1 root root 4096 Dec 15 14:44 uevent
lrwxrwxrwx 1 root root    0 Dec 15 14:44 subsystem -> ../../../../bus/i2c
-r--r--r-- 1 root root 4096 Dec 15 14:44 name
drwxr-xr-x 3 root root    0 Dec 15 14:44 i2c-dev
drwxr-xr-x 4 root root    0 Dec 15 14:44 .
drwxr-xr-x 2 root root    0 Dec 15 14:51 power
lrwxrwxrwx 1 root root    0 Dec 15 14:51 of_node -> ../../../../firmware/devicetree/base/i2c@0
--w------- 1 root root 4096 Dec 15 14:51 new_device
lrwxrwxrwx 1 root root    0 Dec 15 14:51 device -> ../../i2c@0
--w------- 1 root root 4096 Dec 15 14:51 delete_device
volumio@volumio:/sys/bus/i2c/devices/i2c-3$ cat name
i2c@0
volumio@volumio:/sys/bus/i2c/devices/i2c-3$ cat uevent
OF_NAME=i2c
OF_FULLNAME=/i2c@0
OF_COMPATIBLE_0=i2c-gpio
OF_COMPATIBLE_N=1
volumio@volumio:/sys/bus/i2c/devices/i2c-3$

But /proc/bus/input/devices is empty.

If I do a sudo modprobe goodix, it is loaded with no error, but still the digitiser do not work.

This is the goodix module info:

volumio@volumio:/sys/bus/i2c/devices/i2c-3$ sudo modinfo goodix
filename:       /lib/modules/4.19.79-v7+/kernel/drivers/input/touchscreen/goodix.ko
license:        GPL v2
description:    Goodix touchscreen driver
author:         Bastien Nocera <hadess@hadess.net>
author:         Benjamin Tissoires <benjamin.tissoires@gmail.com>
srcversion:     BA08C10B4BAF0E8784AAD02
alias:          i2c:GDIX1001:00
alias:          of:N*T*Cgoodix,gt967C*
alias:          of:N*T*Cgoodix,gt967
alias:          of:N*T*Cgoodix,gt928C*
alias:          of:N*T*Cgoodix,gt928
alias:          of:N*T*Cgoodix,gt9271C*
alias:          of:N*T*Cgoodix,gt9271
alias:          of:N*T*Cgoodix,gt927C*
alias:          of:N*T*Cgoodix,gt927
alias:          of:N*T*Cgoodix,gt912C*
alias:          of:N*T*Cgoodix,gt912
alias:          of:N*T*Cgoodix,gt9110C*
alias:          of:N*T*Cgoodix,gt9110
alias:          of:N*T*Cgoodix,gt911C*
alias:          of:N*T*Cgoodix,gt911
alias:          of:N*T*Cgoodix,gt1151C*
alias:          of:N*T*Cgoodix,gt1151
depends:
intree:         Y
name:           goodix
vermagic:       4.19.79-v7+ SMP mod_unload modversions ARMv7 p2v8
volumio@volumio:/sys/bus/i2c/devices/i2c-3$

It’s almost, almost done.

What could be missing?

I would love to use this touchscreen.

Thanks!

Hi.

No help?

I have compared the results with a Raspbian Buster installation, where the touchscreen works properly under /dev/input/event0

I have noticed in Volumio that only below /sys/bus/i2c/devices/ there is a i2c-3 folder, but no 3-005d, like in Raspbian.

In Volumio:

volumio@volumio:~$ udevadm info /sys/bus/i2c/devices/i2c-3                      P: /devices/platform/i2c@0/i2c-3
E: DEVPATH=/devices/platform/i2c@0/i2c-3
E: OF_COMPATIBLE_0=i2c-gpio
E: OF_COMPATIBLE_N=1
E: OF_FULLNAME=/i2c@0
E: OF_NAME=i2c
E: SUBSYSTEM=i2c

but in Raspbian:

pi@raspberrypi:~ $ udevadm info /sys/bus/i2c/devices/i2c-3
P: /devices/platform/i2c@0/i2c-3
L: 0
E: DEVPATH=/devices/platform/i2c@0/i2c-3
E: OF_NAME=i2c
E: OF_FULLNAME=/i2c@0
E: OF_COMPATIBLE_0=i2c-gpio
E: OF_COMPATIBLE_N=1
E: SUBSYSTEM=i2c

pi@raspberrypi:~ $ udevadm info /sys/bus/i2c/devices/3-005d
P: /devices/platform/i2c@0/i2c-3/3-005d
L: 0
E: DEVPATH=/devices/platform/i2c@0/i2c-3/3-005d
E: DRIVER=Goodix-TS
E: OF_NAME=ft6236
E: OF_FULLNAME=/i2c@0/ft6236@5d
E: OF_COMPATIBLE_0=goodix,gt911
E: OF_COMPATIBLE_N=1
E: MODALIAS=of:Nft6236T<NULL>Cgoodix,gt911
E: SUBSYSTEM=i2c

If I execute in volumio:

volumio@volumio:~$ udevadm trigger --dry-run --verbose --type=devices --subsystem-match=i2c
/sys/devices/platform/i2c@0/i2c-3

but in Raspbian, there is an additional line:

pi@raspberrypi:~ $ udevadm trigger --dry-run --verbose --type=devices --subsystem-match=i2c
/sys/devices/platform/i2c@0/i2c-3
/sys/devices/platform/i2c@0/i2c-3/3-005d

It is like the goodix module driver is not loaded because it is not needed and if it is forced to be loaded, it is not attached to the device as expected.

Is it possible to solve it?

BTW, systemctl -f does not give any useful information.

Thanks!

Hi @darioml ,
Did you have any luck with this? I have the exact same situation as you, trying to get the Hyperpixel 4.0 touchscreen to work on Volumio 2.713. I have posted on the Volumio forum and Hyperpixel Github, but haven’t had any success yet.

Hi.

I’m so glad somebody is trying the same.

Sorry, no progress with Volumio. I expected much much more support from Volumio community and even more from Pimoroni, which has so many devices for the Raspberry and should be collaborating with all (or at least the most important) projects which use their gadgets. I’m very disappointed with this situation.

Anyway, this great screen is working perfectly with Moode Audio. The thing is that the UI is quite less user friendly than Volumio and I’m not very pleased with it.

I hope Volumio supports soon this screen.

I guess it’s something kernel related, which is not properly configured to load the module, because it is detected, the module looks correctly compiled, but it is not properly loaded and/or integrated, even by force.

I expected Pimoroni gave directions to Volumio to solve this issue, but it seems they are not interested. Not even an answer…

If you’re seeing the i2c address 0x5d instead of 0x14 then you should be using the HyperPixel 4 drivers from here- https://github.com/pimoroni/hyperpixel4/tree/pi4-i2c-fix

Thanks for the reply. I’ll try this evening.

But, I am using a Raspberry 2 Model B, instead of a Raspberry 4. Can I use the driver you are pointing, which seems to be just for the Raspberry 4?

Thanks!

No luck for me unfortunately. Same situation as before. Surprised the Pi4 display driver worked on a Pi3b+ though! Oh well, we continue!

I was wrong! Once I’d installed the correct branch I did have some luck. the touchscreen is now detected and responds coarsely to input, albeit 90 degrees out of rotation. Be sure to use installation command sudo git clone https://github.com/pimoroni/hyperpixel4 -b pi4-i2c-fix. I’ll investigate how to resolve the rotation issues. for now, using sudo hyperpixel4-rotate normal leads to the following errors:

Can't open display 
Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
ImportError: No module named screenlayout
Setting matrix: 1 0 0 0 1 0
/usr/bin/hyperpixel4-rotate: line 10: xinput: command not found
Saving touch settings to /etc/udev/rules.d/98-hyperpixel4-calibration.rules

Great, it worked! Surprisingly, in a RPi 2 Model B, instead of RPi4, as stated in that branch.

@Tom4c, fortunately, the orientation is ok for me as it is now.

Extract of dmesg

[   11.936550] systemd-udevd[196]: starting version 215
[   12.484625] gpio-10 (i2c@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[   12.484721] gpio-11 (i2c@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[   12.485369] i2c-gpio i2c@0: using lines 10 (SDA) and 11 (SCL)
[   12.552514] media: Linux media interface: v0.10
[   12.580386] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[   12.585677] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[   12.585700] [vc_sm_connected_init]: start
[   12.602855] [vc_sm_connected_init]: installed successfully
[   12.698980] videodev: Linux video capture interface: v2.00
[   12.857166] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[   12.952116] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[   12.984987] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[   13.000906] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[   13.000969] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[   13.020394] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[   13.020507] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[   13.028806] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[   13.028862] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[   13.174275] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[   13.176082] snd_bcm2835: unknown parameter 'index' ignored
[   13.186479] bcm2835_audio soc:audio: card created with 8 channels
[   13.290446] Goodix-TS 3-005d: ID 911, version: 1060
[   13.342645] input: Goodix Capacitive TouchScreen as /devices/platform/i2c@0/i2c-3/3-005d/input/input0
[   13.346687] irq: type mismatch, failed to map hwirq-27 for gpio@7e200000!
[   13.347620] Goodix-TS 3-0014: i2c test failed attempt 1: -6
[   13.383786] Goodix-TS 3-0014: i2c test failed attempt 2: -6
[   13.422887] Goodix-TS 3-0014: I2C communication failure: -6
[   14.303469] systemd-journald[168]: Received request to flush runtime journal from PID 1
[   14.719011] Under-voltage detected! (0x00050005)
[   14.806774] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   14.876614] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   14.878234] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[   14.878253] cfg80211: failed to load regulatory.db
[   16.085524] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   17.705288] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC1E1
[   18.872870] Voltage normalised (0x00000000)
[   31.311392] random: crng init done
[   31.311410] random: 7 urandom warning(s) missed due to ratelimiting
[   36.217833] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[   60.211433] FS-Cache: Netfs 'cifs' registered for caching
[   60.212094] Key type cifs.spnego registered
[   60.212117] Key type cifs.idmap registered
[   60.213511] No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.

/proc/bus/input/devices is not empty anymore:

volumio@volumio:~$ cat /proc/bus/input/devices
I: Bus=0018 Vendor=0416 Product=038f Version=1060
N: Name="Goodix Capacitive TouchScreen"
P: Phys=input/ts
S: Sysfs=/devices/platform/i2c@0/i2c-3/3-005d/input/input0
U: Uniq=
H: Handlers=kbd mouse0 event0
B: PROP=2
B: EV=b
B: KEY=400 0 0 0 0 0 0 20000000 0 0 0
B: ABS=2658000 3

It seems that it is solved!

Could you properly document it, so everybody could use this fix?

Thanks!

Hi @darioml,
I’m really pleased yours works. Odd that it does work. Which orientation are you in? I had to add display_lcd_rotate=1 to /boot/config.txt to get the display to match the fixed touchscreen orientation. Did you do anything different?

For reference, my latest process is as follows:
1. Install Volumio 2.713 and Touch Display 1.1.6 Plugin
2. -restart-
3. sudo apt update
4. sudo apt install apt-utils
5. sudo apt install device-tree-compiler
6. sudo apt-get install rpi.gpio
7. -restart-
8. sudo git clone https://github.com/pimoroni/hyperpixel4 -b pi4-i2c-fix
9. cd hyperpixel4
10. sudo ./install.sh
11. -restart-
12. sudo nano /boot/config.txt
13. add display_lcd_rotate=1 as a single line toward the end of the script.
14. -restart-

Hopefully that’s all that other people might need. As you know, I have more to do and it’s being tracked here: https://github.com/pimoroni/hyperpixel4/issues/58. But in the interests of being neat and tidy we’ve hopefully done enough for you to close it as solved :-)

Hi.

I have it in landscape orientation and it works perfectly.

As a reference, I did not do your step 3. sudo apt update, since I read it could break Volumio.

Instead of your step 6. sudo apt-get install rpi.gpio, I downloaded that package from

https://sourceforge.net/projects/raspberry-gpio-python/files/raspbian-stretch/

and installed it by

dpkg -i python-rpi.gpio_0.6.5~stretch-1_armhf.deb

I guess they are equivalent, but yours install it for python3, as well.

My config.txt differs from yours only that instead of display_lcd_rotate=1, I have display_rotate=1. This flag comes from the pi3 branch and it seems to work, but I don’t know if the difference is relevant.

Without the display_rotate=1 flag in the config.txt file, the screen was working perfectly in portrait orientation.

Thanks for your help!