Wine app and USB-HID device

Questions about Wine on Linux
Locked
ioth9
Newbie
Newbie
Posts: 1
Joined: Wed Sep 06, 2023 11:46 am

Wine app and USB-HID device

Post by ioth9 »

Hello
I need to make a usb-hid internal device accessible to some windows app. The device is a eink screen that is drive by a ITE T-CON it8951 controller. The it8951 is connected internal on the usb bus and I need to install the windows app (simple ereader, enote app others, and most importantly an app call EinkSvr server which I think give access of the eink to the other apps ) that use the eink sceen. For now, I have try using wine trough Bottles I have encounter some problem with the wine version in the repo. My system is a Debian testing with wine 8.0.1 , winetricks 20230212-2 I didn't install wine32 since my apps are for Win10 x64 and I have mostly tried with Bottle installed from flatpak with different version of wine: wine-ge-proton8-14, soda 7.0-8, ge-proton 8-14.
On Bottles I am abble to install the app and I can launch them but they stop after a while. If I launch the integrated terminal I have those errors:

Code: Select all

wineserver: using server-side synchronization.
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely
0040:err:ole:com_get_class_object apartment not initialised
0050:err:ole:com_get_class_object class {77a1c827-fcd2-4689-8915-9d613cc5fa3e} not registered
0050:err:ole:com_get_class_object no class object {77a1c827-fcd2-4689-8915-9d613cc5fa3e} could be created for context 0x1
00f8:err:hid:udev_bus_init UDEV monitor creation failed
Microsoft Windows 10.0.19043
same print if I relaunch the apps in particular EinkSvr.
To config the access to usb port I have haded registry keys as per the wiki:
HKEY_LOCAL_MACHINE\Software\Wine\Ports
COM1 REG_SZ /dev/hiddev0
COM2 REG_SZ /dev/hiddev1
COM3 REG_SZ /dev/hiddev2

on linux here is the output of lsusb and dmesg for the reference of the it8951

Code: Select all

$ lsusb | grep 8951
Bus 001 Device 004: ID 048d:8951 Integrated Technology Express, Inc. ITE T-CON

Code: Select all

#  dmesg | grep hid                                                                                                                            1 ⨯
[    3.206061] hid: raw HID events driver (C) Jiri Kosina
[    3.439646] hid-generic 0018:048D:8180.0001: hidraw0: I2C HID v1.00 Device [ITE8180:00 048D:8180] on i2c-ITE8180:00
[    3.448248] hid-generic 0018:056A:5182.0002: input,hidraw1: I2C HID v1.00 Mouse [WCOM5182:00 056A:5182] on i2c-WCOM5182:00
[    3.471923] usbcore: registered new interface driver usbhid
[    3.471929] usbhid: USB HID core driver
[    3.580311] wacom 0018:056A:5182.0002: hidraw0: I2C HID v1.00 Mouse [WCOM5182:00 056A:5182] on i2c-WCOM5182:00
[    6.299922] hid-generic 0003:048D:8951.0005: hiddev0,hidraw3: USB HID v1.11 Device [ITE Tech. Inc. ITE T-CON] on usb-0000:00:14.0-7/input1
[    6.366856] hid-generic 0003:048D:8951.0006: input,hiddev1,hidraw4: USB HID v1.11 Keyboard [ITE Tech. Inc. ITE T-CON] on usb-0000:00:14.0-7/input2
[    6.372568] hid-generic 0003:048D:8951.0007: input,hiddev2,hidraw5: USB HID v1.11 Mouse [ITE Tech. Inc. ITE T-CON] on usb-0000:00:14.0-7/input3
[    9.419849] hid-multitouch 0003:048D:8951.0006: input,hiddev1,hidraw4: USB HID v1.11 Keyboard [ITE Tech. Inc. ITE T-CON] on usb-0000:00:14.0-7/input2
[   10.411162] hid-multitouch 0003:048D:8951.0007: input,hiddev2,hidraw5: USB HID v1.11 Mouse [ITE Tech. Inc. ITE T-CON] on usb-0000:00:14.0-7/input3
I have also tried to link /dev/hidraw1.. and also /dev/input/by-path/...
Notice that I also have a win10 in dual-boot on the device with drivers and apps installed and working properly. I have also tried to look into regedit and exported a bunch of it that reference the it8951 and import it in the regedit of my wineprefix.
And I am a complet noob concerning windows and wine so I am not shure what to do are where to look.
The laptop is the yogabook C930 and the device (eink+it8951) serve as a keyboard+touchpad (like touchscreen keyboard) wich is working properly on linux (better that on windows in fact) and also as a wacom tablet and screen (ereader with the app or by copying the main sceen).
There have been attempt to build native drivers to access it8951 trough usb on linux like those
https://github.com/faassen/rust-it8951
https://github.com/adzialocha/it8951-video (based on rust-it8951)
not for the YB C930 but because it8951 eink can be purchase and serve as a small display.

I was able to build rust-it8951 and use to print a picture on the eink screen with it and a video with the other driver so I know that it is possible to access the eink screen on linux but it is rudimentary (just an image) and it didn't deactivate the keyboard.
I did also add the udev rule to give access to the it8951 device:

Code: Select all

cat /etc/udev/rules.d/99-it8951.rules 
SUBSYSTEM=="usb", ATTR{idVendor}=="048d", ATTR{idProduct}=="8951", MODE="0666"
If someone could help It will be much appreciated. I have some day to try to understand what is missing but without success so far.



Sorry if it is not easy to read but english is not my main language
Locked