Open ghost opened 6 years ago
So I have edited the drivers similar to the following reply and the stylus works perfectly with its buttons https://github.com/DIGImend/digimend-kernel-drivers/issues/64#issuecomment-302513223
added this:
90-hid-rehind.rules
SUBSYSTEM=="hid", ACTION=="add", ENV{HID_ID}=="0003:000028BD:00000078", \
RUN+="/sbin/hid-rebind"
hid-ids.h
#define USB_VENDOR_ID_XPPEN 0x28bd #define USB_DEVICE_ID_XPPEN_STAR_06 0x0078
hid-uclogic.c after line 1172
case USB_DEVICE_ID_UGEE_TABLET_EX07S:
I addedcase USB_DEVICE_ID_XPPEN_STAR_06:
after line 1317{ HID_USB_DEVICE(USB_VENDOR_ID_UGEE, USB_DEVICE_ID_UGEE_XPPEN_TABLET_G540) },
I added{ HID_USB_DEVICE(USB_VENDOR_ID_XPPEN, USB_DEVICE_ID_XPPEN_STAR_06) },
I compiled the drivers and installed them.
and with in xorg.conf.d I added this
52-tablet.conf
Section "InputClass" Identifier "Graphics tablet mouse" MatchIsKeyboard "on" MatchProduct "XP-PEN STAR 06" MatchDevicePath "/dev/input/event*" Driver "evdev" # Apply custom Options below. EndSection
Section "InputClass" Identifier "Graphics tablet mouse" MatchIsPointer "on" MatchProduct "XP-PEN STAR 06" MatchDevicePath "/dev/input/event*" Driver "evdev"
EndSection
Section "InputClass" Identifier "Graphics tablet pen" MatchIsTablet "on" MatchProduct "XP-PEN STAR 06" MatchDevicePath "/dev/input/event*" Driver "evdev"
EndSection
xinput now shows this:
⎜ ↳ XP-PEN STAR 06 Pad id=13 [slave pointer (2)] ⎜ ↳ XP-PEN STAR 06 Pen id=14 [slave pointer (2)]
The only problem now left is the tablet buttons , I used
> sudo usbhid-dump -es -m 28bd:0078
to collect the following:
row 1:
button 1:
001:003:001:STREAM 1516466794.008388 03 00 05 00 00 00 00 00
001:003:001:STREAM 1516466794.254327 03 00 00 00 00 00 00 00
button 2:
001:003:001:STREAM 1516466840.436753 03 00 2C 00 00 00 00 00
001:003:001:STREAM 1516466840.562724 03 00 00 00 00 00 00 00
row 2: button 1:
001:003:001:STREAM 1516466864.426910 03 00 08 00 00 00 00 00
001:003:001:STREAM 1516466864.552926 03 00 00 00 00 00 00 00
button 2: 001:003:001:STREAM 1516466886.937078 03 00 0C 00 00 00 00 00
001:003:001:STREAM 1516466887.033072 03 00 00 00 00 00 00 00
row 3:
button 1: 001:003:001:STREAM 1516466915.647496 03 05 1D 00 00 00 00 00
001:003:001:STREAM 1516466915.733323 03 00 00 00 00 00 00 00
button 2: 001:003:001:STREAM 1516466939.415655 03 01 16 00 00 00 00 00
001:003:001:STREAM 1516466939.561593 03 00 00 00 00 00 00 00
wheel:
rotate right: 001:003:001:STREAM 1516466992.755907 03 01 2E 00 00 00 00 00
001:003:001:STREAM 1516466992.757941 03 00 00 00 00 00 00 00
rotate left: 001:003:001:STREAM 1516467017.148133 03 01 2D 00 00 00 00 00
001:003:001:STREAM 1516467017.150133 03 00 00 00 00 00 00 00
This command now shows:
> cat /proc/bus/input/devices
I: Bus=0003 Vendor=28bd Product=0078 Version=0100 N: Name="XP-PEN STAR 06 Pen" P: Phys=usb-0000:00:14.0-2/input1 S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.1/0003:28BD:0078.0019/input/input54 U: Uniq= H: Handlers=event3 mouse1 B: PROP=0 B: EV=1b B: KEY=1c01 0 0 0 0 0 B: ABS=1000003 B: MSC=10
I: Bus=0003 Vendor=28bd Product=0078 Version=0100 N: Name="XP-PEN STAR 06 Pad" P: Phys=usb-0000:00:14.0-2/input1 S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.1/0003:28BD:0078.0019/input/input55 U: Uniq= H: Handlers=event4 js0 B: PROP=0 B: EV=1b B: KEY=800 7f 0 0 0 0 B: ABS=10000000003 B: MSC=10
Can confirm your patches work with me on solus so they seem to be stable (for the drawing side at least). The buttons on mine seem to have the same usbhid-dump as well
Update : It seems to be an issue with the / If this is the pen interface / section
checking "intf->cur_altsetting->desc.bInterfaceNumber == 0" allows button usage but the 3rd button on the stylus becomes disabled. checking "intf->cur_altsetting->desc.bInterfaceNumber == 1" (or 2) re-enables the third button on the stylus but the buttons no longer work
@bahaazahika I also have an XP-Pen Star 06 but I can't get it to work. Which drivers can I install? I download and installed the all.deb package. I created the 52-tablet.conf file as well.
@bahaazahika I ran that cat command and I got this:
I: Bus=0003 Vendor=28bd Product=0078 Version=0100 N: Name="XP-PEN STAR 06" P: Phys=usb-0000:00:14.0-3/input1 S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.1/0003:28BD:0078.0008/input/input25 U: Uniq= H: Handlers=sysrq kbd mouse2 event10 B: PROP=0 B: EV=10001b B: KEY=c01 1ffffffff 1000000000007 ff9f207ac14057ff febeffdfffefffff fffffffffffffffe B: ABS=1000003 B: MSC=10
I: Bus=0003 Vendor=28bd Product=0078 Version=0100 N: Name="XP-PEN STAR 06" P: Phys=usb-0000:00:14.0-3/input0 S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/0003:28BD:0078.0009/input/input26 U: Uniq= H: Handlers=mouse3 event11 B: PROP=0 B: EV=1f B: KEY=400 3f0000 0 0 0 0 B: REL=303 B: ABS=1000003 B: MSC=10
the xinput command gives me:
⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Logitech USB Receiver id=13 [slave pointer (2)] ⎜ ↳ DLL0798:00 06CB:7E92 Touchpad id=16 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=21 [slave pointer (2)] ⎜ ↳ XP-PEN STAR 06 id=15 [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)] ↳ Video Bus id=8 [slave keyboard (3)] ↳ Power Button id=9 [slave keyboard (3)] ↳ Sleep Button id=10 [slave keyboard (3)] ↳ Integrated_Webcam_HD: Integrate id=11 [slave keyboard (3)] ↳ Logitech USB Receiver id=12 [slave keyboard (3)] ↳ Intel HID events id=17 [slave keyboard (3)] ↳ Intel HID 5 button array id=18 [slave keyboard (3)] ↳ Dell WMI hotkeys id=19 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=20 [slave keyboard (3)] ↳ Logitech USB Receiver id=22 [slave keyboard (3)] ↳ XP-PEN STAR 06 id=14 [slave keyboard (3)]
Here is the xinput list-props:
Device 'XP-PEN STAR 06':
Device Enabled (168): 1
Coordinate Transformation Matrix (170): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Calibration Matrix (320): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Calibration Matrix Default (321): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Accel Speed (302): 0.000000
libinput Accel Speed Default (303): 0.000000
libinput Accel Profiles Available (304): 1, 1
libinput Accel Profile Enabled (305): 1, 0
libinput Accel Profile Enabled Default (306): 1, 0
libinput Natural Scrolling Enabled (307): 0
libinput Natural Scrolling Enabled Default (308): 0
libinput Send Events Modes Available (287): 1, 0
libinput Send Events Mode Enabled (288): 0, 0
libinput Send Events Mode Enabled Default (289): 0, 0
libinput Left Handed Enabled (309): 0
libinput Left Handed Enabled Default (310): 0
libinput Scroll Methods Available (311): 0, 0, 1
libinput Scroll Method Enabled (312): 0, 0, 0
libinput Scroll Method Enabled Default (313): 0, 0, 0
libinput Button Scrolling Button (314): 2
libinput Button Scrolling Button Default (315): 2
libinput Middle Emulation Enabled (316): 0
libinput Middle Emulation Enabled Default (317): 0
Device Node (290): "/dev/input/event10"
Device Product ID (291): 10429, 120
libinput Drag Lock Buttons (318):
@bahaazahika So It looks like I'm getting almost what you had. However it is only recognized when I set the driver for wacom instead of evdev.
xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Logitech USB Receiver id=13 [slave pointer (2)] ⎜ ↳ XP-PEN STAR 06 touch id=14 [slave pointer (2)] ⎜ ↳ XP-PEN STAR 06 stylus id=15 [slave pointer (2)] ⎜ ↳ DLL0798:00 06CB:7E92 Touchpad id=16 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=21 [slave pointer (2)] ⎜ ↳ XP-PEN STAR 06 pad id=23 [slave pointer (2)] ⎜ ↳ XP-PEN STAR 06 pad id=24 [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)] ↳ Video Bus id=8 [slave keyboard (3)] ↳ Power Button id=9 [slave keyboard (3)] ↳ Sleep Button id=10 [slave keyboard (3)] ↳ Integrated_Webcam_HD: Integrate id=11 [slave keyboard (3)] ↳ Logitech USB Receiver id=12 [slave keyboard (3)] ↳ Intel HID events id=17 [slave keyboard (3)] ↳ Intel HID 5 button array id=18 [slave keyboard (3)] ↳ Dell WMI hotkeys id=19 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=20 [slave keyboard (3)] ↳ Logitech USB Receiver id=22 [slave keyboard (3)]
@bahaazahika One more thing. When I run this command xsetwacom --list
I get this:
xsetwacom --list
XP-PEN STAR 06 stylus id: 15 type: STYLUS
XP-PEN STAR 06 pad id: 23 type: PAD
Everyone concerned with this issue, you're welcome to join the new #DIGImend channel on irc.freenode.net, discuss this and other issues, and help each other! Come and say "Hi!"
Tried to implement the patch from ghost above, but there does not seem to be a hid-uclogic.c file.
is this patch already implemented in the latest drivers or what method is recommended to recognize the STAR 06 ?
No there still isn't a driver yet. The reason there's no hid-uclogic.c file is because the code was recently refactored.
Thanks! Do you know when this will be implemented into the kernel drivers? I don't feel confident to make the changes myself.
There is also a beta driver for Linux on the xp-pen site https://www.xp-pen.com/download/index/cid/36.html , but it does not work for me.
this works in recent pulls (at the time of writing this):
add this to "hid-ids.h" after line 53
add this to hid-uclogic-core.c after line 389 { HID_USB_DEVICE(USB_VENDOR_ID_UGEE, USB_DEVICE_ID_UGEE_XPPEN_TABLET_STAR06) },
and this to "hid-uclogic-params.c" after line 1035 case VID_PID(USB_VENDOR_ID_UGEE, USB_DEVICE_ID_UGEE_XPPEN_TABLET_STAR06):
That should compile and work. choppy and buggy but it works.
One thing I noticed: There is a clear difference in behavior between using the wireless USB dongle vs using the regular usb cable.
and this to "hid-uclogic-params.c" after line 1035 case VID_PID(USB_VENDOR_ID_UGEE, USB_DEVICE_ID_UGEE_XPPEN_TABLET_STAR06):
That should compile and work. choppy and buggy but it works.
Sorry, but I don't do too much C in particular, but this just looks like bad code, especially where it's been placed. I've tried this before (I tried something else, so trying it again), and it didn't work for my tablet.
You are suggesting that we we add a "case" statement without a "break", which I would assume is code that is just bound to break. I instantly got an error after creating a .deb file of this.
Hello All,
I am very much interested in getting the support of this tablet. I am a beginner in this driver developement. I can make changes and test if needed. I also own this hardware. Can anyone tell me what is the difficulty in getting this tablet supported in this driver ? I want to get the support iof scroll wheel and buttons.
Meanwhile, I successfully installed this driver(no button support or scroll wheel - only the basic stlylus) on Ubuntu 18.04. I will list down all the changes done.
1) The major change from the above mentioned comments I had to do was to change the drivers to "wacom" instead of "evdev" in the file 52-tablet.conf
This file needs to be kept in the folder /etc/X11/xorg.conf.d/
52-tablet.conf
Section "InputClass"
Identifier "Graphics tablet mouse"
MatchIsKeyboard "on"
MatchProduct "XP-PEN STAR 06"
MatchDevicePath "/dev/input/event*"
Driver "wacom"
# Apply custom Options below.
EndSection
Section "InputClass"
Identifier "Graphics tablet mouse"
MatchIsPointer "on"
MatchProduct "XP-PEN STAR 06"
MatchDevicePath "/dev/input/event*"
Driver "wacom"
# Apply custom Options below.
EndSection
Section "InputClass"
Identifier "Graphics tablet pen"
MatchIsTablet "on"
MatchProduct "XP-PEN STAR 06"
MatchDevicePath "/dev/input/event*"
Driver "wacom"
# Apply custom Options below.
EndSection
2) Fixes on the drivers
add below line to "hid-ids.h" after line "#define USB_DEVICE_ID_UGEE_TABLET_EX07S 0x0071"
#define USB_DEVICE_ID_UGEE_XPPEN_TABLET_STAR06 0x0078
add below line to hid-uclogic-core.c after line "{ HID_USB_DEVICE(USB_VENDOR_ID_UGEE, USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO01) },"
{ HID_USB_DEVICE(USB_VENDOR_ID_UGEE,
USB_DEVICE_ID_UGEE_XPPEN_TABLET_STAR06) },
and below line to "hid-uclogic-params.c" after line "case VID_PID(USB_VENDOR_ID_UGEE, USB_DEVICE_ID_UGEE_TABLET_EX07S):"
case VID_PID(USB_VENDOR_ID_UGEE,
USB_DEVICE_ID_UGEE_XPPEN_TABLET_STAR06):
3) Run "make" and then "sudo make install". After this restart your computer. You should see that the basic functionality is working.
Also run the command
xsetwacom --list devices
XP-PEN STAR 06 Pen stylus id: 15 type: STYLUS
You can also restrict the tablets writing area to a particular display by running the command
xsetwacom set 15 MapToOutput "HDMI-1"
Note: The number "15" is the id of my tablet. Yours might be different. You can find yours when you run the previous command. Also to know which all displays you have, run the command "xrandr"
Also I am using the application xournalapp. If you want to use this app for writing notes, make sure you disable the pessure sensitivity from the option Edit->Preferences->Stylus And remove the selection for "Pressure Sensitivity"
So I contacted XP-pen, and got the engineers to fix the issue with their “driver”. They sent me back a file of a working version of their driver, and I reminded them a while later that they didn’t update their driver on the website. It now works on Ubuntu 18.04, but I don’t like how it works.
You have to run an application and keep it running to get the tablet to work. It would be nice if it could work without seeing the “driver” on the dock (whatever the left bar is called), it ran automatically, and was open source.
I would definitely recommend reaching out to XP-pen and asking if they would be so kind as to release the source code and make it open source. But I’m not good at convincing people to do things. I imagine they wouldn’t mind opening up their driver code to the public, as they didn’t even bother to make sure it worked before having it sit on the website, nor update the publicly available driver for Linux once they put in the work to fix it. To me, they don’t care about the driver, so it shouldn’t be difficult for a smooth talker to convince them to open the driver’s source code and open license it. If they did care about the driver, they would keep it maintained much much better.
Once you can get your hands on the source code, you could reverse engineer it and make it a part of DIGImend.
Like @jeffreyantony I have access to this model of tablet, I'd like better support for it, and I may be able to help with simple testing to bring about that better support.
For those who don't understand enough C to interpret the patches in step 2 of jeffreyantony's comment, it looks like the patches say, "Treat this tablet exactly the same as an EX07S." That would explain why the case
has no break
; the break
would be supplied by the existing code for the EX07S.
My test machine has Ubuntu 16.04. I've made the following software changes to that machine:
xserver-xorg-input-libinput
0.18.0 52-tablet.conf
from jeffreyantony's comment (it says Driver "wacom"
) I did not modify any source code. I didn't install digimend
.
I did not modify any udev .rules
file.
I did not add to 52-tablet.conf
the line InputDevice "tablet" "AlwaysCore"
that I found somewhere on the Web.
Results:
AlwaysCore
statement. When I lift the stylus off of the tablet, the mouse cursor disappears (until the mouse or stylus is used again), which is nice. :-)xev
to find out whether the 8 buttons (6 buttons as-such, plus dial-left & dial-right) generate X11 keysyms. ls /dev
does NOT show /dev/tablet
xsetwacom --list devices
=> Is there a better driver than xserver-xorg-input-libinput
that I can install now in .deb
format?
=> Are there source-code modifications I can make to digimend
that will fix the stylus-button issue (Reservation 1) without the result being "choppy and buggy" as @alkumaish noted?
Other than what I stated above, I haven't noticed my current setup as being "choppy or buggy." But the stylus-button problem is keeping me from using the tablet enough to tell for sure. :)
=> Is there test data I can provide that will help the digimend programmers find out what source-code changes to make, so the stylus buttons will work right & the driver won't be "choppy and buggy" with this tablet?
Attached is USB data as outlined in http://digimend.github.io/support/howto/trbl/diagnostics/
The XP-Pen website indicates in some text (as opposed to a specifications table) that the P01 stylus used with this tablet has two buttons. (The buttons share an actuator whose shape makes it ambiguous as to how many buttons there are.) I assumed that this tablet doesn't collect tilt information. Some of the tests I did only twice, instead of the 3-5 times suggested in the diagnostic instructions.
GitHub_109_XP-Pen_Star06_USBHID-dump.zip
Tentatively I will work on setting up a development environment so I can test the code snippets that were given earlier in this issue thread. (I have a development environment, but not on a machine that has access to this tablet.)
Earlier contributors to this thread have noted that support for this tablet is almost working already. I would think that someone familiar with the DIGImend source code could fix right away (at least some of) the issues noted by those contributors, just by looking at the USB data.
Do some one have working fork ? is there any progress on issue? I saw that xpen realised driver, but I cant get it to work properly on Linux because of 21:9 display. I need ability to limit tablet to some part of the screen. Is it possible?
Ok, got it working. The issue was that my tablet had different device id, 0062 so that's why nothing in this thread worked for me, so for anyone else with same problem, pay attention to your deviceid
The tablet hard buttons work but they act like keyboard buttons, but this is not that important for me at the moment