Skip to main content

OnePlus Devices

โ„น๏ธNote

Follow the Common Installation guide first. This page covers OnePlus-specific differences only. Everything in the common guide applies to OnePlus devices โ€” this page documents the settings, behaviors, and quirks unique to OxygenOS and OnePlus hardware.

OnePlus Overviewโ€‹

OnePlus devices run OxygenOS, a customized Android skin that historically stayed close to stock Android but has diverged significantly in recent years. Starting with OxygenOS 13, the software is built on the same ColorOS codebase used by Oppo (OnePlus's parent company). This means that newer OnePlus devices have different system behaviors, settings locations, and background process management compared to older OxygenOS versions.

For ADL users, the key concern is that OxygenOS includes aggressive battery optimization and background process killing that can terminate Termux sessions without warning. This page explains how to configure your OnePlus device so ADL runs reliably.

OxygenOS vs ColorOSโ€‹

The distinction matters because it changes where settings are located and how aggressively the system manages background apps:

  • OxygenOS 12 and earlier (OnePlus 9 series and older with original software): Closer to stock Android. Settings paths resemble what you see on Pixel or Motorola devices. Battery optimization is present but less aggressive.
  • OxygenOS 13 and newer (OnePlus 11 and newer, plus older devices updated to OxygenOS 13+): Built on ColorOS. Includes additional background process restrictions, a different battery optimization UI, and features like "Auto-optimize" that aggressively manage apps.
  • ColorOS (OnePlus devices sold in China): Full ColorOS without the OxygenOS branding. Similar to OxygenOS 13+ but with additional region-specific features.
โš ๏ธOxygenOS 13+ Changes Background App Behavior

If your OnePlus device updated from OxygenOS 12 to 13 or later, your battery optimization settings may have been reset. Termux may start getting killed in the background even if it worked fine before the update. Re-apply all the battery and background process settings described on this page after any major OxygenOS update.


Desktop Modeโ€‹

Some OnePlus devices include a built-in desktop mode that provides a windowed interface when connected to an external display. Unlike Samsung DeX, OnePlus desktop mode is less feature-rich and not available on all models.

Checking for Desktop Modeโ€‹

  1. Connect your OnePlus device to an external monitor via a USB-C to HDMI adapter.
  2. Go to Settings > Connected devices > Connection preferences.
  3. Look for Desktop mode or PC Connect โ€” if present, you can enable it.

Alternatively, check from Developer Options:

  1. Go to Settings > About phone and tap Build number seven times to enable Developer Options.
  2. Go to Settings > System > Developer options.
  3. Look for Force desktop mode or Enable freeform windows.
โ„น๏ธDesktop Mode Availability

Desktop mode is available on the OnePlus 8 Pro, OnePlus 9 series, OnePlus 10 Pro, OnePlus 11, and newer Pro/Ultra models. Standard (non-Pro) models may lack this feature. Even when available, the implementation is basic โ€” it provides freeform windows but does not include a taskbar or full desktop shell like Samsung DeX.

Desktop Mode and ADLโ€‹

OnePlus desktop mode can coexist with ADL but does not replace Termux:X11. When desktop mode is active and you launch Termux:X11, the X11 session renders inside a freeform window on the external display. This can be useful โ€” you get a resizable Linux desktop window alongside your Android apps.

โญBest Practice

If your OnePlus device supports desktop mode and you have an external monitor, try running ADL with desktop mode enabled. The freeform window approach gives you the ability to switch between your Linux desktop and Android apps without Alt-Tabbing through Termux.


OxygenOS-Specific Settingsโ€‹

Battery Optimizationโ€‹

OxygenOS battery optimization is more aggressive than stock Android. You must exempt Termux from multiple layers of optimization.

Step 1: Disable Standard Battery Optimizationโ€‹

  1. Open Settings > Battery (on OxygenOS 13+, this may be Settings > Battery > More settings).
  2. Tap Battery optimization.
  3. Tap the dropdown at the top and select All apps.
  4. Find Termux, tap it, and select Don't optimize.

Repeat for Termux:X11 and Termux:API.

Step 2: Disable App-Specific Battery Settingsโ€‹

On OxygenOS 13+, there is a second layer of battery management per app:

  1. Go to Settings > Apps > App management (or Settings > Apps > See all apps).
  2. Find and tap Termux.
  3. Tap Battery usage (or App battery usage).
  4. Select Allow background activity and set battery usage to Unrestricted.
$adb shell dumpsys deviceidle whitelist +com.termux

Background Process Limitsโ€‹

Developer Options includes a setting that limits the number of background processes. By default, OxygenOS allows the system to decide, but you can explicitly increase the limit:

  1. Go to Settings > System > Developer options.
  2. Scroll to Background process limit.
  3. Set it to Standard limit or At most 4 processes (the maximum option).
โš ๏ธDo Not Set 'No Background Processes'

Setting the background process limit to "No background processes" will immediately kill Termux when you switch to another app. This is sometimes enabled by users attempting to improve performance. If ADL keeps dying when you switch apps, check this setting first.

OxygenOS Auto-Kill Behaviorโ€‹

OxygenOS 13+ includes an "Auto-optimize" or "Smart power saver" feature that learns your app usage patterns and kills apps it considers unused. Termux does not fit the usage pattern of a typical Android app โ€” it runs long background sessions with no visible UI activity โ€” so the system is likely to target it.

To prevent auto-kill:

  1. Go to Settings > Battery > Advanced settings (or Settings > Battery > More settings).
  2. Disable Sleep standby optimization if present.
  3. Disable Optimize battery use during sleep if present.

Additionally, lock Termux in the recent apps view:

  1. Open Termux so it appears in your recent apps.
  2. Open the recent apps view (swipe up and hold, or tap the square navigation button).
  3. Tap the three-dot menu on the Termux card (or long-press the card, depending on OxygenOS version).
  4. Select Lock (a lock icon will appear on the card).
โœ…๐Ÿ’ก Tip

Locking an app in the recent apps view tells OxygenOS to never auto-kill it. This is the single most effective step for keeping Termux alive on OnePlus devices. Do this for Termux:X11 as well.


ColorOS Differences (OxygenOS 13+)โ€‹

If your OnePlus device runs OxygenOS 13 or newer, the underlying system is ColorOS. The following additional settings may apply:

Auto-Launch Managementโ€‹

ColorOS has an auto-launch management system that controls which apps can start themselves or be started by other apps:

  1. Go to Settings > Apps > App management > Termux.
  2. Tap Auto-launch and ensure it is enabled.
  3. Tap Allow other apps to launch and ensure it is enabled.

This is important because Termux:X11 needs to be launched by Termux, and auto-launch restrictions can block this.

โ„น๏ธSettings Paths May Vary

OnePlus frequently reorganizes settings menus across OxygenOS updates. If you cannot find a setting at the path described above, use the search function in the Settings app to find it by name.


Performance on Snapdragon Chipsโ€‹

OnePlus devices use Qualcomm Snapdragon processors, which are well-suited for ADL workloads. The Snapdragon platform benefits from mature Adreno GPU drivers and strong single-core CPU performance.

What to Expect by Chipsetโ€‹

  • Snapdragon 8 Gen 3 / 8 Elite (OnePlus 12, 13): Excellent performance. Compiling, multitasking, and desktop rendering are smooth. These chips handle ADL workloads with headroom to spare.
  • Snapdragon 8 Gen 2 (OnePlus 11): Very good performance. Slightly less thermal headroom than Gen 3 but handles sustained workloads well.
  • Snapdragon 8 Gen 1 (OnePlus 10 Pro): Good performance but runs hot. Expect thermal throttling during heavy compilation. Consider using a cooling solution for extended sessions.
  • Snapdragon 888 (OnePlus 9 series): Adequate for basic ADL use. The 888 is notorious for thermal issues, so expect throttling under sustained load.
  • Snapdragon 865 and earlier (OnePlus 8 and older): Functional but limited. These chips have less RAM bandwidth and slower cores. Suitable for light desktop use and text editing but not recommended for development workloads.
๐ŸŸกPerformance โ€” Medium Impact

Snapdragon chips provide better single-core performance than Tensor chips at the same generation, which translates to faster single-threaded compilation and snappier UI rendering in the Linux desktop. If raw performance for development work is your priority, OnePlus devices with recent Snapdragon chips are among the fastest Android devices for ADL.


Compatibilityโ€‹

๐Ÿ“‹Compatibility
ItemStatusNotes
Termux from F-Droidโœ…Works on all OnePlus devices running Android 10+ with OxygenOS or ColorOS
proot-distroโœ…Full support on all Snapdragon-based OnePlus devices
Termux:X11โœ…On-device rendering works on all models
USB-C display outputโš ๏ธSupported on OnePlus 8 Pro and newer Pro/Ultra models. Standard models may lack DisplayPort Alt Mode.
Desktop mode (freeform windows)โš ๏ธAvailable on select Pro and Ultra models. Check Settings > Connected devices.
Bluetooth keyboard/mouseโœ…Standard Android Bluetooth, works out of the box
Wake lock (termux-wake-lock)โœ…Requires Termux:API add-on. Essential on OnePlus due to aggressive background killing.
Audio passthroughโœ…PulseAudio over Termux works on all OnePlus models

Troubleshootingโ€‹

๐Ÿ”งTroubleshooting
Termux is killed within minutes of switching to another app on OxygenOS 13+
OxygenOS 13+ aggressively kills background apps. Apply all three layers of protection: (1) Disable battery optimization for Termux in Settings > Battery, (2) Set Termux to 'Unrestricted' in Settings > Apps > Termux > Battery usage, (3) Lock Termux in the recent apps view. Also run termux-wake-lock inside Termux. If the problem persists, check Developer Options > Background process limit and ensure it is not set to 'No background processes'.
Termux:X11 fails to launch or shows a black screen after OxygenOS update
OxygenOS updates can reset auto-launch permissions. Go to Settings > Apps > App management > Termux:X11 and verify that 'Auto-launch' and 'Allow other apps to launch' are both enabled. Also check that Termux:X11 has the 'Display over other apps' permission under Settings > Apps > Special app access.
Device overheats and performance drops during compilation on OnePlus 10 Pro or OnePlus 9
Snapdragon 8 Gen 1 and 888 are known for high thermal output. Remove the phone case, place the device on a cool surface, and consider using a clip-on phone cooler. You can also limit CPU usage from within Termux by reducing the number of parallel compile jobs (e.g., use 'make -j2' instead of 'make -j4'). Avoid charging while running heavy workloads โ€” charging generates additional heat.
Storage permissions error when accessing shared Android storage from the Linux environment
OxygenOS may revoke storage permissions for apps that have not been used in the foreground recently. Open Termux, run 'termux-setup-storage', and grant the storage permission when prompted. If the permission dialog does not appear, go to Settings > Apps > Termux > Permissions and manually enable Storage access.