Evidlo / remarkable_mouse

use your reMarkable as a graphics tablet
GNU General Public License v3.0
515 stars 50 forks source link

Wayland/xwayland issue #41

Open severin-lemaignan opened 4 years ago

severin-lemaignan commented 4 years ago

Starting remouse (commit 89505ec975) this morning on Ubuntu 20.04 on a wayland session, I get these errors:

$ sudo remouse --address 192.168.0.23 --key ~/.ssh/remarkable --monitor 1 --evdev
connected to 192.168.0.23
Created virtual input device '/dev/input/event25'
Error setting orientation: b'WARNING: running xinput against an Xwayland server. See the xinput man page for details.\nunable to find device reMarkable tablet stylus\n'
Error setting monitor: b"WARNING: running xinput against an Xwayland server. See the xinput man page for details.\nunable to find device 'reMarkable tablet stylus'\n"
Error setting pressure threshold: b'WARNING: running xinput against an Xwayland server. See the xinput man page for details.\nunable to find device reMarkable tablet stylus\n'
Error setting fit: b'WARNING: running xinput against an Xwayland server. See the xinput man page for details.\nunable to find device reMarkable tablet stylus\n'

and indeed, the monitor is not properly selected.

...not sure why xinput and xwayland are triggered here... any idea?

libinput list-devices does list the tablet, as expect.

tuxPT commented 3 years ago

can confirm, can't get it working on sway

Evidlo commented 3 years ago

Does screeninfo list the monitors correctly on Wayland?

On Jan 21, 2021 6:43 PM, "Leonardo Costa" notifications@github.com wrote:

can confirm, can't get it working on sway

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Evidlo/remarkable_mouse/issues/41#issuecomment-765012190, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJT7YOPTYJA7W7XWOS75ADS3C3Z5ANCNFSM4TMNHVAA .

Evidlo commented 3 years ago

I'm guessing that screeninfo doesn't support Wayland yet.

edit: screeninfo does support Wayland

Evidlo commented 3 years ago

I just tested this on Sway/Debian 10 and the problem seems to be that 'xinput' doesn't work as root.

Normally this is because $DISPLAY is set incorrectly, but in my case it seems correct.

tuxPT commented 3 years ago

btw, my libinput list-devices does not list the tablet either with evdev or without, and root/non root

tuxPT commented 3 years ago

It does however receive positional info from the pen when I put --debug flag image image

tuxPT commented 3 years ago

After seeing various forks, this fork works on sway, but it still has errors. Basically he replaced /dev/event with /dev/touchscreen

tsmithe commented 3 years ago

@tuxPT Is it worth trying that fork? (What errors do you refer to?) I'm looking for a way to get something like remouse working on Sway!

Edit to say that: I did try remouse upstream (ie., from this repo), but couldn't get any response from libinput, whether I used --evdev or not, whether I used the udev quirk or not, and whether I ran as root or not...

tuxPT commented 3 years ago

@tsmithe I use sway on archlinux. The errors I don't remember but I think it was the same as upstream. Besides console printing errors, the remouse worked fine, I don't use it in a while.

Edit: I think you have to use the evdev flag in the fork

Edit2: I think I have run with sudo -EH remouse --evdev . Because of some environment variable problem.

tsmithe commented 3 years ago

Amazing, thanks, that works! I'm very grateful :-)

Evidlo commented 3 years ago

BTW, sudo -EH ... doesn't work on some distributions because -E specifically excludes PATH.

sudo --preserve-env=PATH ... should work everywhere.

7RST1 commented 2 years ago

I got this working through the fix mentioned here, however the virtual pointer only affects XWayland windows, meaning I can't use it with any drawing applications I have installed.

I'm guessing there's nothing to do about it in this project, and we just have to wait for upstream pyinput wayland support? Looks like the necessary Wayland protocols still aren't implemented.

Evidlo commented 1 week ago

@7RST1 I would just use it with the --evdev option, which bypasses pynput entirely.