I’m trying to use Android Studio, but the virtual android doesn’t start because of KVM error. Tinkering around with another VM application I understood that it’s a location/permission issue (flatpak Gnome Boxes had the same issue, couldn’t load KVM, but Boxes installed via terminal worked and I could start a VM).

On the official Android Studio website they suggest extracting the tar.zip in /usr/local but the system doesn’t allow me to, so I extacted it on the desktop and the app runs, but I get a “/dev/kvm is not found” error, which should be because of the location I’m running Android Studio from.

So, should I just sudo force move the folder of Android Studio from desktop to /usr/local or is there a better way to do it?

PoP_OS just in case it can be useful to know.

Thanks in advance!

edit: fixed it by updating BIOS to latest Beta. Can’t believe it was a bug in the version I was running and no one else catched it, since Beta changelog didn’t mention it.

  • mumei@lemmy.worldOP
    link
    fedilink
    arrow-up
    1
    ·
    6 days ago

    I get the same exact error via Flatpak and “the user … is already a member of kvm”, unfortunately.

    Thanks anyway!

    • jrgd@lemm.ee
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 days ago

      I did accidentally type the relevant command incorrectly, forgetting that sudo swaps the user before subcommands like whoami will resolve. So that command attempted to add the kvm group to ‘root’ rather to your user. I have fixed the command in the relevant comment for anyone else reading this thread. You can try sudo adduser "<username>" kvm, manually substituting <username> for your username. As normal, restart after adding the group to your user. Additionally, I have added a warning to the solution in the original comment of why you may not want to keep this solution enabled forever as well as a way to disable it later if desired.

      • mumei@lemmy.worldOP
        link
        fedilink
        arrow-up
        2
        ·
        4 days ago

        I fixed my issue by flashing the latest Beta BIOS for my motherboard. Took me almost a full day of troubleshooting and looking online and repeating the same steps over and over again, but then almost on a whim I decided on flashing the Beta BIOS (no mentions of virtualization in the changelog, so I didn’t really have reaaons to) and now Android Studio finally simulates the Android device. Thanks for your help!

        • jrgd@lemm.ee
          link
          fedilink
          English
          arrow-up
          2
          ·
          4 days ago

          I can only guess the previous BIOS wasn’t enabling every virtualization extension necessary for some applications for some reason then, given that GNOME Boxes did work. Glad you’ve found a solution.

      • mumei@lemmy.worldOP
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        6 days ago

        Oh, yeah, I got an error with the original command you wrote, so I ended up typing the correct one anyway, and that’s what returned the message that I’m already part of that group.

        So, just to make it clear, sudo adduser “<myusername>” kvm was the command I ended up using and that told me I’m already part of the group (I’ve been trying basically all solutions I could find online and I think one suggestion was to add myself to the group, so I may have already issued that command earlier today and I did restart several times between then and now)