Looking glass starting point

Good Day,

im looking into using looking glass on bazzite.

Is there an piece of code / docs / guide somewhere for the initial setup ?
(beside GH MR / ujust / etc)

Much kudos for the team on putting out bazzite.
Its pretty much all of the best worlds FOSS wise on bleeding edge for me.

Hello, I am the dev that wrote the VM integration :slight_smile:

The way I setup looking-glass is that i make a fedora distrobox and compile the looking-glass-client matching the host i downloaded in the Windows VM following the official documentation (for version B6 in my case) inside that, then copy the binary to $HOME/.local/bin so i can use it directly in bazzite

you can find the fedora dependencies at Installation on other distributions - Looking Glass

note: i had a bug recently where the distrobox container had to be made without the --nvidia flag to correctly install the cmake-data package, so currently make this container without using ujust (as ujust applies the --nvidia flag automatically)

In regards to the kernel module.
You will have to use a shm file for the looking-glass memory (/dev/shm/looking-glass), ujust setup-virtualization has an option to set that up for you along with SELinux rules.
Sadly the kvmfb kernel module cannot be installed yet as it needs to be a kmod and be built into the image itself to be usable in ublue, and since from my understanding everything with looking-glass needs to be version identical, it makes it very hard to support it without locking people to specific looking-glass versions, so the shm file is the best universal approach right now and we leave the kernel module to be something the user can explore by making a custom image instead.

2 Likes

Hello to you :wave:,

thanks a bunch @HikariKnight for providing juicy information bits - exactly what i needed. :man_bowing:

overall sounds like a longer session - lets go \o/ . :smiley:

The KVMFR kernel module is not LG version specific, only the host and client application versions need to match.

See: libvirt/QEMU Installation — Looking Glass B7-rc1 documentation

Note I am referencing the B7-rc1 documentation as the KVMFR documentation has been improved substantially, the details here still apply to B6. You may also need to compile the kernel module from B7-rc1 even if you are on B6 if your kernel version is too new.

ok this is awesome! we can look into getting a copr done to include the module then, thanks! i wanted to ask in the discord but havent had the time to get around to it due to real life getting in the way.

we went with the shm (for now) mainly because we knew that was universal until we got full clarification :grinning:

plus i followed the B6 documentation because it was the stable and i know how fast this can move sometimes.

2 Likes

Figured i would give an update here.
I have created the akmods build for the kvmfr module and verified it installs and creates the /dev/kvmfr0 device and lets me set the size of it in a fedora workstation VM.

A PR has been opened to get this included in our akmods repository so that i can do proper testing on my personal image and write down if there are any additional changes we need to do other than the cgroups changes and most likely selinux rules.

The next step once i am done with the personal testing is to add the changes to bazzite (and potentially bluefin if they are interested) and update the ujust recipe.

1 Like