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.

  • dustyData@lemmy.world
    link
    fedilink
    English
    arrow-up
    9
    ·
    13 days ago

    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.

    • GissaMittJobb@lemmy.ml
      link
      fedilink
      English
      arrow-up
      3
      ·
      13 days ago

      Your phone is trying to keep your battery alive. The lower the specs of the phone, then the more aggressive the OS is.

      No, apps closing between switches is not a matter of battery, it’s a core feature of Android related to the management of RAM. Whenever the OS needs more available RAM, the OS will close a backgrounded app to make those resources available. This is why it happens more frequently on low-end devices - these generally ship with less RAM.

      Some misguided vendors will limit background execution in incorrect ways in the name of saving battery, but the general thing with apps living in background is a story of RAM.

      Interestingly enough, apps are supposed to be built to cope with being closed down due to lack of RAM and then be restored seamlessly, but this is an art that is uncommonly done correctly in the Android development space. The OS support is there, though.

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    13 days ago

    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.

          • masterofn001@lemmy.ca
            link
            fedilink
            English
            arrow-up
            5
            ·
            13 days ago

            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?

            • Kairos@lemmy.todayOP
              link
              fedilink
              English
              arrow-up
              2
              ·
              11 days 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
    link
    fedilink
    English
    arrow-up
    5
    ·
    13 days 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.

  • thejoker954@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    13 days ago

    Do you have access to developer options?

    If so make sure “don’t keep activites” isn’t checked. And also check background process limit.

  • frongt@lemmy.zip
    link
    fedilink
    English
    arrow-up
    2
    ·
    13 days 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.

    • Kairos@lemmy.todayOP
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      13 days ago

      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
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        4
        ·
        13 days ago

        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

        • Die Martin Die@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          5
          ·
          edit-2
          13 days 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