mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-05-15 14:15:52 -06:00
[GH-ISSUE #166] Hyprland -> macOS problem #71
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#71
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 @simonm on GitHub (Aug 2, 2024).
Original GitHub issue: https://github.com/feschber/lan-mouse/issues/166
Hello....
Summary:
After configuring each side as per the README.md I cannot seem to get any results at all. No packets on the wire, nothing udp 4242.
Background:
Trying to connect work laptop (macOS on left) and workstation (Arch Linux on right).
Why I am interested in lan-mouse:
So I would be very happy to use lan-mouse. I don't care which is primary (i.e. where the mouse and keyboard are connected).
Detail:
Trying with domain names:
Arch (name "xenon"):
macOS (name "simon-laptop-wired":
Trying just with IPs:
On Arch:
On macOS:
Name resolution is fine:
On Xenon (Linux Wayland) I am packet capturing on all interfaces for anything UDP on port 4242. I get nothing at all. (
sudo tcpdump -i any 'udp port 4242)All host-based firewalls are disabled.
I've also tried the different options on Wayland for
--capture-backend.I get an error on from lan-mouse on start under Wayland:
However:
Is this error expected with Hyprland?
Have I correctly understood that if I want the Linux "hosting" the real keyboard and mouse, that macOS supports "input emulation" and Wayland support "input capture" so we should be ok?
Final thought. Maybe this is related to the xdg error. If no input is captured then there's nothing to send over the wire... Right?
Does anyone have any suggestions to troubleshoot further? I'm sure it's something I am doing incorrectly.
@feschber commented on GitHub (Aug 2, 2024):
Yes, Hyprland does not yet support the input capture portal thats why you're seeing the error with
--capture-backend input-capture-portal.For some trouble shooting:
Could you check, if you're getting events logged to the terminal with
on the hyprland side and
on the macos side?
(
--test-emulationshould move the cursor)This should rule out any not network related issues.
And note that you should only see packets on the wire upon actually moving your mouse on the other device.
@simonm commented on GitHub (Aug 5, 2024):
EDIT - I may have misunderstood the purpose of the
--test-captureand--test-emulation. You're saying this would rule out any non-network issue? So, my testing was actually useful maybe? Haha!---- Original response below ----
(sorry.. this turned out longer than I expected).
This is weird and I don't understand...
I have three systems I can easily test with within arms reach:
1- macOS laptop (macOS)
2 - Manjaro (i.e. almost Arch) Linux laptop (Zen)
3 - Arch Linux workstation (Xenon)
The Arch Linux devices have the same dotfiles for most things. I'm running Hyprland, fish shell etc.
Trying what you requested:
--test-emulationon macOS--test-captureon XenonI see mouse movement on macOS in a figure-of-eight shape, as expected. After a short wait (10 or 20sec?) I start to see lots of log messages on Xenon showing the mouse and keyboard activity from Xenon.
That is, me using the keyboard and mouse on Xenon shows in the window where I am running
--test-capture, which is on the same host. It doesn't seem that the remote--test-emulationis doing anything at all..I run the same test in each direction on the two Hyprland devices: i.e. --test-capture on one and --test-capture on the other. Same behaviour as when testing with macOS: I see logs on the device where I run
--test-capturewhich are unrelated to the movement on the device with--test-emulation.This is the opposite of what I would expect:
I think that I should see the movement from
--test-emulationbeing sent on the network and displayed on the device running--test-capture.But I don't! I see movement and keys from the device running
--test-captureon the same device.Each of the devices has what I think is a valid config in
~/.config/lan-mouse/config.tomlHere is an example from Xenon:
In all cases, I see zero network traffic between the two.
tcpdump filters tried:
'port 4242' => i.e. TCP or UDP, SRC or DST.
'host 192.168.11.70' => when run from Xenon should show anything originating from or going to Zen.
'ether multicast' and 'ip broadcast' => Getting desperate here! :-)
Nothing. Nada. Not a sausage.
I'm at a loss. I can only think that I have hugely misunderstood this or made an incorrect assumption...
Maybe I can state what I think is true and then we can educate me a bit more!
My belief is that lan-mouse is a bidirectional mouse and keyboard sharing app that support macOS as a "client" and Hyprland as either a "host" or a "client" which listen on the port configured in
~/.config/lan-mouse/config.toml. If you want Hyprland as a "client" then you need another Hyprland system to be the "host". If supported by the host and client, the keyboard and mouse sharing will work in both directions when the configs are set up.If I run both process with
LAN_MOUSE_LOG_LEVEL=debugthen I don't see anything related to connections on either and when I see all of the INFO logging of my local keystrokes on the machine on which I run--test-capture, I see nothing at all being logged on the--test-emulation machine.Do you have any ideas on how to troubleshoot further?
Question: what is "release_bind"? It's in my config as it was in the default / suggested config. I don't see any notes or docs about what it does in the repo (other than the commit adding it to default config).
I am more than happy to help troubleshoot this, so let me know where to go next! :-)
@simonm commented on GitHub (Aug 15, 2024):
Sorry, that last update was a monster. Let me try to simplify what I am asking to make it easy for anyone to respond.
What network traffic should I expect to see between - for example - a Linux machine running Hyprland and a macOS device.
I guess, it should be as simple as:
Is this correct?
Many thanks in advance and again, apologies for my obvious confusion about this.
I will spend some time looking at this again now. I will report any progress and will try not to write a novel for my next update... :-)
@feschber commented on GitHub (Aug 15, 2024):
Sorry, I wanted to get back to you!
--test-capturecan be used to see if input can be grabbed from the sending device and should log events to the console when moving the mouse into one of the screen borders.--test-emulationcan be used on the receiving end to verify that input can be emulated.Both have nothing to do with the actual network functionality.
Your configuration does look correct to me, you can check the assigned IP addresses by hovering over the button next to a host (it should be green if at least one IP is assigned).
You should see traffic on port 4242/udp as soon, as you move your mouse to the other device and the cursor should also get stuck for a moment.
@simonm commented on GitHub (Aug 15, 2024):
Hi @feschber! No problem for the delay, completely understandable!
Trying again. I am using the UI now and trying to configure the most basic example. I have double-checked the IPs, name resolution etc. I have libadwaita installed on the macOS side (and also on Hyprland).
I'm getting the following logs on the macOS side when I moved the slider to enable the connection to "
xenon":Are these logs expected?
Again, I see no network traffic in either direction on 4242/udp.
Maybe it would be a better test to do Hyprland <-> Hyprland between a different laptop and the workstation?
@feschber commented on GitHub (Aug 15, 2024):
The logs seem fine here. The gtk warnings should not matter.
What do the logs on the hyprland side say if you move the cursor into the border?
@simonm commented on GitHub (Aug 15, 2024):
Hi - I get no logs when I move the mouse to the edge of the screen on the Hyprland side.
Here are logs on startup:
Here's some details of the displays on each side.
From Hyprland (on the right of the macOS laptop):
And from the macOS side (which is left of the Hyprland workstation):
@simonm commented on GitHub (Aug 15, 2024):
OK! Some progress!
I got it working Hyprland to Hyprland! Woohoo!
Linux laptop on right, Linux workstation on left.
I see UDP traffic.
Mouse moves as smooth as butter from the left edge of the latptop to the right edge of the workstation.
The problem is with macOS.
I will do some more testing and follow exactly the same approach as with the linux laptop. i.e. no external monitors, NICs etc.
I will report back.
@simonm commented on GitHub (Aug 15, 2024):
Additional testing (still Hyprland to Hyprland):
Workstation Left <-> Laptop Right
Laptop Left <-> Workstation Right
However!
So, it works in one direction only. There's a problem with the left edge of the workstation.
Aaah! Just had an idea: I'm using fractional scaling! Maybe this is the cause? The edges are not being detected as a consequence?
On workstation:
On the Hyprland laptop:
Testing again with scaling on laptop set to 1.0 and I do not see any change in behavior so not sure any more!
Also, I have not tried the macbook on the right of the workstation yet.
Anything I can do do troubleshoot display resolution detection?
@simonm commented on GitHub (Aug 15, 2024):
Could this be related? #46
@feschber commented on GitHub (Aug 15, 2024):
There have been several issues with Hyprland before and I would not be surprised if the wlroots removal caused new issues.
The
--test-captureflag is essentially there to debug such issues.Additionally you could set
to enable more verbose logging
to show the capture surfaces in green (on Hyprland that is).
And test using
--test-captureto find out if there are any Hyprland related issues.Other than that it might be useful to check if sway works as a reference.
On the MacOS side, if
--test-emulationworks it is either an issue on the host side or network / firewall related@simonm commented on GitHub (Sep 11, 2024):
Hello - I will close this ticket. I got things working Hyprland <-> Hyprland so no need for the macOS laptop now. It was probably a config error on my part.