Giter VIP home page Giter VIP logo

hp-x360-elan-fix's Introduction

HP x360 ELAN Pen Fix

Libinput has some bugs which affect the ELAN Stylus hardware and software distributed with and used by for example the HP Spectre x360. This repository provides a userland driver, which implements workarounds around some of the bugs, namely the following ones:

  1. Before libinput version 1.15, pressing the eraser button wouldn't work with the ELAN Pen. That pen reports one button as Stylus 1, and the other as eraser. However, the eraser doesn't get forwarded through libinput.
    • This driver fixes it by mapping the eraser button to Stylus 2, which can be configured separately in most programs (like xournalpp) to support eraser functionality.
  2. Since somewhere around libinput 1.13.0, libinput reports the pen to not be in proximity of the screen if it didn't move since ~70ms. However, the ELAN Pen has some tolerances built in, which makes it possible to hold still even for multiple seconds. This makes working with drawing programs harder, because tools can be deselected just because one didn't move enough.
    • This driver fixes this problem by moving the pointer by 1 pixel left and right every 50ms if no other event has been received and the pen is in proximity.

Build

To build this project (on linux), make sure that you have the rust compiler rustc and cargo installed. If you don't, follow the instructions on the rust-lang.org installation site.

To build and install, run the following commands:

  • make build will build the userland driver.
  • make install installs the userland driver and systemd service file
  • systemctl enable hp-x360-elan-fix.service causes the userland driver to be run on every startup
  • systemctl start hp-x360-elan-fix.service starts the userland driver without a need to reboot

You can check that the driver is running successfully by checking for the input device ELAN Pen Fix in the output of xinput (and make sure the service is running with systemctl status hp-x360-elan-fix.service).

To uninstall, run make uninstall.

hp-x360-elan-fix's People

Contributors

oberien avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

hp-x360-elan-fix's Issues

Readme Please

Hi,
I have the 15 inch HP Spectre with the same challenges running Debian Buster.
Could we please get a small README.md outlining how you have been compiling and using your button fix?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.