DIGImend / digimend-kernel-drivers

DIGImend graphics tablet drivers for the Linux kernel
GNU General Public License v2.0
1.17k stars 173 forks source link

Add Artisul D13 support #87

Open DennaGherlyn opened 6 years ago

DennaGherlyn commented 6 years ago

I have an Artisul D13 which is an UC-Logic tablet and I'm searching for tablet drivers for it. No driver known to me works. I can use the tablet as a monitor (out of the box) but its pen doesn't get recognized at all.

lsusb gives me this output for the tablet:

Bus 003 Device 005: ID 5543:0046 UC-Logic Technology Corp.

uclogic-probe gives me the following:

M 55 00 43 00 2D 00 4C 00 6F 00 67 00 69 00 63 00
P 41 00 52 00 54 00 49 00 53 00 55 00 4C 00 20 00 44 00 31 00 33 00
S 64 0C 03 99 72 7E 40 03 00 FF 07 EC 09
S 65 04 03 00 67
S 6E 04 03 31 00
S 79 0C 03 4F 00 31 00 31 00 30 00 35 00
S 7A 08 03 02 07 01 54 00 00
S 7B 0C 03 48 00 4B 00 20 00 4F 00 6E 00

xinput --list gives me this:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ UC-Logic ARTISUL D13                      id=8    [slave  pointer  (2)]
⎜   ↳ UC-Logic ARTISUL D13                      id=9    [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ UC-Logic ARTISUL D13                      id=15   [slave  keyboard (3)]

artisul-d13-dmesg.txt artisul-d13-lsub-v.txt

It would be nice if you could add support for this device. Or point me to an other driver that works.

ghost commented 6 years ago

Yeah, and I can confirm that Artisul themselves aren't planning to provide linux support AFAIK with my correspondence with them, so I would love to see support for it that way I don't need to be running Windows to use it :(

Attached my own DMESG and LSUSB dumps artisul-d13-dmesg.txt artisul-d13-lsub-v.txt

Also, I couldn't get any activity out of xinput test of the two listings for the pointer, do get keypress activity out of the hotkeys for the device, they are using their default settings that came with the tablet when there is no driver installed. (the circle wheel acts as a scroll wheel in this mode)

DennaGherlyn commented 6 years ago

So my friend and I were fiddling around with the code to try and make it work without knowing what we were actually doing. No good results so far. But we have some new data from the Artisul D13 that might help a person with more knowledge in writing drivers.

The data from the following dump are in the attachments: usbhid-dump -a3:20 | grep -v : | xxd -r -p | hidrd-convert -o code d13.txt d13_i0.txt d13_i1.txt d13_i2.txt

spbnick commented 5 years ago

I threw together a quick patch trying to add support for Artisul D13. If anybody still needs it, try installing and using https://github.com/spbnick/digimend-kernel-drivers/archive/support_uc-logic_artisul_d13.zip

radeoflier commented 5 years ago

Awesome - thanks for putting this together! this gave functionality to my D13 - works great

radeoflier commented 2 years ago

This worked great in Ubuntu 18.04. However, on 20.04 I'm having problems... Is this not compatible with 20.04.3? If so, is it included in the DIGImend latest? should I have installed DIGImend before spbnick's .zip package?

Current error is (apologies if updating is spamming your profile):

make: PWD: No such file or directory
make -C /lib/modules/5.15.0-39-generic/build SUBDIRS= modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-39-generic'
make[2]: *** No rule to make target 'arch/x86/entry/syscalls/syscall_32.tbl', needed by 'arch/x86/include/generated/uapi/asm/unistd_32.h'.  Stop.
make[1]: *** [arch/x86/Makefile:213: archheaders] Error **2**
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-39-generic'
make: *** [Makefile:22: modules] Error 2
absentialist commented 4 hours ago

I know this is an old issue, but I see it's still open. @spbnick Thanks for the patch - It seems that digimend has changed significantly since you posted that so I'm trying to fit the changes into the current source. This is on Ubuntu 24.04.1 LTS

I have some progress: the device is recognized and assigned an input:

[696761.711006] usb 1-4: New USB device found, idVendor=5543, idProduct=0046, bcdDevice= 0.00
[696761.711013] usb 1-4: New USB device strings: Mfr=5, Product=6, SerialNumber=0
[696761.711016] usb 1-4: Product: ARTISUL D13
[696761.711019] usb 1-4: Manufacturer: UC-Logic
[696761.743885] input: UC-Logic ARTISUL D13 Pen as /devices/pci0000:00/0000:00:01.2/0000:02:00.0/usb1/1-4/1-4:1.0/0003:5543:0046.0057/input/input130
[696761.744059] uclogic 0003:5543:0046.0057: input,hidraw1: USB HID v1.11 Device [UC-Logic ARTISUL D13] on usb-0000:02:00.0-4/input0
[696761.749806] uclogic 0003:5543:0046.0058: interface is invalid, ignoring
[696761.755808] uclogic 0003:5543:0046.0059: interface is invalid, ignoring

However after I click with the pen I get an endless stream of:

[696759.525061] usb 1-4: input irq status -75 received
[696759.529103] usb 1-4: input irq status -75 received
[696759.533058] usb 1-4: input irq status -75 received
[696759.537059] usb 1-4: input irq status -75 received

Until the device is removed and re-attached.

And evtest shows

$ sudo evtest /dev/input/event3
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x5543 product 0x46 version 0x111
Input device name: "UC-Logic ARTISUL D13 Pen"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 320 (BTN_TOOL_PEN)
    Event code 330 (BTN_TOUCH)
    Event code 331 (BTN_STYLUS)
    Event code 332 (BTN_STYLUS2)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value      0
      Min        0
      Max    29337
      Resolution     100
    Event code 1 (ABS_Y)
      Value      0
      Min        0
      Max    16510
      Resolution     100
    Event code 24 (ABS_PRESSURE)
      Value      0
      Min        0
      Max     2047
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
Properties:
  Property type 0 (INPUT_PROP_POINTER)
Testing ... (interrupt to exit)

However it shows no input when the stylus clicks or moves.

I've added a record to libwacom:

[Device]
Name=UC-Logic Artisul D13
ModelName=D13
DeviceMatch=usb:5543:0046 #:UC-Logic ARTISUL D13 Stylus;usb:5542:0046:UC-Logic ARTISUL D13 Pad
Class=Cintiq
Width=12
Height=7
IntegratedIn=Display
Layout=huion-kamvas-13.svg
Styli=@generic-no-eraser

[Features]
Stylus=true
Reversible=false
Touch=false
TouchSwitch=false
Ring=true
NumStrips=0

[Buttons]
Left=A;B;C;D;E;F;G;H
EvdevCodes=BTN_0;BTN_1;BTN_2;BTN_3;BTN_4;BTN_5;BTN_6;BTN_7

So Ubuntu settings recognizes a wacom device. And I have an X11 InputClass:

Section "InputClass"
        Identifier "Artisul D13"
        MatchUSBID "5543:0046"
        MatchDevicePath "/dev/input/event*"
        MatchIsKeyboard "false"
        Driver "wacom"
EndSection

My modification of the digimend code is naive so not sure how instructive it would be to post it but let me know if that would help. I would dearly love to get this tablet working in Linux because Artisul don't even support it on Mac anymore.

Thanks for the great work here.