2

My Pixel 7 (Android 14) has a persistent ssh server set up, but Termux shows a "wake lock held" notification, which is very annoying. Is it possible to hide notifications so that they exist and work but are not displayed in the notification area?

1 Answer 1

0

That depends on the definition of "exist and work". As far as I know it will still hold the wakelock if the notification is hidden, as the notification is only a nicety. If it's hidden though it won't be possible to tap it to open the app.

It should be possible to press and hold the notification to get options for the apps notifications, then choose which notifications you want to disable or just disable everything. And then can be enabled again via App Info -> App Notifications.

Phantom Process Killer may be the actual cause of the app getting killed. There is a plethora of notes about how it works and how to disable it on different versions of Android 12+ "at your own risk" in this project on GitHub. The links at the top that point to Termux GitHub Issues and Google Issue Tracker go into some technical discussions about it.

Most Android 13+ devices should have an option to disable this via Settings -> Developer Options -> Disable child process restrictions as per this Reddit thread, noting in a comment that it's not included by Samsung, Oppo, and Xiaomi. It was originally added in Android 12L, but that was targeted for folding devices, large screens, and tablets.

5
  • I already tried disable notifications from Termux and it stops sshd. Termux uses this notification for wake lock, because otherwise the system will kill Termux background processes.
    – diskree
    Commented Nov 14, 2023 at 14:54
  • I tried it again and it still doesn't work. I need to open Termux and write sshd, after which the ssd is able to respond to commands again
    – diskree
    Commented Nov 14, 2023 at 14:56
  • "exist and work" means that the notification still forces the system not to kill the background process
    – diskree
    Commented Nov 14, 2023 at 14:57
  • I see this as some kind of launcher widget or button in quick settings to keep access to Termux sessions. Anything, anywhere, but not in the notification area
    – diskree
    Commented Nov 14, 2023 at 15:00
  • 1
    I'm sorry; if I'd just looked a little further I would've found this info about Phantom Process Killer already. According to the discussion in Google Issue Tracker Termux does run as a foreground service but uses background processes, which the Phantom Process Killer can screw with. Another fix nobody would've wanted that destroyed functionality that is wanted, lol.
    – l3l_aze
    Commented Nov 14, 2023 at 18:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .