remarkable_mouse icon indicating copy to clipboard operation
remarkable_mouse copied to clipboard

Wayland/xwayland issue

Open severin-lemaignan opened this issue 3 years ago • 12 comments

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.

severin-lemaignan avatar Nov 06 '20 09:11 severin-lemaignan

can confirm, can't get it working on sway

tuxPT avatar Jan 21 '21 23:01 tuxPT

Does screeninfo list the monitors correctly on Wayland?

On Jan 21, 2021 6:43 PM, "Leonardo Costa" [email protected] 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 avatar Jan 22 '21 00:01 Evidlo

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

edit: screeninfo does support Wayland

Evidlo avatar Jan 22 '21 00:01 Evidlo

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.

Evidlo avatar Jan 22 '21 00:01 Evidlo

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

tuxPT avatar Jan 24 '21 19:01 tuxPT

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

tuxPT avatar Jan 24 '21 20:01 tuxPT

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

tuxPT avatar Feb 08 '21 16:02 tuxPT

@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...

tsmithe avatar May 13 '21 14:05 tsmithe

@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.

tuxPT avatar May 13 '21 14:05 tuxPT

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

tsmithe avatar May 13 '21 15:05 tsmithe

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

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

Evidlo avatar May 15 '21 00:05 Evidlo

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.

7RST1 avatar Jun 06 '22 01:06 7RST1