2

I have a problem with my ASUS G53jw PC. Its chipset and CPU are rated to support virtualisation, which is enabled in the BIOS/Setup. To confirm, I ran egrep -c '(vmx|svm)' /proc/cpuinfo which returns a value of four (4) which suggests virtualisation should work.

However, hardware accelerated Android emulation fails to launch.

Is the use of the nouveau video driver instead of an Nvidia driver the source of the failure? If not, how may I effectively troubleshoot this?

UPDATE 2
After installing official Nvidia drivers the Android emulation runs just fine :) Thanks to N0rbert for pointing out my typo!
Solved!

  • First of all you have typo in egrep command (you need logical or here "|", not backslash ""). It should be egrep -c '(vmx|svm)' /proc/cpuinfo. Run it and add result to the question. – N0rbert Jul 17 '18 at 10:51
  • Thanks! The weird result was caused by my typo indeed. – Joel Sahlin Jul 19 '18 at 12:37
  • 1
    To mark question as solved I posted my comment as answer. Other option was to delete the question. – N0rbert Jul 19 '18 at 12:41
  • This is an XY Problem. You should ask about your actual problem, not what you think the solution is (as we've seen it isn't). – Michael Hampton Jul 19 '18 at 18:44
  • @Joel Sahlin, we need some specific info here. Please click on the grey edit link above at left and add it into the question. Did you install Android Studio through Wine, Openbox, kvm, or some other virtual OS; or, did you install it directly into the Ubuntu system? Please advise exactly how you did it, for there are four, count them, 4 methods known at https://askubuntu.com/questions/634082/how-to-install-android-studio-on-ubuntu for installation of Android Studio directly into Ubuntu, plus the virtual alternatives. – K7AAY Jul 20 '18 at 21:58
  • I have android studio directly installed on ubuntu. No virtualization. The problem was emulating android on my ubuntu system and the typo made me think that I had a real problem. I am so happy that it was just a typo. :) – Joel Sahlin Jul 21 '18 at 04:28

1 Answers1

1

First of all you have typo in egrep command:
you need logical OR here "|", not backslash "\".

It should be egrep -c '(vmx|svm)' /proc/cpuinfo.

Reading your update we can conclude that it was a typo.


Other way to check is to use kvm-ok (installable from cpu-checker package).

On system with enabled virtualization its output is as follows:

$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

If you have problems with VirtualBox - ensure that you have set correct Settings for virtual machine: open System, select Acceleration tab and check that you have correct settings:

  • Paravirtualization Interface: Default
  • Hardware Virtualization: ☑ Enable VT-x/AMD-v, ☑ Enable Nested Paging

    VirtualBox - System - Acceleration

This will result in blue V (V on CPU) on CPU icon in status bar of VirtualBox machine window (see yellow hint below for details - machine uses KVM) :

VirtualBox status bar

N0rbert
  • 99,918
  • Yes but I still have problems with virtualization so it is not completely solved yet. – Joel Sahlin Jul 19 '18 at 12:51
  • What kind of problems do you have? – N0rbert Jul 19 '18 at 13:02
  • Thank you for your help! :) The problem is fixed now. The typo made me think that I had a different problem then I actually had. All I needed in the end was the official graphics drivers. Again thanks for pointing out my typo! :) – Joel Sahlin Jul 21 '18 at 04:22