How do I prevent this? I can't play games on mobile and lock the screen for even a second or the app is totally disconnected from the internet, logs me out, and then as soon as I try to log back into the game the app completely crashes and I have to reload it. This happens EVERY time I lock the screen or minimize the app and switch to another. I will note that it appears that the app is disconnected from the network rather than 'killed', as the app does not have to start back up again, it just immediately loses connection to the server within if it is minimized or the screen is locked for more than 2-3 seconds.

I have perused every single forum/reddit post I could find about the subject - every suggestion seems to revolve around checking the battery or background usage settings for the app, but I have already checked all those obvious things and they are all already disabled but it's still happening. Even with 'Suspend execution for cached apps' and exploit protection disabled.

The only suggestion I could find was “AppOps if they have the setting “AllowForegroundSpecialProcess” app op and set to “granted”, it will remain in foreground as a top app and not get killed.”, but I cannot find any explanation for what "AppOps" is supposed to mean, nor have I found any such setting.

Really need some help here as this is causing the device to be less than usable for me on Graphene and I might even have to go back to google's stock OS, excessive telemetry collection be damned.

    If you would rather play a game than enjoy the security of GrapheneOS, I’m not sure what to tell you.

      • Edited

      Blastoidea I would give a few suggestions rather than criticize here, because games should and do work on GrapheneOS. But the user is free to decide to switch to stock OS or not at the end of the day.

      But OP hasn't given us much to work with.

      shroom So my questions to you are:

      1. When did this start happening?
      2. Do you happen to have developer options enabled?

        shroom

        What's the name of the app? And what's the version of GrapheneOS?

        shroom 'Suspend execution for cached apps'

        Please disable developer options and reboot the device. Those settings are intended for development and debugging purposes and will not make the issue better.

        shroom This is very likely due to configuration changes you made. The suggestion from @fid02 to turn off developer options is a good starting point.

        Blastoidea GrapheneOS doesn't change anything which would interfere with this.

        @Blastoidea I would prefer that the operating system works as intended, not
        killing off apps that are meant to be running.

        yore It has been happening since I installed Graphene. Yes developer options are enabled but mostly set to defaults, I have not changed anything other than what was mentioned in my initial post.

        @fid02 I was following suggestions from this very forum.

        @GrapheneOS No, it is not due to any changes I made. It has been happening since I installed the OS with all defaults.

          In case I was unclear, I only enabled developer options and made any changes in settings AFTER I was having this issue, which has been ongoing since the very start of installing GrapheneOS. The issue was not present before installing Graphene OS.

          This is clearly an issue with the operating system. My friend has also been trying GrapheneOS for the first time and has been experiencing similar issues, such as Teams and other apps not functioning in the background and completely missing work notifications.

            shroom I was following suggestions from this very forum.

            It's unfortunate that someone advised users to permanently enable Developer options on a device not used for development. Even if it is not the cause of this specific issue, developer options in general increases the likelihood of future stability issues and data loss. See this thread for some examples.

            Another question which arises is whether or not you have been using adb to make system changes, or if system apps have been disabled or permissions from them revoked. These are relevant questions because the issue you're describing is an unusual one – but can occur if you make these unsupported changes to the system.

            Also, it's still not clear which specific app(s) you are referring to.

            shroom This is clearly an issue with the operating system. My friend has also been trying GrapheneOS for the first time and has been experiencing similar issues, such as Teams and other apps not functioning in the background and completely missing work notifications.

            If notifications are delayed, your friend can check if Play services have unrestricted background permission enabled as well as granted it unrestricted usage of mobile data.

            • Edited

            shroom Yes developer options are enabled but mostly set to defaults [...]

            Disable it and report back; process of elimination.

              shroom

              In case I was unclear, I only enabled developer options and made any changes in settings AFTER I was having this issue, which has been ongoing since the very start of installing GrapheneOS. The issue was not present before installing Graphene OS.

              This does not mean it's not a configuration issue with your device.

              This is clearly an issue with the operating system. My friend has also been trying GrapheneOS for the first time and has been experiencing similar issues, such as Teams and other apps not functioning in the background and completely missing work notifications.

              They do not have their device configured correctly. Teams depends on Firebase Cloud Messaging for push notifications which means sandboxed Google Play needs to be correctly installed and configured. It's not intended to function out-of-the-box and ignoring the prompt about the battery optimization exception will cause this, as will having data saver or battery saver enabled.

              shroom GrapheneOS does work as intended. It's your configuration which is the problem. The starting point is disabling developer options. The next step if an app preferences reset followed by setting things back to how they should be including giving a battery optimization exception to apps requiring it like sandboxed Google Play services if you use it. If you've made changes via ADB which you haven't precisely documented, there's not much we can do beyond suggesting a factory reset.

              • Edited

              @GrapheneOS Except that it does not work out of the box with the default configuration, unrelated to any changes I made after finding it to not be working.

              Any settings I changed were immediately changed back after changing them did not work. I am still using the default configurations other than ensuring that the app is allowed to run in the background and not having battery saver enabled.

              I'm not sure why you are jumping to conclusions that I changed all sorts of settings resulting in having this issue, when I was pretty clear that this issue has been occurring since the OS was installed with no settings changed.

              I was posting here hoping that someone could point me to what settings could be interfering with the app being able to run in the background, not being gaslit that I caused the issue by making changes I did not make.

                @fid02 No, I did not make any changes like that. I did not change ANYTHING other than enabling developer settings once to try ONE setting that someone suggested, and subsequently turning it back off when it did not work. Developer settings are not even enabled currently and I certainly did not do anything with adb.

                "Giving a battery optimization exception to apps requiring it like sandboxed Google Play services if you use it."

                I already gave a battery optimization exception to the app having this issue, it did not change anything. I do not think the app is being killed in the background, as it does not have to start back up again after it is disconnected. It is merely being disconnected from the internet any time the screen is locked or it is switched out of the foreground.

                  shroom You are not being "gaslit".

                  shroom Apps do not need battery optimization exceptions unless they're a special case which knows how to take advantage of it, and those should ask for it.

                    shroom Is it possible to share the name of the app that we are discussing, so that others might try to reproduce a potential issue with it?

                    yore

                    Developer options are disabled. The issue persists, as it has been since I installed GrapheneOS

                    • yore replied to this.

                      shroom I do not think the app is being killed in the background, as it does not have to start back up again after it is disconnected. It is merely being disconnected from the internet any time the screen is locked or it is switched out of the foreground.

                      Is a VPN in use?

                        @shroom May we please know the name of the package and source, so we can attempt to simulate your issue?