Skip to content

feat: Looking glass shm OOB auto generation and support#424

Merged
KyleGospo merged 4 commits intoublue-os:mainfrom
HikariKnight:looking-glass-support
Oct 13, 2023
Merged

feat: Looking glass shm OOB auto generation and support#424
KyleGospo merged 4 commits intoublue-os:mainfrom
HikariKnight:looking-glass-support

Conversation

@HikariKnight
Copy link
Member

This adds the config for systemd to to generate the looking-glass shm file if libvirt requests it and also provide a just command to set the correct selinux file context for /dev/shm/looking-glass.

this will result in any libvirt VM started with

<shmem name="looking-glass">
      <model type="ivshmem-plain"/>
      <size unit="M">X</size>
</shmem>

inside the xml to auto create /dev/shm/looking-glass when needed.
the user will just have to run just selinux-looking-glass once on their system to permanently enable it.

If you do not know about looking-glass it is a kvm framebuffer relay for gpu passthrough.
Users will still have to download and compile the client with the same release as the host they installed in the VM from https://looking-glass.io/ for it to work, this will have to be compiled in a fedora docker distrobox (the fedora toolbox distrobox does not work for this) and then copy the binary to the host ~/.local/bin for now to avoid randomly breaking peoples looking-glass VMs whenever looking-glass updates (as the host application in the VM has no auto update function)

@HikariKnight HikariKnight changed the title Looking glass shm OOB auto generation and support feat: Looking glass shm OOB auto generation and support Oct 12, 2023
@KyleGospo
Copy link
Member

Regarding your last point, is the issue merely a lack of packages? I'm open to getting a copr of this going if that's the case to avoid the building step

@HikariKnight
Copy link
Member Author

HikariKnight commented Oct 12, 2023

Regarding your last point, is the issue merely a lack of packages? I'm open to getting a copr of this going if that's the case to avoid the building step

a copr would be very nice, however if the client (which is on the host) ever updates and the host application (in the guest VM) ever gets out of sync with versioning, the user might be without any access to their VM without an any alternative way in (like vnc, not the built in spice vnc) to update the host application.

the best alternative i would think of is to somehow implement a warning to the user that looking-glass will be updated to the newest release whenever there is an update? so that they can get the VM ready first 🤔

Either way this will make looking-glass work without the user having to manually set up the shm file and selinux file context which already saves some work and make bazzite a very easy system to setup a gaming VM on supported hardware obviously

@KyleGospo KyleGospo enabled auto-merge October 13, 2023 04:52
@KyleGospo KyleGospo disabled auto-merge October 13, 2023 17:44
@KyleGospo KyleGospo merged commit 1682676 into ublue-os:main Oct 13, 2023
@HikariKnight HikariKnight deleted the looking-glass-support branch October 17, 2023 22:47
@gnif
Copy link

gnif commented Mar 31, 2024

This is a substandard configuration.
Please see: https://looking-glass.io/docs/B7-rc1/install_libvirt/#ivshmem

the user might be without any access to their VM without an any alternative way in (like vnc, not the built in spice vnc) to update the host application.

LG has supported the SPICE protocol for VGA fallback since the release of B6.

Please also note that the Looking Glass Team will not provide support for people using Bazzite with LG, LG is not considered ready for packaging or including into any third party distros or products at this time. Users coming to the LG support channels that are using Bazzite will be referred back to your support channels for help.

Btw, I do think it's cool that you have added LG support at all here :)

@HikariKnight
Copy link
Member Author

HikariKnight commented Mar 31, 2024

This is a substandard configuration. Please see: https://looking-glass.io/docs/B7-rc1/install_libvirt/#ivshmem

the user might be without any access to their VM without an any alternative way in (like vnc, not the built in spice vnc) to update the host application.

LG has supported the SPICE protocol for VGA fallback since the release of B6.

Please also note that the Looking Glass Team will not provide support for people using Bazzite with LG, LG is not considered ready for packaging or including into any third party distros or products at this time. Users coming to the LG support channels that are using Bazzite will be referred back to your support channels for help.

Btw, I do think it's cool that you have added LG support at all here :)

no problem @gnif i try my best already in the bazzite discord to help those with VM and passthrough issues, however we do not compile or ship Looking Glass, we try to follow the documentation for configuring Looking Glass to work on fedora based on the B6 "stable" documentation specifically to standardize so all we do is add the SELinux rules and the shm tmpfile so that the LG binary will work, the user still has to manually compile the binary themselves following upstream documentation so we do not actually ship LG.

Also based on the info you provided in the forum that the kernel module is not LG version specific, which means we can actually consider including the kernel module for those that want to use it (since kernel modules has to be included with the image with ostree, we did not want to make an image for every version of Looking Glass that was either B6 or B7-rc1,rc2, etc), that way all the user needs would be to compile the binary in order to use LG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants