Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build drm-kmod on 14.2 aarch64 #337

Open
csgordon opened this issue Jan 9, 2025 · 5 comments
Open

Cannot build drm-kmod on 14.2 aarch64 #337

csgordon opened this issue Jan 9, 2025 · 5 comments

Comments

@csgordon
Copy link

csgordon commented Jan 9, 2025

Describe the bug
No version of drm-kmod builds on 14.2 for aarch64

FreeBSD version
FreeBSD bsd 14.2-RELEASE FreeBSD 14.2-RELEASE releng/14.2-n269506-c8918d6c7412 GENERIC arm64 1402000 1402000

PCI Info

It's a lot to manually re-type, this is from a VM with no graphics. I've attached a screenshot below. ![Screenshot 2025-01-09 at 11 32 46 AM](https://github.com/user-attachments/assets/98b78ea1-13c5-41cc-8e0b-cd7bf646ca33)

DRM KMOD version
N/A because it doesn't build; using ports installed with 14.2 RELEASE installation

To Reproduce
Steps to reproduce the behavior:

  1. Install 14.2-RELEASE for arm64, including ports
  2. cd /usr/ports/graphics/drm-kmod
  3. make install

The build fails with a message that drm-510-kmod is not supported on FreeBSD 14.2 or later. drm-515-kmod and drm-61-kmod fail with messages that newer KPI is not supported on aarch64.

Screenshots
Screenshot 2025-01-09 at 12 23 43 PM

Additional context
This is being attempted in part to get graphics on a VM running in UTM (a QEMU wrapper) with the virtio GPU (intending to use https://reviews.freebsd.org/D40094, which was apparently tested on arm64).

@vukitoso
Copy link

did you try to assemble only 1 port: "drm-510-kmod" or "drm-61-kmod"?
Without the meta port "drm-kmod", because drm-kmod pulls along with it a bunch of other packages.

cd /usr/ports/graphics/drm-510-kmod
make clean
make install-missing-packages
make

@csgordon
Copy link
Author

Yes, I tried 510 by itself; the attached screenshot uses doas, but I did it yesterday as root
Screenshot 2025-01-10 at 2 11 45 PM

Here's what happens for 61:
Screenshot 2025-01-10 at 2 13 15 PM

and 515:
Screenshot 2025-01-10 at 2 14 13 PM

@vukitoso
Copy link

vukitoso commented Jan 11, 2025

You have QEMU virtualization.
Here is a list of files of the package drm-61-kmod-6.1.92

# pkg list drm-61-kmod
/boot/modules/amdgpu.ko
/boot/modules/dmabuf.ko
/boot/modules/drm.ko
/boot/modules/i915kms.ko
/boot/modules/linuxkpi_video.ko
/boot/modules/radeonkms.ko
/boot/modules/ttm.ko
/usr/local/share/licenses/drm-61-kmod-6.1.92/BSD2CLAUSE
/usr/local/share/licenses/drm-61-kmod-6.1.92/GPLv2
/usr/local/share/licenses/drm-61-kmod-6.1.92/LICENSE
/usr/local/share/licenses/drm-61-kmod-6.1.92/MIT
/usr/local/share/licenses/drm-61-kmod-6.1.92/catalog.mk

It apparently lacks a hardware acceleration driver.
You need to look for a solution specifically for QEMU.
https://wiki.archlinux.org/title/QEMU/Guest_graphics_acceleration#Virgil3d_virtio-gpu_paravirtualized_device_driver
https://wiki.archlinux.org/title/QEMU#virtio
https://docs.mesa3d.org/drivers/virgl/
https://www.qemu.org/docs/master/system/devices/virtio-gpu.html

https://www.phoronix.com/news/QEMU-9.2-Released

  • VirtIO GPU now supports Venus encapsulation for Vulkan when using recent Virglrenderer code on the host and newer Mesa code within the guest.
# pkg search virgl
virglrenderer-1.0.1 VirGL virtual OpenGL renderer

Under Freebsd I see there is a virglrenderer package.

@vukitoso
Copy link

https://www.qualcomm.com/developer/blog/2024/10/vcl-virtio-gpu-opencl-driver

VCLArchitecture

https://man.freebsd.org/cgi/man.cgi?query=virtio_gpu&apropos=0&sektion=4&manpath=FreeBSD+14.2-RELEASE+and+Ports&arch=default&format=html

 To  compile  this  driver into the kernel, place the following lines in your kernel configuration file:
	     device virtio_gpu

You may also need to rebuild the kernel in a guest with support for virtio_gpu.

I have not tried to run the QEMU guest with virtio_gpu support, so I am guided by information from the Internet.

@csgordon
Copy link
Author

The GENERIC kernel already includes all of the virtio drivers (it's in the config, and kldload confirms that it's already built-in to the kernel in question). (Though I hand't seen that article before, and it's useful to me in another context, so thanks!)

In any case, if the issue were a missing driver I'd expect to encounter a later build error or a complaint when loading a successfully-compiled kernel module, but the blocker here is that the port just doesn't appear to support the latest stable release on arm64.

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

No branches or pull requests

2 participants