Skip to content

Development version releases capture immediately, returns "<device_name> entered this device" #388

@penguinairlines

Description

@penguinairlines

Background

I'm just getting started with lan-mouse. Other, similar projects have not been working for me since switching from Windows 10, to Arch Hyprland, in October. Of course, I expect to run into some display management hurdles with the current shape of things, but overall, I'm fairly pleased with most things working as I expect.

I couldn't get the lan-mouse v0.10.0 client to properly handle the initial connection, so I'm here on the development version, trying to get something going. I wasn't able to get that released version to act as a server on my Arch system, and when I pointed both clients at each other, they were both acting like servers, but there were some weird things going on with my keyboard inputs, such as Shift not working. Anyway that's not in scope of this issue. The lack of "Incoming Connections" section, and meaningful connection logs made troubleshooting this version difficult, so I'm glad to see some improvements on the development version in this area.

Issue Description

When my mouse crosses the defined border, I immediately see a log about its return to the server. This happens whether I have configured computer A or computer B as the server. My logs look like this:

[2026-02-12T18:59:42Z INFO  lan_mouse::capture] client 0 acknowledged the connection!
[2026-02-12T18:59:42Z INFO  lan_mouse::service] entering client 0 ...
[2026-02-12T18:59:42Z INFO  lan_mouse::emulation] releasing capture: 192.168.0.37:50276 entered this device
[2026-02-12T18:59:42Z INFO  lan_mouse::capture] sending Leave event to client 0
[2026-02-12T18:59:42Z INFO  lan_mouse::capture] client 0 acknowledged the connection!
[2026-02-12T18:59:42Z INFO  lan_mouse::capture] client 0 acknowledged the connection!
[2026-02-12T18:59:42Z INFO  lan_mouse::service] entering client 0 ...
[2026-02-12T18:59:42Z INFO  lan_mouse::emulation] releasing capture: 192.168.0.37:50276 entered this device
[2026-02-12T18:59:42Z INFO  lan_mouse::capture] sending Leave event to client 0
[2026-02-12T18:59:42Z INFO  lan_mouse::capture] client 0 acknowledged the connection!
[2026-02-12T18:59:42Z INFO  lan_mouse::capture] client 0 acknowledged the connection!
[2026-02-12T18:59:42Z INFO  lan_mouse::service] entering client 0 ...
[2026-02-12T18:59:42Z INFO  lan_mouse::emulation] releasing capture: 192.168.0.37:50276 entered this device

I was able to install the client successfully on both systems, accept the client fingerprint, and theoretically establish a connection, but the mouse transition to the client seems to terminate instantly, regardless of the (border) position used (I tried all 4 sides, in case something was strange with my monitor profiles), or resetting the software.

It's interesting to me that the traffic returns on an ephemeral port 50276. Both of my software clients are set up as 4242, and I've made sure the Windows firewall has this port enabled inbound. When my Arch system is the server, it returns the same log with 56055 as the port. I assume this is just selecting some ephemeral port each time the service starts, but I wonder if this could be conflicting with my firewall.

It seems the reason why the mouse is returning to the server is that the client released the capture, but it happens so fast, and repeats thousands of times, while I'm continuously moving the mouse in the direction of the client, that I do not believe that this is the intended behavior. It produces this error at a rate of what seems like hundreds of times per second.

Expected Behavior

After a client has connected ( activated client 0 (left) ), I should be able to move my mouse to the client and see the core functionality of the software engage. Logs should demonstrate this.

Failing that, an error should appear stating the issue - what caused the same-millisecond return to the server display. This feels kind of idealistic when I read it back, but I'm not sure how else to say it. This unnatural behavior needs to be detected and handled somehow.

Perhaps the software could detect when these events repeat faster than a human could simulate.

Perhaps additional logs could detail why an ephemeral port was selected when the connection is established, so that the user can diagnose their firewall configuration.

Environment

lan-mouse-git v0.10.0.r75.gad63b6ba20-1 - downloaded 2/12/2026
Windows 11, latest stable build
Arch Hyprland
I'm using IP as hostname to avoid DNS issues while trying to set up this connection for the first time.

I'm happy to go try some more tests if anyone has suggestions. I know not to expect a working clipboard feature yet with lan-mouse, but getting my basic functionality back would be a big win for my daily workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions