GithubHelp home page GithubHelp logo

Comments (30)

feschber avatar feschber commented on May 28, 2024

What exact version are you using? I tried but could not reproduce the issue. Also, are the keys actually not released or is it just the warning?

from lan-mouse.

ICE-GB avatar ICE-GB commented on May 28, 2024

https://github.com/feschber/lan-mouse/tree/e2c47d30969558351799b85eac91b4a5db6c756e this commit

from lan-mouse.

ICE-GB avatar ICE-GB commented on May 28, 2024

actually not released

from lan-mouse.

feschber avatar feschber commented on May 28, 2024

It's a bit weird because there are three cases where keys are released:

  • A client is unresponsive
  • A client disconnects by pressing Ctrl + Alt + Shift + Win
  • Lan Mouse terminates.

In the red marked instances it can really only be the second case because otherwise it would also print device not responding.
What might be happening is, that one of the KeyReleaseEvents arrives before the Disconnect event. This would explain why there are Keys missing from the log.

To see exactly whats going on, you could run LanMouse with LAN_MOUSE_LOG_LEVEL=trace as an environment variable (I believe in windows you would run $env:LAN_MOUSE_LOG_LEVEL=trace) and paste the output here when the issue occurs.

from lan-mouse.

feschber avatar feschber commented on May 28, 2024

I noticed another issue with hyprland in particular, where the cursor is released by hyprland when I have two monitors connected (which is out of my control and likely a bug in Hyprland).
Maybe that is related as well. I will see if I can bisect that ...

from lan-mouse.

ICE-GB avatar ICE-GB commented on May 28, 2024

Yes, it's the second case, press the key combination to release it, thanks for the answer, I'll try to change the log level when I have time

from lan-mouse.

ICE-GB avatar ICE-GB commented on May 28, 2024

The last thing I pressed was win, and after releasing the first three buttons, the log looks like this.

002

Sorry, my use of >> to redirect to the log file doesn't seem to work

from lan-mouse.

ICE-GB avatar ICE-GB commented on May 28, 2024

before disconnect log

003

from lan-mouse.

feschber avatar feschber commented on May 28, 2024

Okay that is interesting. The Key press event is received after the modifier event.

Wayland docs say: "If this event produces a change in modifiers, then the resulting wl_keyboard.modifiers event must be sent after this event."
So this could be either a bug in Hyprland or packet reordering because of udp.

Could you also attach a trace from the Hyprland side so that I can see whats going on?

And maybe attach the exact version of Hyprland you are using so I can try to reproduce.

I should probably update the code to use the pressed keys instead of the modifier state regardless.

from lan-mouse.

ICE-GB avatar ICE-GB commented on May 28, 2024

Hyprland version: https:github.com/hyprwm/Hyprland/releases/tag/v0.34.0
By the way, when I was using the latest commit a few days ago the mouse could only move in one direction after moving to the windows.
So I went back to the release version.

from lan-mouse.

ICE-GB avatar ICE-GB commented on May 28, 2024

Could you also attach a trace from the Hyprland side so that I can see whats going on?

What should I do? I'm not sure how to get the hyprland trace logs.

from lan-mouse.

feschber avatar feschber commented on May 28, 2024

Same as in windows

export LAN_MOUSE_LOG_LEVEL=trace
cargo run --release

(or lan-mouse if you are using the binary version)

from lan-mouse.

feschber avatar feschber commented on May 28, 2024

By the way, when I was using the latest commit a few days ago the mouse could only move in one direction after moving to the windows. So I went back to the release version.

Are you talking about hyprland or lan-mouse? Because I noticed that, too

from lan-mouse.

ICE-GB avatar ICE-GB commented on May 28, 2024

Sorry, I made a mistake, I thought it was hyprland's log. My English is terrible

from lan-mouse.

ICE-GB avatar ICE-GB commented on May 28, 2024

By the way, when I was using the latest commit a few days ago the mouse could only move in one direction after moving to the windows. So I went back to the release version.

hyprland version

from lan-mouse.

ICE-GB avatar ICE-GB commented on May 28, 2024

https://github.com/feschber/lan-mouse/tree/e2c47d30969558351799b85eac91b4a5db6c756e this commit

lan-mouse is this with #78

from lan-mouse.

feschber avatar feschber commented on May 28, 2024

By the way, when I was using the latest commit a few days ago the mouse could only move in one direction after moving to the windows.

Found the offending commit, I will open a bug report on the Hyprland repo: hyprwm/Hyprland@c4da4b0

from lan-mouse.

ICE-GB avatar ICE-GB commented on May 28, 2024

Same as in windows

export LAN_MOUSE_LOG_LEVEL=trace
cargo run --release

(or lan-mouse if you are using the binary version)

Regarding this log, I will try again tomorrow when I have time.

from lan-mouse.

feschber avatar feschber commented on May 28, 2024

Sure, no problem!

from lan-mouse.

ICE-GB avatar ICE-GB commented on May 28, 2024
[2024-01-18T00:40:37Z TRACE lan_mouse::server] motion(1,0)          ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:37Z TRACE lan_mouse::server] producer: (0) Pointer(Motion { time: 514794787, relative_x: 0.0, relative_y: -1.0 })
[2024-01-18T00:40:37Z TRACE lan_mouse::server] producer: (0) Pointer(Motion { time: 514794788, relative_x: 1.0, relative_y: 0.0 })
[2024-01-18T00:40:37Z TRACE lan_mouse::server] motion(0,-1)         ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:37Z TRACE lan_mouse::server] motion(1,0)          ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:37Z TRACE lan_mouse::server] producer: (0) Pointer(Motion { time: 514794791, relative_x: 1.0, relative_y: 0.0 })
[2024-01-18T00:40:37Z TRACE lan_mouse::server] motion(1,0)          ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:37Z TRACE lan_mouse::server] producer: (0) Pointer(Motion { time: 514794794, relative_x: 1.0, relative_y: -1.0 })
[2024-01-18T00:40:37Z TRACE lan_mouse::server] motion(1,-1)         ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:37Z TRACE lan_mouse::server] producer: (0) Pointer(Motion { time: 514794797, relative_x: 1.0, relative_y: 0.0 })
[2024-01-18T00:40:37Z TRACE lan_mouse::server] motion(1,0)          ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:37Z TRACE lan_mouse::server] producer: (0) Pointer(Motion { time: 514794801, relative_x: 1.0, relative_y: 0.0 })
[2024-01-18T00:40:37Z TRACE lan_mouse::server] motion(1,0)          ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:37Z TRACE lan_mouse::server] producer: (0) Pointer(Motion { time: 514794805, relative_x: 1.0, relative_y: 0.0 })
[2024-01-18T00:40:37Z TRACE lan_mouse::server] motion(1,0)          ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:37Z TRACE lan_mouse::server] producer: (0) Pointer(Motion { time: 514794809, relative_x: 0.0, relative_y: -1.0 })
[2024-01-18T00:40:37Z TRACE lan_mouse::server] motion(0,-1)         ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z TRACE lan_mouse::server] producer: (0) Pointer(Motion { time: 514794862, relative_x: -1.0, relative_y: 0.0 })
[2024-01-18T00:40:38Z TRACE lan_mouse::server] motion(-1,0)         ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z TRACE lan_mouse::server] producer: (0) Pointer(Motion { time: 514794870, relative_x: -1.0, relative_y: 0.0 })
[2024-01-18T00:40:38Z TRACE lan_mouse::server] motion(-1,0)         ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z TRACE lan_mouse::server] producer: (0) Pointer(Motion { time: 514794873, relative_x: 0.0, relative_y: 1.0 })
[2024-01-18T00:40:38Z TRACE lan_mouse::server] motion(0,1)          ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z TRACE lan_mouse::server] producer: (0) Pointer(Motion { time: 514794877, relative_x: -1.0, relative_y: 0.0 })
[2024-01-18T00:40:38Z TRACE lan_mouse::server] motion(-1,0)         ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z TRACE lan_mouse::server] producer: (0) Pointer(Motion { time: 514794888, relative_x: -1.0, relative_y: 0.0 })
[2024-01-18T00:40:38Z TRACE lan_mouse::server] motion(-1,0)         ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z TRACE lan_mouse::server] producer: (0) Pointer(Motion { time: 514794894, relative_x: 0.0, relative_y: 1.0 })
[2024-01-18T00:40:38Z TRACE lan_mouse::server] motion(0,1)          ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z DEBUG lan_mouse::server] state: Sending => waiting 500ms for client to respond ...
[2024-01-18T00:40:38Z TRACE lan_mouse::server] ping                 ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z TRACE lan_mouse::server] pong                 <-<-<-<------ 10.215.58.254:4242 (0)
[2024-01-18T00:40:38Z TRACE lan_mouse::server] producer: (0) Keyboard(Key { time: 514795330, key: 29, state: 1 })
[2024-01-18T00:40:38Z TRACE lan_mouse::server] producer: (0) Keyboard(Modifiers { mods_depressed: 4, mods_latched: 0, mods_locked: 16, group: 0 })
[2024-01-18T00:40:38Z TRACE lan_mouse::server] key(29, 1)           ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z TRACE lan_mouse::server] modifiers(4,0,16,0)  ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z TRACE lan_mouse::server] ping                 <-<-<-<------ 10.215.58.254:4242 (0)
[2024-01-18T00:40:38Z TRACE lan_mouse::server] pong                 ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z TRACE lan_mouse::server] producer: (0) Keyboard(Key { time: 514795452, key: 56, state: 1 })
[2024-01-18T00:40:38Z TRACE lan_mouse::server] producer: (0) Keyboard(Modifiers { mods_depressed: 12, mods_latched: 0, mods_locked: 16, group: 0 })
[2024-01-18T00:40:38Z TRACE lan_mouse::server] key(56, 1)           ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z TRACE lan_mouse::server] modifiers(12,0,16,0) ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z TRACE lan_mouse::server] producer: (0) Keyboard(Key { time: 514795546, key: 42, state: 1 })
[2024-01-18T00:40:38Z TRACE lan_mouse::server] producer: (0) Keyboard(Modifiers { mods_depressed: 13, mods_latched: 0, mods_locked: 16, group: 0 })
[2024-01-18T00:40:38Z TRACE lan_mouse::server] key(42, 1)           ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z TRACE lan_mouse::server] modifiers(13,0,16,0) ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z DEBUG lan_mouse::server] state: Sending => waiting 500ms for client to respond ...
[2024-01-18T00:40:38Z TRACE lan_mouse::server] ping                 ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z TRACE lan_mouse::server] pong                 <-<-<-<------ 10.215.58.254:4242 (0)
[2024-01-18T00:40:38Z TRACE lan_mouse::server] producer: (0) Keyboard(Key { time: 514795783, key: 125, state: 1 })
[2024-01-18T00:40:38Z TRACE lan_mouse::server] producer: (0) Keyboard(Modifiers { mods_depressed: 77, mods_latched: 0, mods_locked: 16, group: 0 })
[2024-01-18T00:40:38Z DEBUG lan_mouse::backend::producer::wayland] releasing pointer
[2024-01-18T00:40:38Z TRACE lan_mouse::server] STATE ===> Receiving
[2024-01-18T00:40:38Z TRACE lan_mouse::server] key(125, 1)          ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z TRACE lan_mouse::server] disconnect           ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:38Z TRACE lan_mouse::server] ping                 <-<-<-<------ 10.215.58.254:4242 (0)
[2024-01-18T00:40:38Z TRACE lan_mouse::server] pong                 ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:39Z TRACE lan_mouse::server] ping                 <-<-<-<------ 10.215.58.254:4242 (0)
[2024-01-18T00:40:39Z TRACE lan_mouse::server] pong                 ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:39Z TRACE lan_mouse::server] ping                 <-<-<-<------ 10.215.58.254:4242 (0)
[2024-01-18T00:40:39Z TRACE lan_mouse::server] pong                 ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:40Z TRACE lan_mouse::server] ping                 <-<-<-<------ 10.215.58.254:4242 (0)
[2024-01-18T00:40:40Z TRACE lan_mouse::server] pong                 ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:41Z TRACE lan_mouse::server] ping                 <-<-<-<------ 10.215.58.254:4242 (0)
[2024-01-18T00:40:41Z TRACE lan_mouse::server] pong                 ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:41Z TRACE lan_mouse::server] ping                 <-<-<-<------ 10.215.58.254:4242 (0)
[2024-01-18T00:40:41Z TRACE lan_mouse::server] pong                 ------>->->-> 10.215.58.254:4242
[2024-01-18T00:40:42Z TRACE lan_mouse::server] ping                 <-<-<-<------ 10.215.58.254:4242 (0)
[2024-01-18T00:40:42Z TRACE lan_mouse::server] pong                 ------>->->-> 10.215.58.254:4242
^C[2024-01-18T00:40:42Z INFO  lan_mouse::server] terminating service
[2024-01-18T00:40:42Z DEBUG lan_mouse::server] producer notify rx: Some(Terminate)
[2024-01-18T00:40:42Z DEBUG lan_mouse::backend::producer::wayland] destroying window!
[2024-01-18T00:40:42Z DEBUG lan_mouse::server] frontend: Shutdown
[2024-01-18T00:40:42Z INFO  lan_mouse::server] terminating gracefully...
[2024-01-18T00:40:42Z DEBUG lan_mouse::frontend] remove socket: "/run/user/1000/lan-mouse-socket.sock"
[2024-01-18T00:40:42Z DEBUG lan_mouse] service exiting

It looks like 77 was sent first and then 125 was sent?

from lan-mouse.

feschber avatar feschber commented on May 28, 2024

No it seems like the order is correct here. Then the only explanation is that packets are reordered.

from lan-mouse.

ICE-GB avatar ICE-GB commented on May 28, 2024

No it seems like the order is correct here. Then the only explanation is that packets are reordered.

Ok, I've temporarily added a 1 second sleep before sending the disconnect and it seems to be working fine for me now, looking forward to your solution!

from lan-mouse.

feschber avatar feschber commented on May 28, 2024

Yeah I've been thinking about that. Probably best to ignore anything that comes after a disconnect until another enter event arrives

from lan-mouse.

xf- avatar xf- commented on May 28, 2024

I have sometimes this issue (especially with a lot of network activity) as well with only wired connections. Also, annoying the mouse always double clicks. I'm on latest git commit, and it worked before/was better.
Looked for an issue that was mouse related and ended up here, but I guess I open a new one.

from lan-mouse.

feschber avatar feschber commented on May 28, 2024

Do you have a specific version where it was better?
In any case this is somewhat expected until I put some mechanism in place to handle packet loss / duplication / reordering which is currently simply ignored.

from lan-mouse.

xf- avatar xf- commented on May 28, 2024

Do you have a specific version where it was better? In any case this is somewhat expected until I put some mechanism in place to handle packet loss / duplication / reordering which is currently simply ignored.

I used Plasma 5 Wayland connected with Plasma 6 alpha/beta/rc Wayland before
and now I run both systems with Plasma 6 Wayland. That was the point the click issue started. EVERY click is doubled and not related to current network usage.
That was the reason I thought it is maybe a different issue.

from lan-mouse.

feschber avatar feschber commented on May 28, 2024

Ah yeah that is definitely a different issue then and may also be an issue with plasma.

from lan-mouse.

feschber avatar feschber commented on May 28, 2024

@ICE-GB can you check if the latest version still has this issue? There has been a bug with duplicated input devices that I fixed.

from lan-mouse.

ICE-GB avatar ICE-GB commented on May 28, 2024

I currently have the key combination set to asdf and everything seems to work fine!

from lan-mouse.

feschber avatar feschber commented on May 28, 2024

I still should fix the theoretical race condition but good to hear it seems less likely now

from lan-mouse.

Related Issues (20)

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.