KDE connect never stays connected to android phone for very long

Perhaps it’s needed for some. I understand it’s needed for Android development, as mentioned, but apart from that I haven’t seen much reference to it. If the OP finds anything definitive on the topic that actually helps the situation, I’ll gladly retract my observation. :slight_smile:

Regarding the associated android-udev-rules package, that was in relation to Android Studio development, as mentioned, and would likely not be related to any possible use as you describe. Cheers.

Well there is certainly no harm in installing it regardless, so i have. If there is any change i shall ofc let you know, it’s still connected since this morning’s “wakeup”, i bet the next time i loose it will be after the desktop has been asleep next, its looking that way.

Although, i have tried suspending & waking it manually several times, but it remains connected when i do that. Is very odd.

1 Like

both samsung and huawei are notorious for booting out apps for no reason other than saving battery juice while letting their bloatware roam free.

i wouldn’t necessary say kdeconnect should work hiccup-less everytime, but certain measures might drastically improve you success rates

  • set battery restrictions on kde-connect app to unrestricted
  • also set it to “auto-start” whenever android kernel kills it
  • KDE Connect uses dynamic ports in the range 1714-1764 for UDP and TCP so make sure it is available if you are using a firewall

whenever it disconnects, if it connects as soon as you relaunch the kde-connect app, then that is your devices handiwork. however if it stays elusive even after launching the app, then instead of “refresh” try just clicking on “pair new” that solves it for me most of the time. from the linux desktops end, i use commands;

kdeconnect-cli --refresh && kdeconnect-cli -l

yep, already done.

Not sure i have that option on Samsung a34 android 13?

All clear, in fact i dont use a firewall.

I have tried force closing the android app and then opening it, didnt help.
I tried the pull-down on the android app screen “refresh” many many times it just will not reconnect.
I have been using killall kdeconnectd && kdeconnect-cli --refresh to try to restart the desktop app.

I can “force” it by unpairing on either the phone or the desktop and then recreating the pair.
Plus if i logout and back in the user on the desktop it also usually reconnects.

I have been through all these below, on the phone

Android 13 (Samsung)

The settings are mostly the same as Android 11 below, with a few changes:

The “Optimize battery usage” option doesn’t exist anymore under “Special Access”.
Under “Device Care” there is no “Automation” or “Advanced” option anymore.

So the existing options to change would be:

The per-app setting.
Adaptive battery.
Put unused apps to sleep.

I shall keep tinkering and searching but its been like this for as long as i can remember. It was the same on my Inspiron laptop and on my Hauwawi p30. It was just one of them things that would have been really nice to work but i never got around to asking about. I was kinda hoping that people might just say “ahh yes, we know of this problem and there’s a well known fix or it’s just the way it is”.

I appreciate all the suggestions of roads for me to take a look down. Cheers all.

Exactly, look in a mirror.

But THIS person (me), is one last time going to point you towards your problem. I’m a little surprised nobody else spotted it even though I pointed it out.

3 REACHABLE and 1 STALE. I WONDER what device 192.168.1.3 is… :thinking: :vibration_mode: :phone: :+1:
Even though your attitude is :crazy_face: I will hand you this one.
After all, it’s christmas. :christmas_tree:

As for a solution, probably look at your router or phone.

Yes we did all see it, we all know that 192.168.1.3 is the phone, we all know the connection is no longer active or has become inactive and possibly has not been properly closed or terminated. So nobody missed it.

ok, I’m listening, although why i would since you just came back to insult me again and double down on how I’m wrong, and how you didn’t start this by blatantly insulting me for no good reason.

Because i haven’t been doing that all day. /sarc

Seriously though, please have a great Christmas and a productive new year. I wouldn’t hold a grudge to even my worst enemy over xmas :christmas_tree: :santa: :gift:

So again this morning the desktop wakes from sleep and its not connected. (and refuses to connect)

Heres an odd thing though

❱kdeconnect-cli --refresh

⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼ /home/greg ⎼⎼⎼⎼⎼⎼⎼⎼⎼⎼
❱kdeconnect-cli -l
- Galaxy A34 5G: 8f58ee84_a01f_4300_9af4_596aefa37e1b (paired)
1 device found

but :-
Screenshot_20231222_100151

But it is reachable.

❱ping 192.168.1.3
PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data.
64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=46.1 ms
64 bytes from 192.168.1.3: icmp_seq=2 ttl=64 time=7.76 ms
64 bytes from 192.168.1.3: icmp_seq=3 ttl=64 time=6.85 ms

So it’s definitely when the desktop goes to sleep for a length of time. Although it could still be the phone’s power management as well, it could be both, who can say :frowning_face:

So, the GUI isn’t reacting to the updated status. F5 usually refreshes the GUI, or rather, it does in some cases, such as the Dolphin file display, and Desktop, for example. I don’t know it that’s used consistently across DE’s or within KDE, but it’s worth trying to see if it reacts.

I wish it was just the desktop GUI, but unfortunately it is not connected, i.e. nothing works. Notifications don’t come through, no clipboard, no remote control, no anything. It’s not just the desktop though, the phone also shows no connection and will not connect even if i slide down on the phone app to “refresh” its connection.

1 Like

Yes, sorry, I bypassed the first line and responded to ‘but it is still reachable’. :blush:

I’m at a loss, really; mine connects each time without fail after any sleep state. Well, it disconnects, of course; but it always seems to resume.

Yea, that’s what I thought, how is the shell saying it is connected, but it is not. As I say, it’s very odd.

As it stands, I presume it might still remain the same regardless of the sleep state, but if you’re willing to test the theory, you could try (for example) not hibernating, but screen blanking instead; and whatever other options are available via power saving. See if any of those give a more favourable result.

Sounds like a good idea, although iv had quite a nightmare with the suspend already. I have to run a script i wrote just to have the system firstly go to sleep without directly waking straight back up again without me touching anything, also i have to reset the touchpad on resume otherwise it just does not work when the system wakes. All these problems have been documented, so i was able to figure them out with help in the end. So i suppose this is just another suspend problem that Linux (possibly just Manjaro) has to add to the list for me :cry:

I shall try some other suspend states/levels after xmas, I’m off to to the standard xmas stuff with relatives for a few days (wonder why i feel i needed to say that, lol).

Thx for all the support chaps, happy Christmas :slight_smile:

Or, specific to both yours and similar machines.

Enjoy your break. Cheers.

You guys still havent figured this out huh…

Seems like you did, or ignore it, because THAT is probably your problem.

Since there is now a person in here I DO care about, I will point you in a direction, maybe you will figure it out, maybe not. I have no solution to this, but I identify the problem.

About the ping that seems to confuse you:

You can read this almost 8 year old thread for some info on arp https://serverfault.com/questions/765380/when-do-stale-arp-entries-become-failed-when-never-used

What this means is that if I ping 10.64.42.121 and it replies, then the kernel might not bother sending an ARP request because it assumes that the pong meant that it’s ARP cache entry is valid. If the entry is in the STALE state, it will also be updated by unsolicited ARP replies that it happens to see.

Ping response != connected

Figure out how to get the stale connection to become active and the problem goes away.

Edit
Maybe take a look at this:

So maybe something like sudo ip -s -s neigh flush 192.168.1.3

@jackdinn

This has been at the back of my mind. I initially dismissed it, but it might be worth investigating; Is there a specific battery saving functionality on your phone that might be doing just that; closing an active connection (or the app)? I placed it under the heading of power saving when I first thought of it, but maybe it’s handled separately on some phones. :person_shrugging:

I have the same problem. Connection resumes after unlocking phone screen and few (not one) fast clicks on “Refresh” button in desktop app settings. So problem in desktop service I think, but I still haven’t found a solution

Maybe worth mentioning, I don’t seem to have this problem, but I’m using Plasma 6, kdeconnect 24.02.2, and my phone has Android 14, kdeconnect 1.30.1. So it’s possible your problem may be solved when you receive the updates.

Hi @NikMAX and welcome to the Manjaro community.

I do not have a solution to your issue. After 5 months I’m guessing the OP also hasn’t. My best suggestion is to start (your own) new thread and detail your problem, and everything you’ve tried to solve it, so that others can help more effectively.

As a new user, please take some time to familiarise yourself with Forum requirements; in particular, the many ways to use the forum to your benefit. To that end, some or all these links will be invaluable:

And last, but not least, the Stable Update Announcements, which you should check frequently for important update related information. Occasionally an issue might be directly related to a particular update; it’s always best to check those announcements.

I hope this helps. Cheers.

Nop, your absolutely correct. I kinda just gave up on it, after waking the system in the mornings there is a good chance that it will turn up (the tray icon & connection) at some point. It can take a few hours & just pop up or might not show up at all in that session. If i really need to use it & its not connected i just have to un-pair the phone and re-pair it. (iv got several phones, all act the same).

I can live without ^^ , thx.

3 Likes