<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Palm rejection not working with wacom pen and touch screen"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=104680">104680</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Palm rejection not working with wacom pen and touch screen
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Wayland
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>XWayland
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>wayland-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ragtag@ragtag.net
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>xorg-team@lists.x.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>On my ThinkPad S1 Yoga (model nr. 20DLCTO1WW) running Ubuntu Gnome 17.10, with
Wayland and libinput 1.8.2, which has both a Wacom EMR (passive) stylus and a
touch screen.

The stylus is detected when it comes within 1 cm or so from the screen, and
ideally the touch screen should be disabled at this point, so you can rest your
hand on the screen while writing or drawing, without causing accidental
touches.

There was a somewhat hacky python script that solved this, that I contributed
to ( <a href="https://github.com/ragtag/spin">https://github.com/ragtag/spin</a> ), but this no longer works as the xinput
command used to detect pen proximity no longer works.

"xinput --list" returns:

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ xwayland-pointer:13                       id=6    [slave  pointer  (2)]
⎜   ↳ xwayland-relative-pointer:13              id=7    [slave  pointer  (2)]
⎜   ↳ xwayland-stylus:13                        id=10   [slave  pointer  (2)]
⎜   ↳ xwayland-eraser:13                        id=11   [slave  pointer  (2)]
⎜   ↳ xwayland-cursor:13                        id=12   [slave  pointer  (2)]
⎜   ↳ xwayland-touch:13                         id=9    [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ xwayland-keyboard:13                      id=8    [slave  keyboard (3)]

But when running 'xinput query-state "xwayland-stylus:13"', none of the values
change, including Proximity, which is what the Python was using to know when to
disable the touchscreen.

"sudo libinput debug-events" does detect the pen perfectly, including noting
proximity-in and proximity-out.

I originally wanted to update the spin Python script to work with Wayland, but
quickly found that much of what it does, such as automatic screen rotation, was
already implemented and working, so it would be great to see these final little
issues fixed too. I originally posted a bug report on it here
<a href="https://github.com/linuxwacom/wacom-hid-descriptors/issues/18">https://github.com/linuxwacom/wacom-hid-descriptors/issues/18</a>

That said, if this is something that will or should not be fixed in XWayland, I
would love to get a pointer in the right direction for how to correctly handle
proximity detection from Python, so I can re-write spin to work correctly in
Wayland.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>