i have a headless box running bbqlinux that i'm trying to use as an android-studio development box. when i go to launch an .avd in the emulator, i receive this error:

Cannot launch AVD in emulator
Output: emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure KVM is properly installed and usable.
CPU acceleration status: This user doesn't have permissions to use KVM (/dev/kvm).

this was freaking me out and i spent a good amount of time trying to sure that everything was enabled, installed correctly, permissions set, etc... then: i plugged a screen in and logged directly into the box and bam! it works fine.

so my problem is maybe the vncserver? i'm using tigervnc that i set up according to this page: https://wiki.archlinux.org/index.php/Vncserver

just in case it helps, my xstartup file is

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
vncconfig -iconic &
startxfce4 &

other than that, i've not changed the default environment hardly at all except to add lighttable, ssh, & vnc. so my question is really

  • should i not be doing it this way? is there a better workflow or vnc server program for what i'm trying to do?
  • is there a command switch or option that i missed that maybe enables the hardware acceleration over vnc?


  • When I tried running the emulator inside vnc it failed, I can't remember the exact reason why it failed - but I have a vague recollection of it being that VNC does not have native support for XRANDR. – Drav Sloan Aug 5 '15 at 22:00
  • Also if memory serves I got more information from adb logcat – Drav Sloan Aug 5 '15 at 22:05
  • huh. i haven't heard of xrandr before, but a quick search seems to show that at least tigervnc should support it. also adb logcat won't show me any data since the emulator never actually starts. – will_ Aug 5 '15 at 22:29

in the end, i pretty much got it running by using nomachine. here's what i did:

  1. download the current .tar.gz from nomachine.com
  2. cd /usr
  3. sudo tar xvzf nomachine*.tar.gz
  4. sudo /usr/NX/nxserver --install fedora <-- adding fedora here overrides the "linux is not a supported operating system" message.
  5. sudo /usr/NX/scripts/vgl/vglserver_config -config +s +t +f
  6. in /usr/NX/etc/node.cfg set EnableVirtualGLSupport 1
  7. reboot
  8. panic a little because now (a) my client's nomachine won't acknowledge the server's desktop and (b) the server's desktop won't load on startup. if i run startx i receive an error message about mate-session, which i'm not even using.
  9. in ~/.xinitrc i set DEFAULT_SESSION=startxfce4.
  10. reboot
  11. the desktop comes up fine, but when i connect from the client i receive this error from nomachine "no available sessions on this server".
  12. sudo /usr/NX/bin/nxserver --restart

and now it works. the emulator comes up and is highly responsive (yay!).

after rebooting a couple times, i'm having these issues:

  • the desktop doesn't start and i have to run startx from the local terminal on the server. that's annoying if i'm remote.
  • i have to restart the nxserver 2 out of 3 times that i reboot.
  • when i'm remoted in, the local desktop is open - so i need to put the mouse & keyboard under the desk so people don't accidentally type into my session. also if you turn on the monitor you can see what i'm doing. (or see what i'm not doing, which is probably worse, ha!)

i hope this helps someone!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.