mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-05-15 06:06:07 -06:00
[GH-ISSUE #307] lan-mouse doesn't seem to work well in poor network conditions. #157
Labels
No labels
Xorg
documentation
enhancement
macos
pull-request
question
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/lan-mouse#157
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @huangsijun17 on GitHub (Jul 1, 2025).
Original GitHub issue: https://github.com/feschber/lan-mouse/issues/307
I use lan-mouse on my company's WiFi. Due to the large number of people and poor WiFi optimization, there is a certain packet loss rate. I found that my lan-mouse often reports errors and stops working. Until the controlled service is restarted. Does lan-mouse have no heartbeat and error reconnection mechanism?
@huangsijun17 commented on GitHub (Jul 1, 2025):
In addition, occasional packet loss can cause some keys to "not be released". For example, the command to press the Shift key is transmitted correctly, but the command to release it is not received. lan-mouse will cause the system to keep pressing the Shift key.
@DrYak commented on GitHub (Jul 25, 2025):
Sadly, there is no way around these types of problem (short of plugging the laptop into corded network (*)).
The only thing one can influence is the specific flavor of failure mode the sharer goes into:
In noisy networks, some packet will be lost and the motions will be missed.
The whole setup behaves exactly like a wireless USB and Keyboard in noisy radio environment and just drops inputs.
In noisy networks, some packet will be lost and the TCP transport layer will eventually re-send anything missed and it will be reorder.
The whole setup will freeze, then suddenly it will "catch-up" in accelerated motion, then re-freeze... the whole setup will be very jerky
(I speak from experience, having using opensouce Synergy on noisy Wifi at conferences, before moving to Lan-mouse due to Wayland support coming there first).
TL;DR: input sharing will always suck on noisy Wifi, you're merely left chosing the specific type of suck (stopping vs. jerky pause and accelerate)
UDP is connectionless.
What @feschber could do is add a configuration option for increasing the timeout until a client decides that the other side isn't there anymore if it hasn't heard from it recently enough.
But then it means that if the remote really isn't responding it's going to take a minute until the connection is dropped.
Note that I you want to play with it, there ways to forward UDP connections over e.g. a SSH-based tunnel, so you can enjoy the "jerky freeze and then suddenly re-accelerates" type of suck.
(*): such as plugging both into network ports of the same WiFi extender (such as the FRITZ!Repeater I am using home)
@feschber commented on GitHub (Apr 29, 2026):
might be relevant as well: #417
@huangsijun17 commented on GitHub (Apr 30, 2026):
I used AI to analyze the code a few days ago, and it seems to be an issue where the port wasn't released after the connection was forcibly disconnected. Since I know absolutely nothing about Rust, I haven't pushed to merge this AI-analyzed code.