Capacitative USB touch not working properly on 7' HDMI IPS (1024*600) Waveshare clone display

Dear all,

The capacitative touch function on my 7inch usb display is not working properly, as the bottom right corner does not get touch input.
Does anyone knows a fix for this?

I’m on Zynthian 2401 stable.
The display is the following one.

It should be a clone of the Waveshare 7 inch and also very similar to this other one

This is my display configuration:

Config:

hdmi_force_hotplug=1
hdmi_drive=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0dtoverlay=vc4-kms-v3d

I tested the display with a laptop and an Orange Pi Zero 3 and it works as expected.

I have the following logs

lsusb
Bus 001 Device 005: ID 1a86:e5e3 QinHeng Electronics

UI Log

– Logs begin at Wed 2024-03-27 17:47:03 GMT. –
Mar 27 17:47:25 zynthian startx[452]: ZynCore->setup_behaviour_zyncoder(3, …): Invalid index!
Mar 27 17:47:36 zynthian startx[452]: ZynCore->setup_behaviour_zyncoder(3, …): Invalid index!
Mar 27 17:47:42 zynthian startx[452]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 0.0us
Mar 27 17:47:42 zynthian startx[452]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 0.0us
Mar 27 17:47:42 zynthian startx[452]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 0.0us
Mar 27 17:47:42 zynthian startx[452]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 0.0us
Mar 27 17:47:42 zynthian startx[452]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 0.0us
Mar 27 17:47:42 zynthian startx[452]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 0.0us
Mar 27 17:47:42 zynthian startx[452]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 0.0us
Mar 27 17:47:42 zynthian startx[452]: WARNING:zynthian_autoconnect.cb_jack_xrun: Jack Audio XRUN! => delayed 0.0us

UI Debug Log

Restarting UI in debug mode
– Logs begin at Wed 2024-03-27 17:47:03 GMT. –
Mar 27 17:50:56 zynthian systemd[1]: Started Zynthian User Interface (DEBUG).
Mar 27 17:50:56 zynthian startx[1385]: X.Org X Server 1.20.4
Mar 27 17:50:56 zynthian startx[1385]: X Protocol Version 11, Revision 0
Mar 27 17:50:56 zynthian startx[1385]: Build Operating System: Linux 5.4.0-109-generic armv8l Raspbian
Mar 27 17:50:56 zynthian startx[1385]: Current Operating System: Linux zynthian 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l
Mar 27 17:50:56 zynthian startx[1385]: Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=1024 bcm2708_fb.fbheight=600 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=tty3 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,libcomposite logo.nologo quiet splash vt.global_cursor_default=0
Mar 27 17:50:56 zynthian startx[1385]: Build Date: 04 April 2023 07:50:56AM
Mar 27 17:50:56 zynthian startx[1385]: xorg-server 2:1.20.4-1+rpt4+deb10u9 (Debian -- User Support)
Mar 27 17:50:56 zynthian startx[1385]: Current version of pixman: 0.36.0
Mar 27 17:50:56 zynthian startx[1385]: Before reporting problems, check http://wiki.x.org
Mar 27 17:50:56 zynthian startx[1385]: to make sure that you have the latest version.
Mar 27 17:50:56 zynthian startx[1385]: Markers: (–) probed, (**) from config file, (==) default setting,
Mar 27 17:50:56 zynthian startx[1385]: (++) from command line, (!!) notice, (II) informational,
Mar 27 17:50:56 zynthian startx[1385]: (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
Mar 27 17:50:56 zynthian startx[1385]: (==) Log file: “/var/log/Xorg.0.log”, Time: Wed Mar 27 17:50:56 2024
Mar 27 17:50:56 zynthian startx[1385]: (==) Using config directory: “/etc/X11/xorg.conf.d”
Mar 27 17:50:56 zynthian startx[1385]: (==) Using system config directory “/usr/share/X11/xorg.conf.d”
Mar 27 17:50:57 zynthian startx[1385]: /zynthian/config/img/fb_zynthian_boot.png is 1024x600 PNG image, color type GRAY, 8 bit
Mar 27 17:50:57 zynthian startx[1385]: Zooming image by 100%…done
Mar 27 17:50:57 zynthian startx[1385]: Merging…didn’t find evidence of prior run.
Mar 27 17:50:57 zynthian startx[1385]: done
Mar 27 17:50:57 zynthian startx[1385]: Building XImage…done
Mar 27 17:50:57 zynthian startx[1385]: ----------------------------------------------
Mar 27 17:50:57 zynthian startx[1385]: Linux Version: buster
Mar 27 17:50:57 zynthian startx[1385]: Kernel Version: 5.10.103-v7+
Mar 27 17:50:57 zynthian startx[1385]: ZynthianOS Version: 2401
Mar 27 17:50:57 zynthian startx[1385]: Virtualization: none
Mar 27 17:50:57 zynthian startx[1385]: Hardware Architecture: armv7l
Mar 27 17:50:57 zynthian startx[1385]: Hardware Model: Raspberry Pi 3 Model B Rev 1.2
Mar 27 17:50:57 zynthian startx[1385]: ----------------------------------------------
Mar 27 17:50:58 zynthian startx[1385]: INFO:zynthian_gui_config.: ZYNTHIAN-UI CONFIG …
Mar 27 17:50:58 zynthian startx[1385]: INFO:zynthian_gui_config.: No Wiring Layout configured. Only touch interface is available.
Mar 27 17:50:59 zynthian startx[1385]: ZynCore: Setting-up 8 x Zynswitches…
Mar 27 17:50:59 zynthian startx[1385]: ZynCore: Setting-up 4 x Zynpots (zyncoders)…
Mar 27 17:50:59 zynthian startx[1385]: ZynCore->setup_zyncoder(0, 0, 0): Can’t configure zyncoder on a single pin!
Mar 27 17:50:59 zynthian startx[1385]: ZynCore->setup_zyncoder(1, 0, 0): Can’t configure zyncoder on a single pin!
Mar 27 17:50:59 zynthian startx[1385]: ZynCore->setup_zyncoder(2, 0, 0): Can’t configure zyncoder on a single pin!
Mar 27 17:50:59 zynthian startx[1385]: ZynCore->setup_zyncoder(3, 0, 0): Can’t configure zyncoder on a single pin!
Mar 27 17:51:01 zynthian startx[1385]: DEBUG:zynthian_config.get_disabled_midi_in_ports: DISABLED_MIDI_IN = [‘’]
Mar 27 17:51:01 zynthian startx[1385]: DEBUG:zynthian_config.get_enabled_midi_out_ports: ENABLED_MIDI_OUT = [‘ttymidi:MIDI_out’, ‘QmidiNet:in_1’]
Mar 27 17:51:01 zynthian startx[1385]: DEBUG:zynthian_config.get_enabled_midi_fb_ports: ENABLED_MIDI_FB = [‘’]
Mar 27 17:51:01 zynthian startx[1385]: DEBUG:zynthian_gui_config.set_midi_config: MMC Bank Change CCNum: 0
Mar 27 17:51:01 zynthian startx[1385]: DEBUG:zynthian_gui_config.set_midi_config: MMC Bank Change UP: None
Mar 27 17:51:01 zynthian startx[1385]: DEBUG:zynthian_gui_config.set_midi_config: MMC Bank Change DOWN: None
Mar 27 17:51:01 zynthian startx[1385]: DEBUG:zynthian_gui_config.set_midi_config: MMC Program Change UP: None
Mar 27 17:51:01 zynthian startx[1385]: DEBUG:zynthian_gui_config.set_midi_config: MMC Program Change DOWN: None

Many thanks in advance for your help, and have all nice holidays!!!

Nevermind,
Seems like the solution is already here

I just replaced the standard WaveShare 7 HDMI+USB 1024x600 config in the advanced view with this one.

hdmi_force_hotplug=1
max_usb_current=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0
hdmi_drive=1

Edit:

The solution seems to be partial tough:
Touch seems to work only after unpluggin and replugging after boot.

1 Like

Have you tried putting these settings into webconf HARDWARE->Display, Config field, saving and rebooting? I don’t know if this will work but it seems like a good place to add display config instead of some random file in the OS.

1 Like

Check also if the driver is not enabled (or disabled) for some reason. See here: Running Zynthian on Seeed Studio reTerminal - #26 by oscaracena

1 Like

Yes, that is exactly what i did to solve the bottom right corner not working. I couldn’t say whether the addition of max_usb_power or the removal of dtoverlay fixed the issue.

However then i realized the usb unplugging and replygging issues.

I will try with this in the meantime

Running Zynthian on Seeed Studio reTerminal - #26 by oscaracena

Others have experienced this issue. I have a similar screen gathering dust somewhere. I may find time to dig it out and test… no promises were made nor may they be inferred.

Some steps forward:

I used the bash script in this post and calling

bash usb_replug.sh usb1

fixes the issue.

Then i also tried to replace the following line from @oscaracena 's answer

ExecStart=/bin/bash -c ‘while ! $(xset q > /dev/null 2>&1); do sleep 2; done; sleep 5; xinput enable seeed-tp’

with

ExecStart=/bin/bash -c ‘usb_replug.sh usb1’

but it does not work.
What would be the correct way to adapt that answer to this case?

You need the full path to your script.

1 Like

I tried with the full path but doesn’t work either.

I guess I need to check if that custom systemd service is running after that zynthian has finished the booting process, right?

You need to add the service, and enable it, so it will start on boot:

systemctl enable your-service

And you can check if it worked using status. Did you try it?

1 Like

I did try to add the full path and enable the systemctl service.

Status shows that it correctly runs.
I may be that I need to add and play around sleep time before actually resetting the usb hub.

I need to put this issue on hold for the moment and resume it at a later stage, but many thanks @oscaracena and @riban for the precious support so far.

1 Like