Issue
Update: The problem does not occur with the NVIDIA driver version 510 anymore.
I am running Android Studio 2020.3.1 on Wayland and I'm using the proprietary NVIDIA driver version 495, which allows me to use the the regular GBM implementation of Wayland instead of the especially tailored EGL version.
My problem is, that every time I try to start an Android emulator (AVD) via the AVD Manager, I get the following message after a few seconds:
The emulator process for AVD Pixel_2_API_30 has terminated.
Starting the AVD from the command-line shows that a segmentation fault occurred:
INFO | Android emulator version 31.1.4.0 (build_id 7920983) (CL:N/A)
WARNING | unexpected system image feature string, emulator might not function correctly, please try updating the emulator.
INFO | Info: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. ((null):0, (null))
Fontconfig warning: "/usr/share/fontconfig/conf.avail/05-reset-dirs-sample.conf", line 6: unknown element "reset-dirs"
WARNING | cannot add library /home/letorbi/Android/Sdk/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed
INFO | added library /home/letorbi/Android/Sdk/emulator/lib64/vulkan/libvulkan.so
Segmentation fault (core dumped)
How can I get more information and is there a workaround to prevent the segfault?
For what it's worth, Wayland EGL is able to start the emulator somehow, but I see nothing but a black screen on the device. X11 is working, but I'd like to stay on Wayland if it is possible.
Solution
I was able to work around the segmentation fault, by disabling the Vulkan support for AVDs. This can be easily achieved by adding the following line to the file ~/.android/advancedFeatures.ini:
Vulkan = off
I've got this hint from an answer in a related question. This answer also suggests to add GLDirectMem = on
, but that line was not needed to solve my problem. However, some benchmarking revealed that it might improve the performance a little bit, so you might want to add that line as well.
Answered By - Torben
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.