Reputation: 31662
4.9.0-2-amd64 #1 SMP Debian 4.9.18-1 (2017-03-30) x86_64 GNU/Linux
Android Studio 2.3.3
When I try to run an AVD with hardware acceleration I get this error:
emulator -avd n5 -verbose
...
emulator: Initializing hardware OpenGLES emulation support
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 155 (GLX)
...
So then I tried to use my system libraries ( running with -use-system-libs) and it started but the display small but it does accept input:
EDIT 1: The the input is borked still but I think I know why the screen is so small, I have a high density display. Perhaps there is a way to compensate for this?
EDIT 2: It does accept input (there was just some lag). So the problem is just the small screen. I've tried a variety of AVD images but all have the same issue.
Upvotes: 0
Views: 499
Reputation: 23
I'm using a 15" 4k display, so disabling scaling globally was not an option for me. Instead I was looking to disable scaling for the avd only.
Unfortunately I was unable to add QT_SCREEN_SCALE_FACTORS=1
as a parameter before the emulator command in android studio settings.
What I ended up doing was renaming {$ANDROID_SDK}/emulator/emulator
binary and placing a script like this:
#!/bin/bash
QT_SCREEN_SCALE_FACTORS=1 {FULL_path_to_sdk_here}/emulator/emulator.trick "$@"
This worked great for me, and I have not noticed any drawback. To my surprise the emulator didn't show up really tiny, instead it now fills the whole size of the original window!
Upvotes: 2
Reputation: 31662
This was an issue with screen scaling.
I use KDE plasma with a screen scalling setting of 1.5 which caused this issue.
Upvotes: 0