[Chromebooks] ycavan:
Recently I purchased a shiny new Lenovo Ryzen 7 3700C chromebook with 16 gigs of ram and the dream of hardware accelerated Linux. ...and Google dashed my dreams pretty bad lol. I think most people know that if you try to enable gpu acceleration with an AMD computer, you're asking for seizure-inducing glitching. :)

I did notice some interesting things, though... scrcpy was able to stream my phone pretty flawlessly after I passed it over to Linux. The response was staggering, scrcpy was able to keep up with my phone screen updates with no lag. There was only 1 problem... the mouse icon was all glitched up. Sometimes, it was just a few random dots.. other times it was non-existent. Kinda depressing right?

After much research, it turns out that ChromeOS has an awesome mouse hack under the Accessibility section... It's called "Highlight mouse when moving." This was almost like the holy grail here! Using this feature makes a red circle around your mouse position whenever you move it.

Now, we're starting to have some fun! Scrcpy works perfectly here... so what else works? I tried multiple applications and I noticed that if the application renders the screen continuously, like a game, there are no graphics glitches ( other than the aforementioned mouse problem. ). That's great if all we want to do is play games in the Linux VM, but other applications, like firefox, are horrible glitchy messes. I ended giving Lenovo a 3* review because I felt there was soo much potential that Google left on the table because you have to reboot the system every time you switch from gpu acceleration to no gpu acceleration. It was enough to drive a guy batty.

Then I happened across an article that really intrigued me, someone installed Windows 10 on their Chromebook using qemu and it hit me like a light... I totally forgot that new Chromebooks supported NESTED KVM. I think it's a little too soon to run Windoze under Qemu because there are currently no Windows drivers for virgl acceleration. Linux.. OTOH... oh yes, Linux does support Virgl.

TLDR: I was disappointed with Google's implementation of the Linux VM and will briefly describe how to run a true HW accelerated Linux VM.

Step 1. Start up Linux (Beta) with as much hard drive space as you can... I'd say about 80% of your storage

Step 2. Enable Crostini gpu accereation using chrome://flags/#crostini-gpu-support => enabled

Step 3. Start up your Linux terminal and bring everything up to date: sudo apt update ; sudo apt upgrade

Step 4. Install libvirt following this guy's article: https://chromeunboxed.com/insalling-windows-on-chromebook-crostini-linux-kvm-qemu-virtual-machine/ ( obviously don't install Windoze 10 unless you're into that sort of thing )

Step 5. From here, grab your favorite Linux distro install cd. I prefer running Arch linux, so that's what I grabbed.

Step 6. From libvirt-manager, install your new VM using your Linux distro cd.

Step 7. For the most part, I'm not going to describe how to install Arch Linux or any distro but if you need a guide, Google is your friend. Be sure to set a Display Manager because you want a graphical user interface to log in to. <-- This is Critical

Step 8. Make sure your Linux distro is running fine, then you will want to add a couple of Kernel modules to load on boot: kvm & virtio-gpu. With Arch Linux, you would create a file under /etc/modules-load.d with 2 lines.. kvm and virtio-gpu. I called mine kvm.conf.. Literally, it looks like this:

kvm

virtio-gpu

Step 9. Reboot and make sure your distro starts up properly.

Step 10. If your distro boots properly, you will now go into the experimental ( but fun ) part of the excercise. It's time to modify some settings.

10A. Click on the Light Bulb icon to show your VM settings.

10B. Under CPU, check Copy Host Configuration

10C. Under Display Spice:

- Type: Spice Server

- Listen: None

- OpenGL: Checked

- System Chromium OS

10D. under Video Virtio:

- Model: Virtio

- 3d Acceleration: Checked

At this point, I wish you luck. It may take many reboots to get this working but if your GUI comes up then bring up a terminal window and grab the latest mesa-demos. In your terminal window, type: glxinfo -B. If this all worked out, it should say that you have accelerated graphics running Virgl.