Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Lubuntu - libGL error: failed to load driver: i965

I'm trying to set up an Android dev environment on Lubuntu but I keep getting this error when I load the emulator:

⇒ ./emulator-x86 -avd test
libGL error: failed to load driver: i965
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
emulator: warning: opening audio output failed

When I run it with LIBGL_DEBUG=verbose I get:

⇒ ./emulator-x86 -avd test  
libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/tls/i965_dri.so
libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/i965_dri.so
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: i965
libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/swrast_dri.so
libGL: Can't open configuration file /home/facetoe/.drirc: No such file or directory.
libGL: Can't open configuration file /home/facetoe/.drirc: No such file or directory.
libGL: Can't open configuration file /home/facetoe/.drirc: No such file or directory.
libGL: Can't open configuration file /home/facetoe/.drirc: No such file or directory.
emulator: warning: opening audio output failed

The emulator runs very slowly and uses around 80% of my CPU. Has anyone encountered this or have any suggestions to make it work?

Edit: Ok I may have figured it out. Turns out I needed to add myself to the video group, logout and log back in. Additionally I had to run export LD_LIBRARY_PATH=/home/facetoe/programs/adt-bundle-linux-x86_64-20131030/sdk/tools/lib. This seems to have fixed it, although I still get an error about audio...

like image 983
facetoe Avatar asked Dec 07 '13 08:12

facetoe


1 Answers

export ANDROID_EMULATOR_USE_SYSTEM_LIBS=1 did it for me. It seems that the libstdc++ embedded with the emulator was too old compared to the rest of the system.

Source: https://wiki.archlinux.org/index.php/Android#libGL_error:_failed_to_load_driver:_swrast_OR_AVD_doesn.27t_load_and_no_error_message_displayed

like image 181
tuxayo Avatar answered Sep 20 '22 17:09

tuxayo