Touch using Plugin and Pimoroni Hyperpixel 4.0 touchscreen d

I have a Pimoroni Hyperpixel 4.0 touchscreen display, attached to a Rpi 3B+. I can get the display working using the process below, but I can’t get the touchscreen to work and I don’t know where to start the troubleshooting process. Any help would be much appreciated!

Below is my third revision of the process and all items now install without reporting any errors:

1. Install Volumio 2.713 and Touch Display 1.1.6 Plugin  
2. sudo apt install apt-utils
3. sudo apt install device-tree-compiler
4. sudo apt-get install rpi.gpio
5. sudo git clone [github.com/pimoroni/hyperpixel4](https://github.com/pimoroni/hyperpixel4) -b pi3
6. cd hyperpixel4
7. sudo ./install.sh

The Volumio interface is displayed and looks great (IPS panel 235 PPI @60FPS), I just wish the touchscreen capability was working. BTW, the unit interfaces entirely via GPIO, with no USB or hdmi connections. “sudo i2cdetect -7 3” shows the touchscreen is using i2c address 0x5d, and /dev/i2c-3 is present. I’ve just no idea how to point to it and use it.

Again, any advice on where to start the troubleshooting process would be much appreciated.

Please see this detailed description of the problem: https://forums.pimoroni.com/t/hyperpixel-4-0-digitiser-not-working/12461

There are comments (probably from the same user) that evdev is needed: https://github.com/pimoroni/hyperpixel4/issues/54 and https://www.raspberrypi.org/forums/viewtopic.php?t=261525

Did you check if the evdev module is loaded? lsmod | grep evdev
In the same way you may also check if the goodix module has been loaded: lsmod | grep goodix

Hello,
Many many many thanks for your reply. lsmod doesn’t work, but using modinfo the results are:

volumio@volumio-study:~$ sudo modinfo evdev filename: /lib/modules/4.19.86-v7+/kernel/drivers/input/evdev.ko license: GPL description: Input driver event char devices author: Vojtech Pavlik <vojtech@ucw.cz> srcversion: C150F168371B920FE538C6F alias: input:b*v*p*e*-e*k*r*a*m*l*s*f*w* depends: intree: Y name: evdev vermagic: 4.19.86-v7+ SMP mod_unload modversions ARMv7 p2v8
and

volumio@volumio-study:~$ sudo modinfo goodix filename: /lib/modules/4.19.86-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.86-v7+ SMP mod_unload modversions ARMv7 p2v8
But, whilst the modules are present, they do not appear to be ‘active’.
I’m not sure if i2c is correctly configured;

volumio@volumio-study:~$ sudo dmesg | grep i2c [ 17.181352] i2c /dev entries driver [ 17.906735] gpio-10 (i2c@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file [ 17.906811] gpio-11 (i2c@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file [ 17.910627] i2c-gpio i2c@0: using lines 10 (SDA) and 11 (SCL) [ 18.019723] pinctrl-bcm2835 3f200000.gpio: pin gpio2 already requested by soc:fb; cannot claim for 3f804000.i2c [ 18.019740] pinctrl-bcm2835 3f200000.gpio: pin-2 (3f804000.i2c) status -22 [ 18.019762] i2c-bcm2835 3f804000.i2c: Error applying setting, reverse things back [ 18.019789] i2c-bcm2835: probe of 3f804000.i2c failed with error -22
There are no dmesg entries for goodix, evdev or hyperpixel. Where are they invoked? I assume that, in /boot/config.txt the dtoverlay=hyperpixel4 does that job (at the same time that it succesfully configures the display).
lsdev gives:

volumio@volumio-study:~$ ls /dev/input mice
Any help, pointers or advice very gratefully received.

Update, I’ve since commented out the dtparam=i2c_arm=on from /boot/config.txt and this appears to resolve the dmesg errors;

volumio@volumio-study:~$ dmesg | grep i2c [ 12.204347] i2c /dev entries driver [ 12.607805] gpio-10 (i2c@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file [ 12.607882] gpio-11 (i2c@0): enforced open drain please flag it properly in DT/ACPI DSDT/board file [ 12.608339] i2c-gpio i2c@0: using lines 10 (SDA) and 11 (SCL) volumio@volumio-study:~$ dmesg | grep goodix volumio@volumio-study:~$ dmesg | grep evdev volumio@volumio-study:~$ ls /dev/i2c-* /dev/i2c-3 volumio@volumio-study:~$ 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: -- -- -- -- -- -- -- --
Still no sign of goodix or evdev though!

Hm, lsmod works here. What is the result when you execute it? Error?

Do you have other hardware installed which could interfere (especially with GPIO27 (hardware pin 13) )?

Does udevadm info /sys/bus/i2c/devices/3-005d show any sign of goodix?

Perhaps I was mistaken with lsmod, it is working today. There are no returns for evdev or goodix. The udevadm results are as follows:

volumio@volumio-study:~$ lsmod | grep evdev volumio@volumio-study:~$ lsmod | grep goodix volumio@volumio-study:~$ lsmod | grep i2c* i2c_gpio 16384 0 i2c_algo_bit 16384 1 i2c_gpio i2c_dev 20480 0 volumio@volumio-study:~$ sudo udevadm info /sys/bus/i2c/devices/3-005d Unknown device, --name=, --path=, or absolute path in /dev/ or /sys expected.
i2cdetect still returns it though:

volumio@volumio-study:~$ 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: -- -- -- -- -- -- -- --
Once again, huge thanks for your time, it’s much appreciated.

There seems to be a problem with the hyperpixel4 overlay from the pi3 branch. As you probably have seen already, in the forum thread you mentioned above as well as a reply to your issue report at pimoroni’s GitHub, gadgetoid recommended to try out the files from their pi4-ic2-fix branch. I hope this will solve your issue.

Hello. Yup, Gadgetoid replied this morning. I’ve given his recommendation a go (despite it being a Pi3b+) and the situation is unfortunately the same as before:

volumio@volumio-study:~$ sudo lsmod | grep goodix volumio@volumio-study:~$ sudo lsmod | grep evdev volumio@volumio-study:~$ sudo lsmod | grep i2c* i2c_gpio 16384 0 i2c_algo_bit 16384 1 i2c_gpio i2c_dev 20480 0 volumio@volumio-study:~$ ls /dev/i2c-* /dev/i2c-3 volumio@volumio-study:~$ 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: -- -- -- -- -- -- -- -- volumio@volumio-study:~$ sudo udevadm info /sys/bus/i2c/devices/3-005d Unknown device, --name=, --path=, or absolute path in /dev/ or /sys expected. volumio@volumio-study:~$ ls /sys/bus/i2c/devices i2c-3

Where’s ‘the thing’ that calls for the goodix driver to be associated with a device? Is there some log I can inspect to see what failed?

Once again, many thanks for your time.

Not sure if this is related, but I have two RaspPi 3B with 7Inch RaspPi displays.
First one working fine for some time, has Touchscreen V1.1.6

Just tried to install Touch screen plugin on second identical hardware system. It installed, but is not displaying.

I can see that the 180Degree rotation is working, also backlight and timeout and if enable mouse pointer then see it track screen presses.

But screen is black with no UI showing. Backlight turns on/off with the timeout.

I assume the problem is due to an update from 1.1.6 to 1.1.7.

Though can not remember what version of Volumio was installed on the first platform when I installed the plugin which does work.

Any suggestions?

It is not related. The issue Tom4c discovered is caused by the hyperpixel4 overlay(s) which is currently discussed and investigated at pimoroni’s GitHub repo (https://github.com/pimoroni/hyperpixel4/issues/58).

To investigate your issue please post the results of cat /boot/config.txt and cat /boot/userconfig.txt

Both systems are running Volumio Version 2.714, Mar2 23:44:51
Both are identical hardware: RaspPi 3B + RaspPi 7Inch display
Displays are probably Version 2 or higher, as Brightness can be adjusted from 0-255.

Working plugin is V1.1.6
Blank screen is V1.1.7

For both systems, then only installed Plugin is the touchscreen.
Both systems were originally created fresh from SD image file, not sure what version.
Both then were updated to V2.714 Via OTA update.
Working system already had touchscreen plugin installed before OTA update.
Problem system did not have plugin, this was added after OTA update to 2.714.

As requested are content of config.txt and userconfig.txt.
They look almost identical except for location of the gpu_mem config item, this moves from one file to other.
Also looks like there may be missing CRLF at end of userconfig.txt files on both systems, but probably of no significance.

For system that has V1.1.6. (Works fine)

cat /boot/config.txt gives:

initramfs volumio.initrd
#GPU_MEM=32
max_usb_current=1
dtparam=audio=on
audio_pwm_mode=2
dtparam=i2c_arm=on
disable_splash=1
hdmi_force_hotplug=1

include userconfig.txt

cat /boot/userconfig.txt gives:

Add your custom config.txt options to this file, which will be preserved during updates

Touch Display gpu_mem setting below: do not alter

gpu_mem=32

Touch Display rotation setting below: do not alter

lcd_rotate=2
display_hdmi_rotate=2

NOTE: Does not appear to include a final CRLF at end of last line.

=================================
For system that has V1.1.7.
This is the one that displays no GUI, but has backlight and timeout behaviour.

cat /boot/config.txt gives:

initramfs volumio.initrd
#GPU_MEM=32
max_usb_current=1
dtparam=audio=on
audio_pwm_mode=2
dtparam=i2c_arm=on
disable_splash=1
hdmi_force_hotplug=1

include userconfig.txt

Touch Display gpu_mem setting below: do not alter

gpu_mem=32

cat /boot/userconfig.txt gives:

Add your custom config.txt options to this file, which will be preserved during updates

Touch Display rotation setting below: do not alter

lcd_rotate=2
display_hdmi_rotate=2

NOTE: Does not appear to include a final CRLF at end of last line.

=================================

@Revell
Thanks for reporting back.

Could you try adding a line feed to the /boot/config.txt respectively /boot/userconfig.txt to rule this out as a reason? I have no access to my Volumio system atm.

Another thought: What is the brightness value when you open the configuration page of the plugin and what is the result of cat /sys/devices/platform/rpi_backlight/backlight/rpi_backlight/brightness ?

Added extra blank lines to ends of config.txt and userconfig.txt then rebooted (via remote browser config menu option), this appears to have no impact,so the lack or CRLF does not appear to impact anything.

====

If I do: cat /sys/devices/platform/rpi_backlight/backlight/rpi_backlight/brightness

This returns 127, which matches the settings value in the plugin (accessed via remote WEB browser).
If I change the value on the settings page, a lower values give a reduction in the backlight brightness. Higher values are brighter (as expected).

Also if I enable the MOUSE POINTER, this tracks the screen touches, and pointer is upward-left hollow pointing arrow.

However if I start playing a source (from remote browser), then try touching the screen at guessed locations, I do not appear to be able to cause playing to pause or volume to change, so not sure if screen touches are passing back to volumio. Though not being able to see the GUI it may be that the display is not where I think it is, so I may be missing the play/pause area or the volume control area.

Also during startup I see the VOLUMIO splash graphic text briefly, which then briefly replaces with a two line text login prompt, which then replaces with a black/blank screen,but backlight is still ON, also display is the correct way up.

Also backlight goes out after timeout. If I then start playing a track (from remote browser), then backlight turns back on (as I have setting set to turn display on while playing). If I pause playing and wait for timeout period, then backlight turns off after timeout.

All indications at present from what I am able to see is that the unit starts up as expected, then tries to run the GUI (I assume some web browser running in a kiosk mode or something) but that the browser is failing to display anything, but continues to run as the text prompt does not return.

I have also looked at DMESG output for both systems, and both appear to be similar/identical. There are a number of changes in order of a few messages, but generally there does not appear to be and extra messages. Both run to about 25 seconds of log, so probably nothing to help with debugging.

If I run the command “TOP” on both systems while both are idle, the working one shows very low CPU usage, while the problem one is showing 2 to 3% processor loading continuously for a command that starts “volumiokio+” not sure full command.

ps -ae

suggests “volumiokiosk.sh”

Good system shows TIME 00:00:00
Problem system shows TIME 00:01:12

Also good system has several “chromium-browse” processes that are using cpu time.
But problem system appears to lack these processes, so have they failed to launch or crashed?

Please post the results of cat /opt/volumiokiosk.sh and systemctl status -l volumio-kiosk

Below are output for the problem system:

cat /opt/volumiokiosk.sh returns:

#!/bin/bash
while true; do timeout 3 bash -c “</dev/tcp/127.0.0.1/3000” >/dev/null 2>&1 && break; done
sed -i ‘s/“exited_cleanly”:false/“exited_cleanly”:true/’ /data/volumiokiosk/Default/Preferences
sed -i ‘s/“exit_type”:“Crashed”/“exit_type”:“None”/’ /data/volumiokiosk/Default/Preferences
openbox-session &
while true; do
/usr/bin/chromium-browser
–disable-pinch
–kiosk
–no-first-run
–disable-3d-apis
–disable-breakpad
–disable-crash-reporter
–disable-infobars
–disable-session-crashed-bubble
–disable-translate
–user-data-dir=’/data/volumiokiosk’ --no-sandbox localhost:3000
done

systemctl status -l volumio-kiosk returns:

● volumio-kiosk.service - Volumio Kiosk
Loaded: loaded (/lib/systemd/system/volumio-kiosk.service; disabled)
Active: active (running) since Thu 2020-03-12 14:52:47 UTC; 1h 38min ago
Main PID: 11513 (startx)
CGroup: /system.slice/volumio-kiosk.service
├─11513 /bin/sh /usr/bin/startx /etc/X11/Xsession /opt/volumiokiosk.sh
├─11537 xinit /etc/X11/Xsession /opt/volumiokiosk.sh – /etc/X11/xinit/xserverrc :0 -auth /tmp/serverauth.b980dWRqmd
├─11538 /usr/lib/xorg/Xorg -nolisten tcp :0 -auth /tmp/serverauth.b980dWRqmd
├─11548 /bin/bash /opt/volumiokiosk.sh
├─11565 /usr/bin/ssh-agent /opt/volumiokiosk.sh
├─11570 /usr/bin/openbox --startup /usr/lib/arm-linux-gnueabihf/openbox-autostart OPENBOX
├─11657 /usr/bin/pulseaudio --start
├─11660 /usr/bin/xbindkeys -f /etc/xbindkeysrc
├─11716 /bin/sh /usr/bin/start-pulseaudio-x11
├─11717 /usr/bin/xprop -root -spy
├─15227 /bin/bash /usr/bin/chromium-browser --disable-pinch --kiosk --no-first-run --disable-3d-apis --disable-breakpad --disable-crash-reporter --disable-infobars --disable-session-crashed-bubble --disable-translate --user-data-dir=/data/volumiokiosk --no-sandbox localhost:3000
├─15236 n/a
└─15237 n/a

Mar 12 14:52:48 volumio_sunroom startx[11513]: (++) from command line, (!!) notice, (II) informational,
Mar 12 14:52:48 volumio_sunroom startx[11513]: (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
Mar 12 14:52:48 volumio_sunroom startx[11513]: (==) Log file: “/var/log/Xorg.0.log”, Time: Thu Mar 12 14:52:48 2020
Mar 12 14:52:48 volumio_sunroom startx[11513]: (==) Using config directory: “/etc/X11/xorg.conf.d”
Mar 12 14:52:48 volumio_sunroom startx[11513]: (==) Using system config directory “/usr/share/X11/xorg.conf.d”
Mar 12 14:52:48 volumio_sunroom startx[11513]: modprobe: FATAL: Module g2d_23 not found.
Mar 12 14:52:49 volumio_sunroom pulseaudio[11657]: Stale PID file, overwriting.
Mar 12 14:52:49 volumio_sunroom pulseaudio[11657]: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally without any error message
Mar 12 14:52:49 volumio_sunroom pulseaudio[11657]: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally without any error message
Mar 12 14:52:49 volumio_sunroom pulseaudio[11657]: org.bluez.Manager.GetProperties() failed: org.freedesktop.DBus.Error.UnknownMethod: Method “GetProperties” with signature “” on interface “org.bluez.Manager” doesn’t exist

I notice that there is a directory “/data/volumiokiosk/Default/Preferences” referenced in the “volumiokiosk.sh” file.

On the problem system, the directory “/data/volumiokiosk” exists but is empty (so no “Default/Preferences”).
While on the working system, the directory has content of more directories and files.

Has something failed during the installation? During installation, the process stalled at 70% for some time (while packages were being obtained and updated/installed), I left the process to complete, I did not unplug or abort the process, just let it complete naturally.

Yes, empty /data/volumiokiosk seems to be not o.k.

Could you show the result of ls -al /data please?

Do you have other plugins and/or software installed and if so, which are these?

Sorry your reply appears to have an extra “NOT” in it, are you saying the empty directory is OK or is a problem?

From the PROBLEM system:

I only have the touchscreen plugin installed, V1.1.7

===

ls -al /data gives:

drwxr-xr-x 1 volumio volumio 4096 Mar 12 09:35 .
drwxrwxrwx 1 root root 4096 Mar 12 09:34 …
drwxrwxrwx 1 root root 4096 Jan 31 09:25 INTERNAL
drwxr-xr-x 6 volumio volumio 4096 Jan 20 18:41 albumart
drwxr-xr-x 2 volumio volumio 4096 Mar 12 14:07 backgrounds
drwxr-xr-x 6 volumio volumio 4096 Jan 20 18:49 configuration
drwxr-xr-x 2 volumio volumio 4096 Feb 20 09:30 favourites
drwxr-xr-x 2 root root 4096 Mar 6 20:56 flagfiles
-rw-r–r-- 1 volumio volumio 5018 Mar 11 19:43 laststates.json
drwxr-xr-x 2 volumio volumio 4096 Jan 20 18:41 playerstate
drwxr-xr-x 2 volumio volumio 4096 Jan 20 18:41 playlist
drwxr-xr-x 3 volumio volumio 4096 Mar 12 09:34 plugins
-rw-r–r-- 1 volumio volumio 4200 Mar 11 19:04 queue
-rw-r–r-- 1 volumio volumio 0 Mar 6 21:15 volumio2ui
drwxr-xr-x 2 volumio volumio 4096 Mar 12 09:35 volumiokiosk