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

Huion Q11K not detected #76

Open mifth opened 7 years ago

mifth commented 7 years ago

Hi. I have Linux 64bit, Ubuntu 17.04. I have compiled and installed Digimend but nothing works. ((( My Huion Q11K Inspiroy is not recognized and not seen in xinput --list. My Pen does not work at all. I even cannot move a pointer. (( It seems this is the same issue as here https://github.com/DIGImend/digimend-kernel-drivers/issues/59

MJA0vEsa.txt 33S7rT7w.txt Dy9G4pMW.txt 1SdDM2VL.txt

I also tried to set my conf but it did not help: https://pastebin.com/05E9hQQW

Please, help me if you can! I just need to get my pen get working with 2 its buttons.

Thank you.

spbnick commented 7 years ago

This might be something new from Huion, even though they reuse the product ID, again. Could you please run uclogic-probe on your tablet and post its output here?

spbnick commented 7 years ago

Also, lsusb -v and usbhid-dump output would be useful.

mifth commented 7 years ago

Hi! Thanks for the reply. Yep, it seems they bypass manufacturer name. FR4w1nRu.txt - usbhid-dump w34dqZe6.txt - lsusb text2.txt - lsusb2 text.txt - uclogic

I would be happy if I could just draw and press rightclick and middleclick.

Thanks a lot!

mifth commented 7 years ago

https://pastebin.com/sWh9Bzhh - I also tried with decode

I have these libs installed https://packages.ubuntu.com/search?keywords=libusb-0.1-4 selection_268

spbnick commented 7 years ago

Thank you. Could you please edit your comments to have the text from pastebin embedded, and not linked, so we don't lose it?

Also, could you please build and try to use the latest uclogic-tools master? That might give us a bit more data. Thank you.

mifth commented 7 years ago

Ok, I did it.

text.txt - uclogic tools master

w34dqZe6.txt - lsusb

FR4w1nRu.txt - usbhid-dump

uclogic tools still does not work. May be I have a problem with libusb? selection_270

spbnick commented 7 years ago

What do you mean by "does not work"?

mifth commented 7 years ago

It writes "Failed to get manufacturer string descriptor: Pipe error Failed to get product string descriptor: Pipe error"

Is it ok?

spbnick commented 7 years ago

Right, this shows us that the tablet is very different from what was using that VID:PID before and that more needs to be done to make it work. Now, please do full diagnostics as described at http://digimend.github.io/support/howto/trbl/diagnostics/ and post the results here, either as is or in an archive.

mifth commented 7 years ago

Good. Here is my test. Buttons at the tablet did not write anything into the file. test.zip

spbnick commented 7 years ago

Thank you. So, this case is indeed similar to #59. Without discovering the initialization sequence which the Windows driver sends, we can make the movement, pressure, and pen buttons work. However, spatial resolution will be lower than advertised, and frame buttons will not work.

The frame wheel dump seems to contain a lot of reports from the pen. Does this tablet actually have a wheel? It seems it doesn't.

If you're willing to drive this further, then please capture and post some USB traffic on Windows while the tablet is being plugged in.

mifth commented 7 years ago

Thank you too! That's good that its possible to make the pen get working. There is no wheel at the tablet. Only buttons. Also, there is no tilt. As far as i know.

I'm ready to go further. I have windows7 vm. Also, i have some friends with windows os. What should i do to get the usb traffic?

spbnick commented 7 years ago

The VM should be enough and might even be preferred. Install Wireshark on the host, start Windows VM, install tablet drivers on it, start recording USB traffic on all interfaces in Wireshark, connect your tablet, and connect it to the VM. Wait a little, then disconnect the tablet, then stop recording. That should catch it. Save the file, compress, and post it here.

For safety, though, I would filter out the traffic from other devices before posting the capture on the web. Or at least make sure you do not have any devices connected that receive or transmit any sensitive data during the capture. Such as a network card, webcam, a microphone, or a keyboard where you type your passwords.

mifth commented 7 years ago

Ok, I did it. I hope I did it correctly. test_shark.zip

spbnick commented 7 years ago

Thank you, this seems to be what we need. I'll try to update uclogic-tools to support your tablet, if it makes sense, or make another small tool, on the weekend. Once we have your tablet outputting full-featured reports under Linux we'll be able to make the driver work.

mifth commented 7 years ago

Oooooooooooo!!!!!!!! Thank you bratan! Be the force with you!

spbnick commented 7 years ago

Alright, I pushed probing and decoding your tablet parameters to the latest uclogic-tools master. Please download, build, and run it on your tablet. Then (if it doesn't fail), without unplugging your tablet, collect diagnostics samples for pen coordinates, pressure, and buttons, plus frame buttons. Please post results here.

mifth commented 7 years ago

Hi! Thanks for the code! I did it:

Text File.txt

spbnick commented 7 years ago

Yes, that's working fine. Please proceed to collecting diagnostics, after running the new uclogic-probe and without reconnecting your tablet.

mifth commented 7 years ago

Oh, sorry i forgot to get diagnostics. I'll do it asap when i get to the computer.

mifth commented 7 years ago

Hi again! I did the new test. test2.zip

spbnick commented 7 years ago

That doesn't seem to have worked, but let's check. Did you run the new uclogic-probe right before collecting these new files?

mifth commented 7 years ago

I used uclogic-tools from your post https://github.com/DIGImend/digimend-kernel-drivers/issues/76#issuecomment-333357249

mifth commented 7 years ago

Ok, I did another test with latest master code. test3.zip

mifth commented 7 years ago

I rebooted my machine and did the test again. test4.zip

spbnick commented 7 years ago

Thank you. These also show the old reports. What we should be seeing in usbhid-dump output, when pen is moved, is reports starting with "08", instead of "0A". We also should be getting something when frame buttons are pressed. I'll take a closer look at the windows driver trace and try to figure out the initialization sequence. I will update uclogic-tools with it and update you. However, this is not likely to happen today, perhaps tomorrow.

mifth commented 7 years ago

Thank you. I'll wait for sure.

spbnick commented 7 years ago

Alright. I couldn't see anything more special in the Windows trace than what we already do in uclogic-probe. However, I'm not sure what exactly happens with the tablet between running uclogic-probe, and usbhid-dump. I suspect that the driver reinitializes the tablet when uclogic-probe finishes.

To check that, and to see if there is something else that could be interfering, please capture tablet USB traffic on Linux:

  1. Start the capture
  2. Plug in the tablet
  3. Run uclogic-probe
  4. Start usbhid-dump -es
  5. Do a stroke with the pen
  6. Stop usbhid-dump
  7. Stop the capture
  8. Make sure nothing sensitive got into the capture
  9. Post the capture here
mifth commented 7 years ago

Ok, i'll do it this evening when get back home.

ashwanipirate11 commented 7 years ago

i might be random but you seem like you know a lot about linux. iam new to linux and a noob , i accidentally deleted my partitions while installing linux( 18.1) mint and ended up with 1drive for everything . my hdd is 500gb and i have 100GB of important data and cannot afford to lose it. can you shed some light on this lost soul.and i want to create 3 partitions. 1 for linux 2nd for important stuff 3rd for windows ( if my graphic tablet doesnt work with linux i will install windows on this one)

and i also ordered huion q11k inspiroy , i hope i dont get any problems like this.

spbnick commented 7 years ago

@ashwanipirate11, saving data is important and deserves close attention. If your budget is low, see if you can find any hackerspaces nearby, perhaps they can help you, otherwise find a data recovery professional. If it doesn't involve physical data recovery (like from a broken drive) it might be affordable. I unfortunately lack time to help you.

Regarding the tablet, until we or somebody else fixes the drivers, you are going to have a problem with your Huion Inspiroy Q11K.

ashwanipirate11 commented 7 years ago

thank you spbnick. actually i did not lose my data.

mifth commented 7 years ago

Hi! I have just tried to Start the capture. But I failed to do it as i'm no an advanced linux user. I installed Wireshark. But when I run "sudo usbhid-dump -es" - my mouse and keyboard will be disabled. And I cannot do anything. I have to reboot my machine.

Without "sudo" I get this: mifth@mifth:~$ usbhid-dump -es libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/002/002: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. Failed to find and open the devices: Access denied (insufficient permissions)

mifth commented 7 years ago

Also, should I filter wireshark usb device? As it records all USB inputs.

spbnick commented 7 years ago

@mifth, tell usbhid-dump which device to dump. Run usbhid-dump --help to see the options. You can use the -m VID:PID option, for example.

You can record all devices with Wireshark, then filter out just the one you need, and then export only displayed packets.

mifth commented 7 years ago

Thanks a lot! I'll try to do it at monday.

spbnick commented 7 years ago

Feel free to ask here if you get stuck, I'll try to answer quickly, so you can complete this on Monday.

mifth commented 7 years ago

Thank you!!!

konachan700 commented 6 years ago

mifth, please try https://github.com/konachan700/Q11K_Driver

spbnick commented 6 years ago

@konachan700, perhaps you could help us and do a USB traffic dump following the instructions in https://github.com/DIGImend/digimend-kernel-drivers/issues/76#issuecomment-334066906 ?

If you can find time to do this, and use the latest uclogic-tools master, we might be able to find the initialization sequence and make the tablet work with digimend-kernel-drivers with full resolution.

mifth commented 6 years ago

Hi guys.

@spbnick sorry I'll make the test today. I had some problems at my job. (( @konachan700 I have installed your driver and rebooted my machine. But still nothing works. (( Here is my install https://pastebin.com/8HwRBEPE

Here are my logs: boot.log

Xorg.0.log kern.log

I hope it will help.

mifth commented 6 years ago

@konachan700
Looking at Xorg.0... It looks like the device is recognized as a keyboard. May be that's a problem at my machine?

[ 23.426] (II) config/udev: Adding input device Huion Q11K Keyboard (/dev/input/event20) [ 23.426] () Huion Q11K Keyboard: Applying InputClass "libinput keyboard catchall" [ 23.426] (II) Using input driver 'libinput' for 'Huion Q11K Keyboard' [ 23.426] () Huion Q11K Keyboard: always reports core events [ 23.426] () Option "Device" "/dev/input/event20" [ 23.426] () Option "_source" "server/udev" [ 23.426] (II) input device 'Huion Q11K Keyboard', /dev/input/event20 is tagged by udev as: Keyboard [ 23.426] (II) input device 'Huion Q11K Keyboard', /dev/input/event20 is a keyboard [ 23.456] () Option "config_info" "udev:/sys/devices/virtual/input/input22/event20" [ 23.456] (II) XINPUT: Adding extended input device "Huion Q11K Keyboard" (type: KEYBOARD, id 15) [ 23.456] () Option "xkb_model" "pc105" [ 23.456] () Option "xkb_layout" "us,ru" [ 23.456] () Option "xkb_variant" "," [ 23.456] (**) Option "xkb_options" "grp:alt_shift_toggle,grp_led:scroll" [ 23.456] (II) input device 'Huion Q11K Keyboard', /dev/input/event20 is tagged by udev as: Keyboard [ 23.456] (II) input device 'Huion Q11K Keyboard', /dev/input/event20 is a keyboard

konachan700 commented 6 years ago

mifth, please, download the current version - i add a conflicted driver to blacklist now.

mifth commented 6 years ago

OMG!!!! It works!!!! It's alive!!! It's alive!! selection_300

The pressure is recognized in Krita.

But the pressure is not recognized in Blender.

selection_301

mifth commented 6 years ago

May be I have to add something to "/usr/share/X11/xorg.conf.d"? A config file.

mifth commented 6 years ago

My xinput now looks like this

mifth@mifth:~$ xinput --list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Microsoft Wired Keyboard 600 id=10 [slave pointer (2)] ⎜ ↳ Wacom Intuos4 6x9 Pen stylus id=11 [slave pointer (2)] ⎜ ↳ Wacom Intuos4 6x9 Pad pad id=12 [slave pointer (2)] ⎜ ↳ A4TECH USB Device id=13 [slave pointer (2)] ⎜ ↳ A4TECH USB Device id=14 [slave pointer (2)] ⎜ ↳ Huion Q11K Tablet stylus id=15 [slave pointer (2)] ⎜ ↳ Wacom Intuos4 6x9 Pen eraser id=18 [slave pointer (2)] ⎜ ↳ Wacom Intuos4 6x9 Pen cursor id=19 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Video Bus id=7 [slave keyboard (3)] ↳ Power Button id=8 [slave keyboard (3)] ↳ Microsoft Wired Keyboard 600 id=9 [slave keyboard (3)] ↳ Huion Q11K Keyboard id=16 [slave keyboard (3)] ↳ Microsoft Wired Keyboard 600 id=17 [slave keyboard (3)] ↳ A4TECH USB Device id=20 [slave keyboard (3)]

konachan700 commented 6 years ago

Wacom Intuos4 6x9 Pen eraser id=18 [slave pointer (2)]

may be, try to disconnect a wacom...

mifth commented 6 years ago

You were right. I disconnected the Wacom and Blender now gets the Huion pressure!!!! I love you man!!!

selection_303

mifth commented 6 years ago

The only program which does not recognize the Huion is 3DCoat. selection_304

Wacom and my old G-Pen works ok with 3DCoat. Could you, please check it? You can download the 3dcoat here http://3dcoat.com/forum/index.php?/topic/21433-3d-coat-48-beta-testing-thread/

Or this is 3DCoat has a problem?

mifth commented 6 years ago

Could you, please say is it possible to add RightClick and MiddleClick for the pen? I always use these keys with the pen to move/rotate 2d/3d canvas. Right now the buttons for the pen does not work. ((