Closed StorageB closed 1 week ago
I can't reproduce this, and with no more information I cannot do anything.
You'll need to provide a debug log obtained with flatpak run --env=G_MESSAGES_DEBUG=all de.swsnr.turnon
. It'll contain device names, MAC addresses, and IP addresses; if you consider these too sensitive for a public issue mail it to me.
And check a few things yourself:
With the Server PC turned on, I am able to ping it from my laptop:
With the Server PC turned on, here is the output from
flatpak run --env=G_MESSAGES_DEBUG=all de.swsnr.turnon
I have a WOL app on my phone, and it does report that the PC is on, so it seems to be able to ping the PC.
(de.swsnr.turnon:2): TurnOn-DEBUG: 16:12:05.432: Failed to ping 192.168.1.200: Permission denied (os error 13)
It looks as if your systemd denies ping permission to unprivileged processes. Check sysctl net.ipv4.ping_group_range
and then figure out how to configure it to include the group of your user.
May I ask what system you're using? Systemd enabled this by default about five years ago, so it should've made its way into any desktop system by now.
That fixed the issue. It now correctly shows when the server is online. Here are the steps I followed to get it working:
On my laptop (the device with Turn On installed), the output of sysctl net.ipv4.ping_group_range
showed:
net.ipv4.ping_group_range = 1 0
The output of id -g
showed my group ID to be 1000. The following command allows pings for group IDs in the range of 1000 to 1000:
sudo sysctl -w net.ipv4.ping_group_range="1000 1000"
After running that command, the status was correctly shown in the app.
The range will get reset after rebooting with this method. To make permanent, I added the following line to /etc/sysctl.conf:
net.ipv4.ping_group_range = 1000 1000
Thanks so much for troubleshooting this. I'm running Ubuntu 24.04. I have 2 virtual machines installed with fresh installs of Ubuntu 23.10 and 24.04 so I checked those as well, and they also showed the same default output for sysctl net.ipv4.ping_group_range
so I imagine this could be an issue for anyone running Ubuntu (or at least these versions).
🤷 There's nothing I can do about this. I'll close this ticket.
On second thought, the app could detect this situation, by attempting to create a PROTO_ICMP socket in startup
. If this fails with EPERM, it can then permanently disable ping checks (and perhaps use a grey indicator to indicate this), and popup a warning message with a button to download an appropriate sysctl config snippet and instructions how to install it.
But since it doesn't affect me, and it's not like I'm drowning in issues about this, I'll probably not implement this myself any time soon.
Anyone wants to make a pull request, be my guest :slightly_smiling_face:
I'm using this to turn on my server PC from my laptop. It will successfully turn the PC on, but does not show the device as on (the status indicator on the left is always red). Both laptop and PC are running Ubuntu 24.04. I tried using both WiFi and a wired connection from the laptop. Using version 1.3.0 installed from the GNOME Software app via flathub.
Thanks so much for this application! It's exactly what I was hoping for - a straightforward, easy to set up WOL app with a clean interface. I appreciate the work you've done on this.