Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lamy EMR button not working under Oxide #136

Closed
Snowflake6 opened this issue Jan 5, 2021 · 25 comments
Closed

Lamy EMR button not working under Oxide #136

Snowflake6 opened this issue Jan 5, 2021 · 25 comments
Assignees
Labels
bug Something isn't working

Comments

@Snowflake6
Copy link

Snowflake6 commented Jan 5, 2021

Describe the bug
Remarkable_hacks adds a number of features to the xochitl interface, one of which is support for the EMR button on the Lamy (and possibly others... Wacom?) stylus. When running xochitl under oxide, the button does not respond. Other hacks applied by the remarkable_hacks install are present however.

To Reproduce
Steps to reproduce the behavior:

  1. Install remarkable_hacks
  2. Open a document
  3. Scribble some content
  4. Push button on EMR pen and try to erase

Expected behavior
Scribbled content should be erased when the button is held down.

Screenshots

Version Information:

  • Device: reMarkable 1
  • OS: 2.5.0.27-patch_17.1.05-0-gccb1643
  • Version e.g. v2.0.1-beta-2

Additional context
Requires an EMR pen with button to test this, I suppose. Not sure if the functionality of the EMR button is identical to the functionality of the new RM stylus that has an eraser on the rear end.

After a clean restart of xochitl outside of Oxide, the button works again. Restarting into Oxide, the button stops.

@Snowflake6 Snowflake6 added bug Something isn't working to-triage This needs to be triaged labels Jan 5, 2021
@Eeems
Copy link
Collaborator

Eeems commented Jan 5, 2021

@ddvk any insight into what I should do to allow it to work would be helpful.

@ddvk
Copy link

ddvk commented Jan 5, 2021

xochitl needs a -plugin evdevlamy param

@Eeems
Copy link
Collaborator

Eeems commented Jan 5, 2021

Alright. So the simple workaround for now would be to update the application registration in oxide to point at a script with those arguments. Oxide doesn't support adding arguments directly.

@Snowflake6
Copy link
Author

Oxide doesn't support adding arguments directly.

Ooh... Maybe a feature request? :)

@Eeems
Copy link
Collaborator

Eeems commented Jan 5, 2021

Perhaps, although it's not something I really want to support. If you need to pass arguments then use a script, otherwise environment variables are preferred. Since there are two workarounds it's not a high priority item. That said, it should be made more automatic so it doesn't require user intervention.

@Eeems Eeems removed the to-triage This needs to be triaged label Jan 5, 2021
@Eeems Eeems added this to the v2.1-beta milestone Jan 5, 2021
@Snowflake6
Copy link
Author

@ddvk, will calling xochitl with "-plugin evdevlamy" work without errors on a non-hacked xochitl? If so, then a default install of oxide could include the script. Otherwise, a remarkable_hacks install will need to look for oxide, and if installed it needs to create the script and update oxide to call it.

@ddvk
Copy link

ddvk commented Jan 5, 2021 via email

@Eeems
Copy link
Collaborator

Eeems commented Jan 5, 2021

@ddvk isn't there an environment variable you can set to load a plugin?

@Eeems Eeems changed the title Lamy EMR button not workung under Oxide Lamy EMR button not working under Oxide Jan 5, 2021
@Eeems
Copy link
Collaborator

Eeems commented Jan 6, 2021

Likely can just use the QT_QPA_GENERIC_PLUGINS environment variable.

@Snowflake6 could you try adding Environment=QT_QPA_GENERIC_PLUGINS=evdevlamy to tarnish.service to see if that solves it?

@Snowflake6
Copy link
Author

Sure... Which one gets updated? i've found a tarnish.service in a number of places with find / | grep tarnish.service

@Eeems
Copy link
Collaborator

Eeems commented Jan 6, 2021

/etc/systemd/system/tarnish.service
You'll also want to run the following after changing it:

systemctl daemon-reload
systemctl restart tarnish

@Snowflake6
Copy link
Author

That file doesn't exist at that location on my RM1:
image

@Snowflake6
Copy link
Author

I have these:
image

@Snowflake6
Copy link
Author

Also, should it be Environment="QT_QPA_GENERIC_PLUGINS=evdevlamy"? The other Environment= statements in the tarnish.service files I have all seem to quote everything after the first "=".

@Eeems
Copy link
Collaborator

Eeems commented Jan 6, 2021

🤦 Sorry, it should be the one in /lib/systemd/system/tarnish.service I forgot that's where it gets put under a normal install.

Also, should it be Environment="QT_QPA_GENERIC_PLUGINS=evdevlamy"? The other Environment= statements in the tarnish.service files I have all seem to quote everything after the first "=".

Yes, sorry I've been replying from my phone and haven't had time to properly check everything.

@Snowflake6
Copy link
Author

I jumped ahead and took a chance with /lib/systemd/system/tarnish.service. Adding the Environment= statement as suggested makes the button work properly again. Perfect!

@Eeems
Copy link
Collaborator

Eeems commented Jan 6, 2021

Perfect, I'll make sure to have toltec handle this properly when installing v2.1

@torwag
Copy link

torwag commented Jan 7, 2021

I can confirm that adding

Environment="QT_QPA_GENERIC_PLUGINS=evdevlamy"

to
/lib/systemd/system/tarnish.service
works.
I also can suggest that people should confirm (repeat) the installation of the lamy-hack from ddvk, which needs to be done after every official update of the remarkable tablet. Don't ask me why I know this ;)
DDVK Stylus hack for Lamy pen button

@Eeems
Copy link
Collaborator

Eeems commented Jan 7, 2021

I've put in a request for remarkable-stylus to be added to toltec. I'll make sure the package properly handles setting the environment for all Qt apps: toltec-dev/toltec#9 (comment)

@Snowflake6
Copy link
Author

@Eeems I think this requires remarkable-hacks as well... Should that be added to toltec?

@Snowflake6
Copy link
Author

image

@Eeems
Copy link
Collaborator

Eeems commented Jan 7, 2021

We can't add remarkable-hacks to toltec due to licensing issues. Although maybe we can add the installer script. I'll talk with the others more about it.

@Snowflake6
Copy link
Author

Understood. I though it might be confusing if people can install remarkable-stylus through toltec and then it doesn't do anything if they don't have remarkable-hacks too.

@Eeems
Copy link
Collaborator

Eeems commented Jan 7, 2021

We'll make sure to have messages warning about it.

@Eeems Eeems removed this from the v2.1-beta milestone Jan 9, 2021
@Eeems
Copy link
Collaborator

Eeems commented Jan 9, 2021

v2.1 is just about to drop. I'll leave this open until we've resolved the toltec side of the packaging for things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants