TouchScreen WaveShare 7" hdmi (SKU: 13857)

https://www.waveshare.com/product/displays/lcd-oled/7inch-hdmi-lcd-h-with-case.htm

Hi,
I use Khadas VIM1+Android Nougat+Kodi with WaveShare 7" hdmi IPS touchsreen to play music. This configuration works quite fine, but at the limit of its hardware capabilities. My dream would be to change it to VIM3 PRO (stronger than VIM1) + CoreElec (much lighter than Android).

I have only one BIG PROBLEM - last version CoreElec 9.2.6 also does not support my WaveShare TouchScreen
linux.aarch64.conf:

...
# CONFIG_TOUCHSCREEN_EETI is not set
# CONFIG_TOUCHSCREEN_EGALAX is not set
# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set
..

The monitor itself is properly detected:

# lsusb
...
Bus 001 Device 004: ID 0eef:0005 D-WAV Scientific Co., Ltd
...

and works very well but touchscreen functionality is completely dead.

I think that ability to use touchscreen in this case can be very wanted because WaveShare displays are quit popular.

Can you build yourself a image with these settings changed? If yes please do so and check if it is working then, then feel free to open a pull request.

Here is the linux config located:

Just clone CE, edit the linux config and build a devel image by
PROJECT=Amlogic-ng ARCH=arm make

Any step by step tutorial? I’m afraid it’s too much for me. I am a user rather than a developer. If I could do this, I wouldn’t bother you. Maybe some other suggestions?

Here is the build: https://drive.google.com/file/d/1O8b24g6mO923DiGUZElKVYl8KoNpaDqy/view?usp=sharing

with this diff

--- a/projects/Amlogic-ng/linux/linux.aarch64.conf	2021-03-14 17:51:25.179543524 +0100
+++ b/projects/Amlogic-ng/linux/linux.aarch64.conf	2021-03-14 17:23:27.314424900 +0100
@@ -2639,9 +2639,9 @@ CONFIG_TOUCHSCREEN_ADS7846=m
 # CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set
 # CONFIG_TOUCHSCREEN_DYNAPRO is not set
 # CONFIG_TOUCHSCREEN_HAMPSHIRE is not set
-# CONFIG_TOUCHSCREEN_EETI is not set
-# CONFIG_TOUCHSCREEN_EGALAX is not set
-# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set
+CONFIG_TOUCHSCREEN_EETI=m
+CONFIG_TOUCHSCREEN_EGALAX=m
+CONFIG_TOUCHSCREEN_EGALAX_SERIAL=m
 # CONFIG_TOUCHSCREEN_FUJITSU is not set
 # CONFIG_TOUCHSCREEN_GOODIX is not set
 # CONFIG_TOUCHSCREEN_ILI210X is not set
@@ -2666,7 +2666,25 @@ CONFIG_TOUCHSCREEN_ADS7846=m
 # CONFIG_TOUCHSCREEN_PIXCIR is not set
 # CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set
 # CONFIG_TOUCHSCREEN_WM97XX is not set
-# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
+CONFIG_TOUCHSCREEN_USB_EGALAX=y
+# CONFIG_TOUCHSCREEN_USB_PANJIT is not set
+# CONFIG_TOUCHSCREEN_USB_3M is not set
+# CONFIG_TOUCHSCREEN_USB_ITM is not set
+# CONFIG_TOUCHSCREEN_USB_ETURBO is not set
+# CONFIG_TOUCHSCREEN_USB_GUNZE is not set
+# CONFIG_TOUCHSCREEN_USB_DMC_TSC10 is not set
+# CONFIG_TOUCHSCREEN_USB_IRTOUCH is not set
+# CONFIG_TOUCHSCREEN_USB_IDEALTEK is not set
+# CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH is not set
+# CONFIG_TOUCHSCREEN_USB_GOTOP is not set
+# CONFIG_TOUCHSCREEN_USB_JASTEC is not set
+# CONFIG_TOUCHSCREEN_USB_ELO is not set
+# CONFIG_TOUCHSCREEN_USB_E2I is not set
+# CONFIG_TOUCHSCREEN_USB_ZYTRONIC is not set
+# CONFIG_TOUCHSCREEN_USB_ETT_TC45USB is not set
+# CONFIG_TOUCHSCREEN_USB_NEXIO is not set
+# CONFIG_TOUCHSCREEN_USB_EASYTOUCH is not set
 # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
 # CONFIG_TOUCHSCREEN_TSC_SERIO is not set
 # CONFIG_TOUCHSCREEN_TSC2004 is not set

Hello Vpeter,
I put the kernel you sent me on CoreELEC-Amlogic-ng.arm-9.2-nightly_20210313-Generic image. Unfortunately, the touchscreen is still dead. :disappointed_relieved:
I tried to compare it to the last libreelec version where everything works fine. In my opinion, the problem is caused by the dwav_usb_mt driver which overlaps with the touch support. Take a look please:

Coreelec:

[    4.158785@2] input: WaveShare WS170120 as /devices/platform/ff500000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.2/1-1.2:1.0/input/input4
[    4.159358@1] **dwav_usb_mt 1-1.2:1.0: ODROID VU7 MultiTouch(800x480)**
[    4.159439@1] usbcore: registered new interface driver dwav_usb_mt

Libreelec:

[    5.934141@3] input: WaveShare WS170120 as /devices/c9000000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.4/1-1.4:1.0/0003:0EEF:0005.0001/input/input2
[    5.934598@3] hid-multitouch 0003:0EEF:0005.0001: input,hidraw0: USB HID v1.10 Device [WaveShare WS170120] on usb-xhci-hcd.0.auto-1.4/input0

Compare evtest output (ABS_X, ABS_Y). It is treated by the Coreelec as an ODROID vu7 800x400 rather than a Waveshare 1024x600.

Can I do something to activate my touchscreen?

http://ix.io/2TqA (Libreelec: uname -a; lsmod; dmesg | grep WaveShare; cat /proc/bus/input/devices; lsusb -vv; cat /storage/.kodi/temp/kodi.log)
http://ix.io/2TqC (Libreelec: evtest output)
http://ix.io/2TqW (Libreelec pure: dmesg)

http://ix.io/2TqL (Coreelec: uname -a; lsmod; dmesg | grep WaveShare; cat /proc/bus/input/devices; lsusb -vv; cat /storage/.kodi/temp/kodi.log)
http://ix.io/2TqN (Coreelec: evtest output)
http://ix.io/2TqT (Coreelec pure: dmesg)

You used only kernel? Because there are kernel modules and kernel itself doesn’t have everything included.
Just update you device with my tar file and check dmesg, modules, …

Also try to disable mentioned module with this command

echo "blacklist dwav-usb-mt" >> /storage/.config/modprobe.d/blacklist.conf

After disable module “dwav-usb-mt” the Waveshare disappeared from the input devices list and from evtest menu. Touchscreen is dead.

http://ix.io/2Ts6 dmesg: not blacklisted (with “ODROID” symptom)
http://ix.io/2Ts4 dmesg: blacklisted (without WaveShare as input device)
http://ix.io/2Tso (blacklisted: uname -a; lsmod; dmesg | grep WaveShare; cat /proc/bus/input/devices; lsusb -vv; cat /storage/.kodi/temp/kodi.log)

Then I can’t help. I’m not familiar with this type of waveshare touchscreen just the dumb one.

OK. I understand. Thanks for your time and your patience. :beers: :beers: :beers: :slightly_smiling_face:.
Could you write which touchscreen model (7 ", hdmi + usb) works without any problems with Coreelec?
What type would you recommend?

I’m not familiar with anyone using it. Using touchscreen is very niche :slight_smile:

I will read a little about this screen to see what are the requirements. Maybe we can get it to operate.

I will be patiently waiting for progress, while using Coreelec without this niche (as you wrote) functionality.

Which LibreELEC image did you use where touchscreen works?

The only one which works with Khadas VIM1: LibreELEC-KVIM.arm-9.0.2.img.gz

http://ix.io/2TqW (Libreelec pure dmesg with working WaveShare)

I tried to use this image on VIM3 but it doesn’t boot.
There is no version for Khadas VIM3 :disappointed_relieved:

I see that VID/PID is 0EEF:0005.
And I support this device using my tslib addon: https://github.com/CoreELEC/CoreELEC/blob/coreelec-9.2/packages/addons/service/touchscreen/source/config/ts_env.sh-waveshare#L7-L8
using /dev/hidrawX directly.

I don’t understand how did you use it on LibreELEC 9 anyway. It should not work out of the box by my knowledge.

I’m not sure but maybe Hardkernel wrote a driver for it for kernel 4.9: https://github.com/hardkernel/linux/commit/29d99101396ad6fcd9998bb248127a4f13cf4b0f
which means it should work with my image.

Confused…

Bravo! You’re right !
The problem is in the driver written by Hardkernel for ODROID vu5 / vu7 touchscreens since coreelec 9.2.3.:
"CoreELEC 9.2.3
…
Changes Since 9.2.2:
…

  • Updated Kodi to 18.7.1
  • Updated Kodi addons
  • Added touchscreen support for ODROID-vu5/vu7/vu5a/vu7a displays (ng)
    …"

This driver covers native support via hid_multitouch:
Coreelec 9.2.7:

[    4.158785@2] input: WaveShare WS170120 as /devices/platform/ff500000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.2/1-1.2:1.0/input/input4
[    4.159358@1] dwav_usb_mt 1-1.2:1.0: ODROID VU7 MultiTouch(800x480)
[    4.159439@1] usbcore: registered new interface driver dwav_usb_mt

I checked in version 9.2.2 (without dwav-usb-mt driver from hardkernel).
It works fine (the same as libreelec does)

Coreelec 9.2.2:

[    6.423727@4] input: WaveShare WS170120 as /devices/platform/ff500000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.2/1-1.2:1.0/0003:0EEF:0005.0001/input/input4
[    6.423953@4] hid-multitouch 0003:0EEF:0005.0001: input,hidraw0: USB HID v1.10 Device [WaveShare WS170120] on usb-xhci-hcd.0.auto-1.2/input0

and Libreelec 9.0.2:

[    5.934141@3] input: WaveShare WS170120 as /devices/c9000000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.4/1-1.4:1.0/0003:0EEF:0005.0001/input/input2
[    5.934598@3] hid-multitouch 0003:0EEF:0005.0001: input,hidraw0: USB HID v1.10 Device [WaveShare WS170120] on usb-xhci-hcd.0.auto-1.4/input0

Take a look:

Could you please make Hardkernel fix this problem in the next Coreelec version ?

Then CE 9.2.7 should work with blacklisted dwav-usb-mt driver. Because I don’t see any other difference.

Just in case you can try this version with module disabled: https://drive.google.com/file/d/10nOenzR7QtpltjNfhlw9oT43gOiA9D2F/view?usp=sharing

The same effect when driver was blacklisted :(. The touchscreen does not work at all.
Could you build this version of the system but with the dwav-usb-mt driver from 9.2.2 version?
It could be a really interesting experience.

dwav-usb-mt driver is already disabled on CE 9.2.2 and it is not even build.

I assume you did use VIM3 with Amlogic-ng with CE 9.2.2? Ah yes, I see this on a video above.

I don’t understand something here…

Did you tried my image above too?

I have both images in the same time. Depends on whether I insert or remove the card. CE 9.2.2 is on sdcard. CE 9.2.7 with your last changes is installed in EMMC. I did a second update from the last file you sent me. I’ll do a fresh install (CE 9.2.7+last your update) in emmc if you want.

Tell me please whether dwav-usb-mt and “0eef:0005 D-WAV Scientific Co., Ltd” (shown by lsusb command) are the same or completely different things ?

dwav-usb-mt is the driver for Odroid touchscreen. They use same VID/PID so I assume it is the screen from waveshare (still waiting for info from hardkernel). So what yu are asking: this is the same thing.