Telegram

WHY PHOTO PICKER MENU IS INVISIBLE ON REDMI NOTE 7 PRO?

Why Photo Picker Menu Is Invisible on Redmi Note 7 Pro?

We understand the frustration that arises when essential system features, such as the Android photo picker, fail to function correctly on custom ROMs like LineageOS. The specific issue reported regarding the Redmi Note 7 Pro (violet) running LineageOS 23.0—where the photo picker menu becomes invisible when “Disable HW Overlays” is disabled—is a nuanced technical challenge. It involves the complex interaction between the Android framework, the display composer (SurfaceFlinger), and the specific GPU drivers of the Qualcomm Snapdragon 675 chipset.

This article provides a comprehensive, deep-dive analysis of why this visual glitch occurs and offers advanced, step-by-step solutions to resolve it. We will explore the underlying graphics rendering pipeline, the specific behavior of the “Disable HW Overlays” developer option, and how to stabilize the photo picker interface on your device without sacrificing performance or battery life.

Understanding the Android Graphics Pipeline and HW Overlays

To effectively troubleshoot the invisibility of the photo picker menu, one must first understand the fundamental architecture of the Android graphics stack. The issue is not merely a software bug but a conflict in how graphical layers are composed on the screen.

How Hardware Overlays (HW Overlays) Function

In the Android operating system, the SurfaceFlinger service is responsible for compositing all the graphical layers created by applications and the system UI. These layers include your wallpaper, active applications, status bars, navigation bars, and pop-up menus like the photo picker.

Normally, Android attempts to offload as much of this compositing work as possible to dedicated hardware blocks within the System on a Chip (SoC), known as Hardware Overlays. By assigning specific layers (like a video playback or a static image) to these hardware overlays, the GPU is freed up to handle 3D rendering and other intensive tasks. This process, known as Hardware-Composition, reduces latency and saves battery power.

The “Disable HW Overlays” Developer Option

The “Disable HW Overlays” setting is a developer tool found in the Developer Options menu. When enabled, it forces the Android operating system to bypass the hardware overlay path entirely. Instead of using specialized hardware blocks to compose layers, the system forces the GPU to handle all composition tasks. This is often referred to as GPU-Composition.

Why would a user enable this? Developers and enthusiasts often enable “Disable HW Overlays” for specific reasons:

  1. Debugging: To identify graphical glitches caused by faulty hardware overlay drivers.
  2. Smoother Scrolling: On some older devices, forcing GPU composition can result in perceived smoother scrolling by bypassing inefficient hardware scaler paths.
  3. Forcing High-Bitdepth Rendering: To ensure apps render in a specific color depth (e.g., 10-bit color) that hardware overlays might not support.

However, forcing the GPU to handle every single pixel on the screen 60 or 90 times per second introduces a significant computational load. On the Redmi Note 7 Pro, this setting is the root cause of the invisible photo picker menu.

The Redmi Note 7 Pro (Violet) Specifics: Snapdragon 675 and LineageOS 23.0

The Redmi Note 7 Pro utilizes the Qualcomm Snapdragon 675 processor. This chipset uses the Adreno 612 GPU. While capable, this GPU is tuned for efficiency rather than raw power. When running LineageOS 23.0 (based on Android 14), the device relies on open-source hardware abstraction layers (HALs) and kernel drivers to bridge the gap between the proprietary hardware and the open-source OS.

The Rendering Conflict

The reported issue—where the photo picker menu is invisible only when “Disable HW Overlays” is disabled (i.e., when GPU composition is forced)—indicates a specific rendering flaw in the SystemUI or the Photo Picker App (com.android.providers.media.module).

When “Disable HW Overlays” is active, the GPU is rendering the UI. The photo picker likely relies on specific Z-ordering (layer depth) or alpha blending (transparency) operations that the Adreno 612 driver handles slightly differently than the hardware overlays would. If the driver calculates the transparency value of the menu background as 0% (fully transparent) due to a floating-point error or a driver bug, the menu becomes invisible, even though it is technically present and touch-responsive.

When “Disable HW Overlays” is inactive, the system uses hardware overlays. The hardware scaler of the Snapdragon 675 likely handles the alpha blending of the photo picker menu correctly, making the menu visible.

Troubleshooting: How to Fix the Invisible Photo Picker Menu

If you are facing this issue on LineageOS 23.0, follow these steps in order. We prioritize software-side fixes before suggesting kernel-level modifications.

Method 1: Verify and Reset Developer Options

The most immediate fix is to ensure the conflicting setting is managed correctly.

  1. Go to Settings > About Phone.
  2. Tap Build Number 7 times to unlock Developer Options.
  3. Navigate to System > Developer Options.
  4. Scroll down to the Drawing or Hardware Accelerated Rendering section.
  5. Locate “Disable HW Overlays”.
  6. Toggle this option OFF.
    • Crucial Note: On the Redmi Note 7 Pro, having “Disable HW Overlays” ON causes the photo picker to disappear. You want this OFF to allow the hardware overlays to handle the composition of the photo picker menu correctly.
  7. Reboot your device. Changes to graphics composition often require a full restart to take effect system-wide.

Method 2: Clear Cache of System UI and Media Provider

Corrupted cache data in the Media Provider or System UI can cause the photo picker to fail to initialize its visual elements correctly. Clearing this data forces the system to rebuild the cache from scratch.

  1. Go to Settings > Apps > See All Apps.
  2. Enable Show System Apps (tap the three-dot menu and select “Show system”).
  3. Search for “System UI”.
    • Tap on it > Storage & Cache > Clear Cache. (Do not clear storage unless you want to reset your quick settings layout).
  4. Next, search for “Media Storage” or “Media Provider”.
    • Tap on it > Storage & Cache > Clear Cache and Clear Storage.
    • Warning: Clearing storage for Media Storage will rescan your entire library; recent metadata edits might be lost, but your files remain safe.
  5. Restart the device and test the photo picker.

Method 3: Adjust Animation Scales (Workaround)

Sometimes, the photo picker menu fails to render because the animation duration is set to zero or a very low value, causing a race condition in the rendering loop. Adjusting these scales can provide the GPU enough time to compose the layers correctly.

  1. Go to Settings > Developer Options.
  2. Scroll to Drawing (or look for Window Animation Scale, Transition Animation Scale, and Animator Duration Scale).
  3. Ensure all three scales are set to 1x (or at least 0.5x).
  4. If they are set to Animation Off, this can cause the invisible menu glitch on LineageOS 23.0.
  5. Test the photo picker again.

Advanced Solution: Modifying Device-Specific Configurations

If the standard Android settings do not resolve the issue, the problem likely lies in the device tree or the specific ROM build for the Redmi Note 7 Pro. Since the user mentioned this occurs specifically on LineageOS 23.0, the issue may be a regression in the SurfaceFlinger flags or Proprietary Vendor Blobs.

Checking build.prop Flags

We can modify specific system properties in the build.prop file to alter how the GPU handles overlays and layers. These commands must be executed via ADB (Android Debug Bridge) or a root-enabled file explorer (using Magisk).

Using ADB (No Root Required for Temporary Fix): Connect your Redmi Note 7 Pro to a PC with USB Debugging enabled.

  1. Force GPU Composition (Alternative Approach): Sometimes, forcing GPU composition globally resolves specific layer glitches, despite the performance hit.
    adb shell setprop debug.hwui.renderer opengl
    
  2. Disable HWC2 (Hardware Composer 2): If the issue is with the Hardware Composer HAL implementation for the Snapdragon 675, you can force a fallback to a simpler composition mode.
    adb shell setprop debug.egl.force_sw true
    
    Note: This will significantly reduce performance but will confirm if the issue is purely hardware-composition related. If the menu becomes visible with this command, the issue is definitively the HWC implementation.

Proprietary Vendor Blobs (The “Violet” Specifics)

The Redmi Note 7 Pro relies on proprietary vendor libraries (blobs) from Xiaomi to handle graphics. When flashing custom ROMs, sometimes these blobs are outdated or incompatible with the newer Android 14 code in LineageOS 23.0.

The Fix via Magisk Modules: Since your website focuses on Magisk Modules, we can leverage the Magisk Module Repository to patch the system without dirty-flashing a new ROM.

  1. Vendor Overlay Patcher: Some modules are designed to fix “Ghost Touch” or “UI Glitches” by updating the vendor overlays.

    • Search the Magisk Module Repository for modules specifically tagged for “violet” or “Snapdragon 675 Graphics Fix”.
    • Look for modules that update the vendor.qti.hardware.display.composer-service or similar HAL components.
  2. Performance Profile Modules: If the issue is related to the GPU governor throttling too aggressively:

    • Install a kernel management module from the repository.
    • Set the GPU governor to msm-adreno-tz (or the equivalent available for Adreno 612) and ensure minimum frequency is not set too low.

Modifying SurfaceFlinger Flags (Root Required)

For users with root access via Magisk, we can directly manipulate the SurfaceFlinger behavior. This requires a root file explorer or terminal emulator.

We recommend adding the following lines to the end of your system/build.prop file using a Magisk Module or a direct edit (ensure you have a backup):

# Fix for invisible UI elements on SD675
debug.sf.enable_hwc_vds=1
debug.sf.hwcomposer=1
persist.debug.sf.enablewc=1

Explanation:

After adding these lines, wipe the ART Cache (Dalvik/ART Cache) via TWRP Recovery or use the “Wipe Cache Partition” in the recovery menu, then reboot.

The Role of Magisk Modules in Fixing Graphics Issues

As a user of Magisk Modules, you have a powerful toolset at your disposal. The invisible photo picker menu is often a side effect of aggressive system optimization or missing proprietary libraries. Here is how specific modules from the repository can assist:

1. Dolby Atmos / Audio Mods

While it seems unrelated, some audio modification modules inadvertently hook into the audio flinger, which can interfere with the visual synchronization of system UIs. If you have any audio mods installed, temporarily remove them to test if the photo picker visibility returns.

2. Systemless Hosts Module

If you use AdAway or similar ad-blockers, the systemless hosts module is essential. However, ensure it is not conflicting with the Media Provider. A corrupt hosts file can sometimes delay the initialization of apps that access media, causing the photo picker to time out and render invisibly.

3. Custom Kernel Modules

The Redmi Note 7 Pro has a vibrant development community. Look for kernels in the Magisk Repository that specifically support LineageOS 23.0.

Deep Dive: Why LineageOS 23.0 Might Be Culprit

LineageOS 23.0 brings Android 14 to the Redmi Note 7 Pro. This upgrade involves significant changes to the WindowManager and DisplayManager services compared to older Android versions.

The API Level Change

Android 14 enforces stricter security and privacy policies. The Photo Picker is no longer a simple intent to the Gallery app; it is a sandboxed system component. The visibility of this component is tied to the WindowManager.LayoutParams flags. If the FLAG_DIM_BEHIND or alpha values are calculated incorrectly by the LineageOS framework (due to a mismatch with the Snapdragon 675’s display driver), the window becomes transparent.

Testing with GApps

If you are using MindTheGapps or NikGapps on LineageOS 23.0, ensure you have the latest package. The Google Photos app relies on the Google Play Services for the photo picker functionality on Android 14.

  1. Go to Settings > Apps > Google Play Services.
  2. Check if it has permissions to access Storage and Location.
  3. Update the Google Photos app to the latest version via the Play Store. An outdated client cannot request the picker correctly, leading to a blank UI.

Summary of Troubleshooting Steps

To resolve the invisible photo picker menu on your Redmi Note 7 Pro running LineageOS 23.0, follow this hierarchy of fixes:

  1. Primary Fix: Go to Developer Options and ensure “Disable HW Overlays” is turned OFF. Reboot immediately.
  2. Secondary Fix: Clear Cache and Storage for Media Storage and System UI. Reboot.
  3. Tertiary Fix (Root): Use a Magisk Module to update vendor graphics blobs or install a custom kernel optimized for LineageOS 23.0 on the Snapdragon 675.
  4. Quaternary Fix (ADB): If you cannot root, use ADB to adjust animation scales and verify GPU driver behavior using the setprop commands provided above.

By understanding the delicate balance between hardware acceleration and software rendering on the Snapdragon 675, we can stabilize the Android 14 photo picker. The key lies in allowing the hardware overlays to do their job for UI elements while reserving GPU power for the intensive tasks the Redmi Note 7 Pro handles best.

Explore More
Redirecting in 20 seconds...