this post was submitted on 31 Aug 2025
33 points (92.3% liked)

Android

32680 readers
26 users here now

DROID DOES

Welcome to the Android community on Lemmy. Here you can participate in amazing discussions and events relating to all things Android.

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Rules


1. All posts must be relevant to Android devices/operating system.


2. Posts cannot be illegal or NSFW material.


3. No spam, self promotion, or upvote farming. Sources engaging in these behavior will be added to the Blacklist.


4. Non-whitelisted bots will be banned.


5. Engage respectfully: Harassment, flamebaiting, bad faith engagement, or agenda posting will result in your posts being removed. Excessive violations will result in temporary or permanent ban, depending on severity.


6. Memes are not allowed to be posts, but are allowed in the comments.


7. Posts from clickbait sources are heavily discouraged. Please de-clickbait titles if it needs to be submitted.


8. Submission statements of any length composed of your own thoughts inside the post text field are mandatory for any microblog posts, and are optional but recommended for article/image/video posts.


Community Resources:


founded 2 years ago
MODERATORS
 

Whenever I go to my homescreen or otherwise load another app the previous one closes. If I'm browsing Lemmy and I open a page linked on a post to read it, my app will have reset itself when I close the tab and I either have to give up or root around for the post.

This OS is borderline unusable in this state. It even evicts my homescreen app so there's a 5-10 second lag when tapping the circle button.

Any tips? I have 8GB of RAM, which should be more than enough for a dozen apps.

top 35 comments
sorted by: hot top controversial new old
[–] Onomatopoeia@lemmy.cafe 22 points 4 months ago (1 children)

You need to change battery optimization for the affected apps (well, the apps you don't want hibernated instantly).

Some brands of phones have aggressive hibernation config for all apps by default (Samsung, Xiomi I think).

Lookup hibernation control for your brand of phone.

Also check out https://dontkillmyapp.com/

[–] LodeMike@lemmy.today 5 points 4 months ago (2 children)

GrapheneOS. It keeps Termux and Molly (for MollySocket) open but nothing else.

[–] grue@lemmy.world 6 points 4 months ago (1 children)

Thanks for this thread. I just switched to GrapheneOS and noticed the same thing. It's particularly annoying having my Lemmy feed reset so often.

[–] Ghoelian@lemmy.dbzer0.com 1 points 4 months ago* (last edited 4 months ago) (1 children)

I'm also using grapheneos, but I've never noticed anything like this.

To check I just went back to the very last app in the app switcher, which was ironfox, which was still open on the same page I left it during lunch today. (About 6 hours ago)

[–] LodeMike@lemmy.today 1 points 3 months ago* (last edited 3 months ago)

Some apps store parts of the apps running state in storage some don't.

[–] Onomatopoeia@lemmy.cafe 4 points 4 months ago* (last edited 4 months ago) (1 children)

That's interesting, and surprising. Graphene doesn't do anything special with battery optimization, does it (I didn't think it did)?

Have you asked on any Graphene chats (they use discord and telegram, right?).

I've used Greenify for 10+ years to manage hibernation, but it really only works well with root, and the Graphene folks aren't down with root... So the only thing I can think to look at is how battery optimization is configured per app (and the "don't keep activities" setting in Developer Options).

Edit: look in Developer Options for "Background Check", here you can select which apps can run in the background.

I'm running a Pixel with Lineage and battery optimization works fine. Graphene starts with AOSP like Lineage does, surely they aren't doing anything weird with battery optimizing?

[–] LodeMike@lemmy.today 1 points 4 months ago

Termux and Molly have battery optimizations disabled because they run critical services.

[–] dustyData@lemmy.world 8 points 4 months ago (1 children)

Your phone is trying to keep your battery alive. The lower the specs of the phone, then the more aggressive the OS is. I don't know how it works in Graphene but this is why many UIs now have and advertise multiapp ux like floating windows, split screen, floating icon and desktop modes. I suggest to use your phone intended keep app alive tactic.

[–] Onomatopoeia@lemmy.cafe 3 points 4 months ago

I have a Pixel, I don't have this problem, and I run it hard. Switch apps extensively, have ~250 user apps, rooted, numerous service apps (Foldersync, Syncthing, Resilio Sync, 2 versions of Telegram, Teleguard, 2 XMPP clients, VPN), etc, etc. The apps I want kept alive stay alive, the ones I don't care about get hibernated when Android decides to.

OP is using Graphene, I'm using Lineage, both start from AOSP. There's something overly aggressive in Graphene battery optimization config.

[–] slazer2au@lemmy.world 7 points 4 months ago (1 children)

When did you last reboot your phone?

I have had memory leaks in android that slowly consumes ram until I have the same issue. A reboot clears it for a while.

[–] LodeMike@lemmy.today 5 points 4 months ago* (last edited 4 months ago) (1 children)

Every day or two. Last one was probably 2 nights ago.

[–] bear@lemmy.blahaj.zone 3 points 4 months ago (1 children)
[–] LodeMike@lemmy.today 0 points 4 months ago (1 children)

Does that matter? It's a pixel running Graphene.

[–] masterofn001@lemmy.ca 5 points 4 months ago (2 children)

Yes

If it's a memory hog app and another memory hog app and you have a tonne of background services running and you have limited memory, the oom is gonna make sure there's enough memory to run the app.

And if you have the private profile unlocked and a secondary user profile which you've allowed to run in the background...well, you just might run into some problems.

Then again, on graphene, app depending, it could be one of the security settings that is causing it to drop it's cache and reload.

Or, it could be the app itself.

Battery optimization, permissions, a privacy toggle, who knows?

The only way to truly keep 2 open is to do split screen.

I am also on grapheneOS on a 9 with 12Gb ram.

And even with that, I know a browser or two that doesn't handle switching very well.

But, because of the limited information, it's difficult to know where to focus.

PS. Did you try reading the logs for the app when they reset to see what's happening?

[–] LodeMike@lemmy.today 3 points 4 months ago

No I haven't read the logs. I'll do that next time.

[–] LodeMike@lemmy.today 2 points 4 months ago

I have a theory: this OS doesn't know how to swap correctly. It either loads the whole APK or kills the scope/whatever the android term is (for things that aren't set to always run.)

I think this is because APKs are zipped files and thus the android developers decided that ZIP reads makes a ton of sequential cached file misses. So then it would have to been loaded from the storage. Back when android was made these were expensive, and slow.

So it always loads the whole renamed zip :3

[–] wasu@lemmy.world 5 points 4 months ago

If you really need it not to be killed, you can always open split screen before opening the second app, or just open it in free-form mode. But this is more of a workaround than solution.

[–] VicksVaporBBQrub@sh.itjust.works 5 points 4 months ago (2 children)

You can see your current live memory usage.
Settings -> Developer Options -> Running Services

[–] LodeMike@lemmy.today 4 points 4 months ago

Ah, yes, a feature only developers use: task manager

[–] LodeMike@lemmy.today 2 points 4 months ago (1 children)

Nearly half of it is "system"

[–] Onomatopoeia@lemmy.cafe 2 points 4 months ago* (last edited 4 months ago) (1 children)

Wow. I have a Pixel with Lineage, 1.9 gig for system.

Whats Graphene doing using so much ram?

[–] LodeMike@lemmy.today 2 points 4 months ago* (last edited 4 months ago)

Fuck if I know. Let me restart.

Edit: 1.7 for system.

[–] thejoker954@lemmy.world 3 points 4 months ago (2 children)

Do you have access to developer options?

If so make sure "don't keep activites" isn't checked. And also check background process limit.

[–] LodeMike@lemmy.today 3 points 4 months ago

Background process limit is max signed 32 bit integer value because I need Termux to fucking work

[–] LodeMike@lemmy.today 3 points 4 months ago

Oh also don't keep activities is turned off.

[–] frongt@lemmy.zip 1 points 4 months ago

Which phone?

Have you been mucking around in the developer options?Have you tried backing up and doing a factory reset?

I had a similar issue, and it seems to have been resolved by setting things in the developer options back to default, then turning off developer options entirely. No idea why that matters, but it was the recommendation in the Grapheneos forum.

[–] ryannathans@aussie.zone 0 points 4 months ago (1 children)

Do you swipe away all the unwanted running apps?

[–] LodeMike@lemmy.today 2 points 4 months ago (1 children)

No. The phone kills them anyway and AOSP multitasking is a piece of shit that is broken more than it works properly

[–] ryannathans@aussie.zone -4 points 4 months ago (2 children)

Ya answered your own question

The phone is killing the ones you want because you aren't swiping the ones you don't want away

[–] diemartin@sh.itjust.works 5 points 4 months ago* (last edited 4 months ago)

Not OP, but same happens to me, and I swipe out apps as soon as I'm done with them, so that's not the problem. My phone literally can't hold open example.com on Firefox, and Voyager app at the same time, and it has 8GB of RAM

[–] LodeMike@lemmy.today 4 points 4 months ago (2 children)

Wouldn't it kill the ones I've last opened longer ago first?

[–] frongt@lemmy.zip 2 points 4 months ago

Yes, that person is incorrect.

[–] ryannathans@aussie.zone 1 points 4 months ago* (last edited 4 months ago) (1 children)

I am not sure what the heuristic is. Probably ram consumption or battery usage, both of which is going to potentially select in-use apps first

I had this problem until I swiped away all the apps I wasn't using

[–] LodeMike@lemmy.today 1 points 4 months ago (1 children)

Alright thanks. I'll test this and report back :3

[–] ryannathans@aussie.zone 1 points 4 months ago