Results 1 to 10 of 33

Thread: Karmic: x200 tablet problem switching between tablet mode and back kills stylus

Hybrid View

  1. #1
    Join Date
    Dec 2009
    Beans
    13

    Karmic: x200 tablet problem switching between tablet mode and back kills stylus

    Hello,
    I'm having problem with the tablet function when switching from normal laptop mode to tablet mode (monitor flipped and folded) and back. I'm using Karmic on a Lenovo x200 tablet with 'Enhanced multitouch' (Lenovo's term to differentiate "multitouch: pen and one point touch" and "enhanced multitouch: pen and two points touch").

    I used the the solution by rec and favux [link] which was summarized in this blog: [link].

    After doing all the steps, and rebooted, the feature works for a while. I re-oriented to tablet mode, and the stylus reorients itself to portrait - works great. But immediately after that, after i re-oriented to normal, the stylus just stopped working altogether. I had to reboot to get it to work again, but switching to tablet mode and back still kills the stylus.

    Also, in the solution it mentioned of three types of input: stylus, touch, and eraser. I did:
    Code:
    $ xinput --list
    "Virtual core pointer"	id=0	[XPointer]
    	Num_buttons is 32
    	Num_axes is 2
    	Mode is Relative
    	Motion_buffer is 256
    	Axis 0 :
    		Min_value is -1
    		Max_value is -1
    		Resolution is 0
    	Axis 1 :
    		Min_value is -1
    		Max_value is -1
    		Resolution is 0
    "Virtual core keyboard"	id=1	[XKeyboard]
    	Num_keys is 248
    	Min_keycode is 8
    	Max_keycode is 255
    "Power Button"	id=2	[XExtensionKeyboard]
    	Type is KEYBOARD
    	Num_keys is 248
    	Min_keycode is 8
    	Max_keycode is 255
    "Sleep Button"	id=3	[XExtensionKeyboard]
    	Type is KEYBOARD
    	Num_keys is 248
    	Min_keycode is 8
    	Max_keycode is 255
    "ThinkPad Extra Buttons"	id=4	[XExtensionKeyboard]
    	Type is KEYBOARD
    	Num_keys is 248
    	Min_keycode is 8
    	Max_keycode is 255
    "AT Translated Set 2 keyboard"	id=5	[XExtensionKeyboard]
    	Type is KEYBOARD
    	Num_keys is 248
    	Min_keycode is 8
    	Max_keycode is 255
    "UVC Camera (17ef:480c)"	id=6	[XExtensionKeyboard]
    	Type is KEYBOARD
    	Num_keys is 248
    	Min_keycode is 8
    	Max_keycode is 255
    "PnP Device (WACf00c)"	id=7	[XExtensionKeyboard]
    	Type is Wacom Stylus
    	Num_keys is 248
    	Min_keycode is 8
    	Max_keycode is 255
    	Num_buttons is 32
    	Num_axes is 6
    	Mode is Absolute
    	Motion_buffer is 256
    	Axis 0 :
    		Min_value is 0
    		Max_value is 26312
    		Resolution is 2540
    	Axis 1 :
    		Min_value is 0
    		Max_value is 16520
    		Resolution is 2540
    	Axis 2 :
    		Min_value is 0
    		Max_value is 255
    		Resolution is 1
    	Axis 3 :
    		Min_value is -64
    		Max_value is 63
    		Resolution is 1
    	Axis 4 :
    		Min_value is -64
    		Max_value is 63
    		Resolution is 1
    	Axis 5 :
    		Min_value is 0
    		Max_value is 1023
    		Resolution is 1
    "Video Bus"	id=8	[XExtensionKeyboard]
    	Type is KEYBOARD
    	Num_keys is 248
    	Min_keycode is 8
    	Max_keycode is 255
    "PnP Device (WACf00c) eraser"	id=9	[XExtensionKeyboard]
    	Type is Wacom Eraser
    	Num_keys is 248
    	Min_keycode is 8
    	Max_keycode is 255
    	Num_buttons is 32
    	Num_axes is 6
    	Mode is Absolute
    	Motion_buffer is 256
    	Axis 0 :
    		Min_value is 0
    		Max_value is 26312
    		Resolution is 2540
    	Axis 1 :
    		Min_value is 0
    		Max_value is 16520
    		Resolution is 2540
    	Axis 2 :
    		Min_value is 0
    		Max_value is 255
    		Resolution is 1
    	Axis 3 :
    		Min_value is -64
    		Max_value is 63
    		Resolution is 1
    	Axis 4 :
    		Min_value is -64
    		Max_value is 63
    		Resolution is 1
    	Axis 5 :
    		Min_value is 0
    		Max_value is 1023
    		Resolution is 1
    "TPPS/2 IBM TrackPoint"	id=10	[XExtensionPointer]
    	Type is MOUSE
    	Num_buttons is 5
    	Num_axes is 2
    	Mode is Relative
    	Motion_buffer is 256
    	Axis 0 :
    		Min_value is -1
    		Max_value is -1
    		Resolution is 1
    	Axis 1 :
    		Min_value is -1
    		Max_value is -1
    		Resolution is 1
    "Macintosh mouse button emulation"	id=11	[XExtensionPointer]
    	Type is MOUSE
    	Num_buttons is 5
    	Num_axes is 2
    	Mode is Relative
    	Motion_buffer is 256
    	Axis 0 :
    		Min_value is -1
    		Max_value is -1
    		Resolution is 1
    	Axis 1 :
    		Min_value is -1
    		Max_value is -1
    		Resolution is 1
    and there are only 'stylus' and 'eraser', but no 'touch'. (Note: I think the "Wacom Stylus" and "Wacom Eraser" entries are from after I implemented rec's script.)

    gali98 suggested editing the .fdi file in this solution: [link] (which is an extension to rec & favux's solution). I tried the same script gali98 provided, but then the stylus doesn't work altogether. I had to revert back to the original .fdi file to get it to work back.

    I tried to install the newest linuxwacom driver: [link] linuxwacom-0.8.5-6, but it failed in $ make with a bunch of errors:
    Code:
    $ make
    
    *** snipped ***
    
    /bin/bash ../../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src/include    -Wall -pedantic  -g -O2 -D__amd64__ -MT wacomcfg.lo -MD -MP -MF .deps/wacomcfg.Tpo -c -o wacomcfg.lo wacomcfg.c
     gcc -DHAVE_CONFIG_H -I. -I../../src/include -Wall -pedantic -g -O2 -D__amd64__ -MT wacomcfg.lo -MD -MP -MF .deps/wacomcfg.Tpo -c wacomcfg.c  -fPIC -DPIC -o .libs/wacomcfg.o
    In file included from wacomcfg.c:36:
    wacomcfg.h:26:22: error: X11/Xlib.h: No such file or directory
    wacomcfg.h:27:35: error: X11/extensions/XInput.h: No such file or directory
    wacomcfg.h:28:36: error: X11/extensions/XIproto.h: No such file or directory
    In file included from wacomcfg.c:36:
    wacomcfg.h:58: error: expected specifier-qualifier-list before ‘Display’
    wacomcfg.h:62: warning: struct has no members
    wacomcfg.h:67: error: expected specifier-qualifier-list before ‘XDevice’
    wacomcfg.h:75: error: expected ‘)’ before ‘*’ token
    
    *** snipped ***
    
    make: *** [all-recursive] Error 1
    I'm really feeling out of luck and ideas right now. I'm quite a newbie at Linux. I hope someone could help me. The reason I got the x200 is to be able to use the tablet mode to work in Gimp & edit my thesis (I find reading and writing papers are much more convenient in portrait...).

    Thanks in advance,
    M
    Last edited by bungjamu; December 15th, 2009 at 11:20 PM.

  2. #2
    Join Date
    Nov 2008
    Beans
    9,635
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Karmic: x200 tablet problem switching between tablet mode and back kills stylus

    Hi bungjamu,

    Welcome to Ubuntu Forums!

    The good news is that things are changing so fast with linuxwacom, that if we can't get touch working right now, we probably will be able to within a few weeks.

    Your X200t is so new that it is not supported by the default linuxwacom (0.8.4-1) in Karmic. In linuxwacom 0.8.5-5:
    Updated serial ISDv4 support with newer protocol.
    and with 0.8.5-6:
    Support new serial Tablet PCs.
    Which probably includes yours.

    So you were right, for touch (and maybe stylus?) you want linuxwacom 0.8.5-6. I have to warn you that right now the xsetwacom rotate commands aren't working correctly with it, at least on my system. That may not be true of yours in Karmic.

    Another problem is that there seems to be a bug in 64-bit Karmic for serial tablets, but things seem to work fine with 32-bit installs. Which do you have? Some have reported restarting X fixes things for them. A few have reported the latest updates have fixed it.

    Regarding doing the linuxwacom compile and install it looks like you don't have libx11-dev installed. It should place Xlib.h in "/usr/include/X11/Xlib.h". And several other dependencies. If you followed this HOW TO, this command should have installed them:
    Code:
    sudo apt-get install build-essential libx11-dev libxi-dev x11proto-input-dev xserver-xorg-dev tk8.4-dev tcl8.4-dev libncurses5-dev
    Attached to the bottom of the same HOW TO are two .fdi's you could use, either the serial tablet one or the new-generic rc1. Instructions in Section 2 b). With the serial table pc .fdi you'll need to add 'WACf00c' to the identifiers. With them you do not need rec's script and should remove it. Besides from your xinput it doesn't seem to be working anyway.

    Yours is a serial tablet pc, which is why gali98's .fdi didn't work for you.

    Hope this is helpful.
    Last edited by Favux; December 16th, 2009 at 01:07 AM.

  3. #3
    Join Date
    Dec 2009
    Beans
    13

    Re: Karmic: x200 tablet problem switching between tablet mode and back kills stylus

    Thanks, Favux, you're a great help!

    A little report on my experience with this fix.
    - with that X11 components installed, I was able to install the linuxwacom-0.8.5-6 driver.
    - the driver detected the touch interface, so now I have touch input! yay!
    - I tried the two .fdi, and you're right, it seems to work better with the serial one (Favux_serial-tablet-pc1_10-wacom.fdi.txt). I used it to replace the 10-linuxwacom.fdi with some modifications. Your original was (with your note to add 'WACf00c' as an identifier):
    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    
    <deviceinfo version="0.2">
      <device>
        <match key="info.capabilities" contains="serial">
          <match key="@info.parent:pnp.id" contains_outof="WACf00c;WACf008;WACf009;FUJ02e5">
    	<append key="info.capabilities" type="strlist">input</append>
    	<merge key="input.x11_driver" type="string">wacom</merge>
    	<merge key="input.x11_options.Type" type="string">stylus</merge>
    	<merge key="input.x11_options.ForceDevice" type="string">ISDV4</merge>
    	<merge key="input.device" type="copy_property">serial.device</merge>
    	  <append key="info.callouts.add" type="strlist">hal-setup-wacom</append>
    	  <append key="wacom.types" type="strlist">eraser</append>
            <match key="@info.parent:pnp.id" contains_outof="WACf00c;WACf008;WACf009">
    	  <!-- Serial tablets with touch capabilities -->
    	  <append key="wacom.types" type="strlist">touch</append>
    	</match>
            <match key="@info.parent:pnp.id" contains_outof="WACf008">
              <!-- Serial tablets that operate at higher baud rate -->
              <merge key="input.x11_options.BaudRate" type="string">38400</merge>
           </match>
          </match>
        </match>
      </device>
      <device>
        <match key="input.x11_options.Type" contains="eraser">
          <merge key="info.product" type="string">eraser</merge>
        </match>
      </device>
      <device>
        <match key="input.x11_options.Type" contains="touch">
          <merge key="info.product" type="string">touch</merge>
        </match>
      </device>
    </deviceinfo>
    - It works fine that it keeps the stylus alive after switching to tablet mode and back, but the only recognized devices are only 'touch' and 'eraser'. So tried to tweak it a bit to:
    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    
    <deviceinfo version="0.2">
      <device>
        <match key="info.capabilities" contains="serial">
          <match key="@info.parent:pnp.id" contains_outof="WACf00c;WACf008;WACf009;FUJ02e5">
    	<append key="info.capabilities" type="strlist">input</append>
    	<merge key="input.x11_driver" type="string">wacom</merge>
    	<merge key="input.x11_options.Type" type="string">stylus</merge>
    	<merge key="input.x11_options.ForceDevice" type="string">ISDV4</merge>
    	<merge key="input.device" type="copy_property">serial.device</merge>
    	  <append key="info.callouts.add" type="strlist">hal-setup-wacom</append>
    	  <append key="wacom.types" type="strlist">eraser</append>
            <match key="@info.parent:pnp.id" contains_outof="WACf00c;WACf008;WACf009">
    	  <!-- Serial tablets with touch capabilities -->
    	  <append key="wacom.types" type="strlist">touch</append>
    	</match>
            <match key="@info.parent:pnp.id" contains_outof="WACf00c;WACf008;WACf009">
              <!-- Serial tablets that operate at higher baud rate -->
              <merge key="input.x11_options.BaudRate" type="string">38400</merge>
           </match>
          </match>
        </match>
      </device>
      <device>
        <match key="input.x11_options.Type" contains="stylus">
          <merge key="info.product" type="string">stylus</merge>
        </match>
      </device>
      <device>
        <match key="input.x11_options.Type" contains="eraser">
          <merge key="info.product" type="string">eraser</merge>
        </match>
      </device>
      <device>
        <match key="input.x11_options.Type" contains="touch">
          <merge key="info.product" type="string">touch</merge>
        </match>
      </device>
    </deviceinfo>
    - And now it registers all three 'stylus', 'touch' and 'eraser'.
    - You're right about the warning... xsetwacom set ..rotate didn't work well. I'm guessing it's just a simple orientation fix in the code? Two things I noticed:
    1. after the display rotated when in tablet mode, with the stylus or touch, the cursor moves relative to landscape mode. So the control is not rotated along with my display (my display's rotated clockwise in tablet mode). Even after doing xsetwacom rotate. The trackpoint works fine, fyi. I tried:
    Code:
    xsetwacom set stylus rotate cw
    xsetwacom set stylus rotate ccw
    I also tried with replacing 'stylus' with 'touch'
    2. doing the xsetwacom rotate command also displaces the pen tip/fingertip with the cursor by a wide margin. Recalibrating with '$wacomcpl' works sometimes.

    I have to go for now, but I'll let you know if there's any other thing that occurred to me.

    Thank you again for your great help!
    M

  4. #4
    Join Date
    Nov 2008
    Beans
    9,635
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Karmic: x200 tablet problem switching between tablet mode and back kills stylus

    Hi bungjamu,

    Great! Nice work. You're welcome.

    The stylus part is my goof. I left out a line, I'm not sure how.

    I'm not sure from what you posted that your tablet needs the higher baud rate. Could you please test the attached .fdi and see if it works for you? I'd appreciate it. If you need to add your tablet to the higher baud rate let me know.

    Unfortunately you're seeing what I'm seeing with rotation. The rotation problem seems to be a code error in linuxwacom, starting with 0.8.5-4. Right now they are adding a ton of new devices, trying to get it to work with Xserver 1.7, and syncing with the Xorg xf86-input-wacom driver. Linuxwacom is the last big input driver to be brought into Xorg.
    Attached Files Attached Files

  5. #5
    Join Date
    Dec 2009
    Beans
    13

    Re: Karmic: x200 tablet problem switching between tablet mode and back kills stylus

    Glad to know it's being worked on Thank goodness for community.

    Your new .fdi works great! In addition - this is something I didn't expect, and if you didn't intend this, you should open up a bottle of good wine and celebrate: two finger gestures are being recognized. I can scroll this page, resize the fonts using two-finger swipes and pinching, respectively. I can even use the swipe to scroll in the terminal. What's weird, though, I was able to scroll the page using the finger gesture in Chrome Beta in Karmic, but not in Chrome in Win 7 (maybe because it's not Beta).

    Switching back and forth, to and from tablet mode keeps the touch/stylus functions alive. In addition, there is no noticable displacements between the finger/stylus tip when switching back to normal (landscape) mode. While rotated, orientation is still not working, but multitouch works. No finger gestures/touch in Gimp, though, although the Edit>Preferences>Extended Input Device is set that 'touch' is enabled to 'screen'.

    Quite frankly, when I edited the .fdi file, I didn't know what I was doing...I guess I don't need the high baudrate for the tablet. What is the current baudrate is for?

    Thanks again, Favux! Your help is much appreciated! Now I'm just waiting for the orientation fix, and I'm all set!
    M

  6. #6
    Join Date
    Nov 2008
    Beans
    9,635
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Karmic: x200 tablet problem switching between tablet mode and back kills stylus

    Hi bungjamu,

    Outstanding! We've also gotten some multi-touch gestures working with the new Bamboo P & T's (those required patches to linuxwacom). The dev.s have been adding gestures to the 0.8.5 series, esp. the last couple versions.

    The default baud rate is 9600. Glad you confirmed that the WACf00c operates at that rate. Best of all now I can update the .fdi with some confidence due to your feedback.

    I also hope for quick repair of the rotation stuff as I would like to move up to the 0.8.5 series full time. By the way, what rotation script are you using for rotation?

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •