Project

General

Profile

Graphics » History » Revision 17

Revision 16 (doak complex, 01/24/2020 12:25 AM) → Revision 17/46 (dl lud, 01/24/2020 03:14 AM)

h1. Graphics 

 By default, Replicant devices use the Android software renderer, which relies on the CPU for graphics rendering, a technique known as software rendering. Using the dedicated graphics processor (GPU) currently requires non-free software on all of the supported devices. As free-software replacements are not yet available, the GPU cannot be used with Replicant for the moment (see [[GraphicsResearch]]). The software rendering is the reason why Replicant devices appear slow at times and is responsible for a lot of crashes that can happen during usage. 

 Until [[Images#Replicant-60-0003-images|Replicant 6.0 0003]] Replicant used the [[GraphicsResearch#Android-software-renderer|Android software renderer]], also known as libagl. libagl is fast, but [[Graphics#Known-issues-with-libagl|caused several issues]] due to lack of OpenGL ES (GLES) 2.0 support. 

 As of "Replicant 6.0 0004 rc1":https://ftp.osuosl.org/pub/replicant/images/replicant-6.0/0004-rc1/, [[GraphicsResearch#Mesas-llvmpipe|llvmpipe]] is used as the default software renderer. llvmpipe has a more complete GLES implementation EGL support than libagl the Android software renderer (see #705), so more apps work with it, like Firefox-based browsers or more recent WebViews webviews (see #1780). Unfortunately, llvmpipe is still too slow for certain system components, which may able to be true for some apps. Furthermore, certain apps still crash with llvmpipe, although less frequentely. Usually, the screen stays black if an app does not work with llvmpipe. 

 To cater for these issues, Replicant 6.0 0004 includes a "mechanism that allows choosing default renderer, but it is possible to switch back and forth between llvmpipe and ligagl, on a per process basis":https://lists.osuosl.org/pipermail/replicant/2019-August/002054.html. Such mechanism is "actually used":https://lists.osuosl.org/pipermail/replicant/2020-January/002421.html on the Replicant 6.0 0004 images Android software renderer. 

 h2. Enabling llvmpipe as software renderer 

 TODO: The following enables it globally. Add information about scripts to force some switch only "non-system"-components (SurfaceFlinger, bootanimation, system components (bootanimation, SurfaceFlinger server ?) to llvmpipe. 
 TODO: Also add information which files are used for this (@/etc/libGLES_android@ and system_server) other files within @/data/data/<app>@). Refer to use libagl. "this mail":https://lists.osuosl.org/pipermail/replicant/2019-August/002054.html. 

 h2. Choosing the default software renderer 

 Make sure [[ADB]] is running as root and the system partition [[ADB#Modifying-the-system-partition|is mounted writable]]. 

 The following command switches between llvmpipe and libagl: the software renderer implementation: 
 <pre> 
 adb shell "grep -q "ro.libagl=1" /system/build.prop && sed "s/ro.libagl=1/ro.libagl=0/" -i /system/build.prop || sed "s/ro.libagl=0/ro.libagl=1/" -i /system/build.prop"  
 </pre> 

 Then reboot the device. llvmpipe should now be enabled. To switch back to previous the default Android software renderer, run the above command again and reboot the device. 
 This method works on both Replicant 6.0 0003 and 0004. Do note that on 0003 you will start 

 There are also issues with libagl by default, whereas on 0004 certain apps when using llvmpipe, although crashes should be less frequent. Usually, the default is screen stays black if an app does not work with llvmpipe. 

 h2. Choosing the software renderer for a specific app 

 h2. Choosing the software renderer for a system component 

 
 In case the screen compositor (SurfaceFlinger) is used with llvmpipe, this could have an effect to other apps. For instance with Gallery and Orbot it happens, that some GUI elements are visible, while the main screen is black. The GUI of Simple File Manager works as long as no image is viewed in fullscreen.  

 h2. Known issues with libagl the Android software renderer 

 * Selecting the third option besides photo and video (Panorama mode) will crash the Camera app. 
 * Video playback in the browser does not work. (issue #1533) 
 * Screenshots do not work. (see [[Screenshots]] for a workaround) 
 * Selecting wallpapers from storage does not work. 
 * Screen content is sometimes shortly visible before unlocking. (issue #1275, happens with llvmpipe as well) 
 * Previews of the windows in the tasks switcher are missing. 
 * Switching between apps, apps and the launcher or different views inside an app is sometimes slow and the device may seem unresponsive. 
 * There are issues with using folders with the Trebuchet launcher. (issue #1790, happens with llvmpipe as well) 

 h3. Popular apps from F-Droid that do not work 

 * All Firefox-based browsers like "IceCatMobile":https://f-droid.org/repository/browse/?fdfilter=icecat&fdid=org.gnu.icecat and Orfox 
 * "Document Viewer":https://f-droid.org/repository/browse/?fdfilter=document+viewer&fdid=org.sufficientlysecure.viewer 
 * "LibreOffice Viewer":https://f-droid.org/repository/browse/?fdfilter=libreoffice&fdid=org.documentfoundation.libreoffice 
 * "RedReader":https://f-droid.org/repository/browse/?fdfilter=redreader&fdid=org.quantumbadger.redreader cannot display images ("upstream bug":https://github.com/QuantumBadger/RedReader/issues/279) 

 h2. See also 

 * There is a page about [[GraphicsResearch]] that gathers gather information to improve graphics support.