2.2beta2, building drm and 3D acceleration on archlinux

Postings relating to old VirtualBox pre-releases
Post Reply
bling
Posts: 5
Joined: 28. Mar 2009, 19:56
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: Archlinux 64-bit

2.2beta2, building drm and 3D acceleration on archlinux

Post by bling »

vboxvideo_drm.c fails to compile because "drm/drmP.h" is missing. i never had this problem with 2.1.4
i'm using archlinux 64-bit.

EDIT:
getting this to work was a little complicated...for whatever reason the archlinux package maintainers decided to remove all drm headers in their package. i downloaded the kernel source, and even with "make headers_install_all" it wouldn't include drmP.h. sooo...i did everything the manual way.

1) use the --keep option for ./VBoxLinuxAdditions*, along with --target
2) after the installation fails, go to the target directory
3) go to module/vboxvideo_drm in the target directory
4) use ln -s /path/to/linux/source/include/drm
5) go back to the target's root
6) run install.sh
7) voila!

EDIT2:
renamed title to better reflect the change in thread content.
Last edited by bling on 4. Apr 2009, 20:56, edited 1 time in total.
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: 2.2beta2, additions cannot build drm module [manually fixed]

Post by frank »

Which version of Linux are you using?
UltraBreytenBreytenbach
Posts: 21
Joined: 17. Dec 2007, 17:52

Re: 2.2beta2, additions cannot build drm module [manually fixed]

Post by UltraBreytenBreytenbach »

I can confirm this problem with Archlinux 32Bit as well. My Archlinux had a full update with pacman -Syu before.
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: 2.2beta2, additions cannot build drm module [manually fixed]

Post by frank »

Please could you tell me the Linux version anyway? I don't have Archlinux right here now.
UltraBreytenBreytenbach
Posts: 21
Joined: 17. Dec 2007, 17:52

Re: 2.2beta2, additions cannot build drm module [manually fixed]

Post by UltraBreytenBreytenbach »

I have the latest 2009.02 32Bit, updated via pacman -Syu. I didn't tell the version because I thought it doesn't matter, since ArchLinux versions aren't versions as such, but development snapshots. Kernel is 2.6.28.8. Anyway, here it is....
bling
Posts: 5
Joined: 28. Mar 2009, 19:56
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: Archlinux 64-bit

Re: 2.2beta2, additions cannot build drm module [manually fixed]

Post by bling »

archlinux 64-bit.
i got the testing repository enabled so most of my stuff is bleeding edge.

testing repo's kernel is currently 2.6.29, but the kernel-headers package is still 2.6.27. i downloaded the source directly for the headers.
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: 2.2beta2, additions cannot build drm module [manually fixed]

Post by frank »

So the whole problem is because ArchLinux don't ship the drm headers, is that correct? Should we check if the headers are present and refuse to build the DRM module (which is required for 3D-support for Linux guests) in that case? A warning could tell the user to manually install the headers and to recompile the kernel module.

If you tell me how to quickly generate a chroot-Environment with ArchLinux on it (without installing the whole distribution) we could check the problem on ArchLinux ourself ...
UltraBreytenBreytenbach
Posts: 21
Joined: 17. Dec 2007, 17:52

Re: 2.2beta2, additions cannot build drm module [manually fixed]

Post by UltraBreytenBreytenbach »

> So the whole problem is because ArchLinux don't ship the drm headers, is that correct?

For me it seems so. Could it be done in a way that there is a message like "drm headers not present - Please install them if you wish to have 3d support. Do you want to continue anyway (y/n) ?" Because some people do not need 3d but want the rest of the guest additions features. I'd like to have 3d, too, but I can live without it, since OpenGL is a bit slow on my PC (it is several years old, I tried with Ubuntu as guest).
Maybe bling, the other user with that problem, can answer you about a chroot-Environment, ArchLinux is still not my main distro and I am not very acquainted with it.
bling
Posts: 5
Joined: 28. Mar 2009, 19:56
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: Archlinux 64-bit

Re: 2.2beta2, additions cannot build drm module [manually fixed]

Post by bling »

to answer some of the questions:

- the drm headers are *not* distributed in the arch's kernel26 package, *nor* the kernel-headers package. if you look at the PKGBUILD (scripts arch uses to build packages) they actually remove the drm headers.
- the drm headers are included in the libdrm package.

therein lies the problem. the libdrm package is from freedesktop.org, and not from kernel.org, and currently, the sources from freedesktop do not contain drmP.h

as for a chroot, you can refer to the following articles:
http://wiki.archlinux.org/index.php/Ins ... her_distro
http://wiki.archlinux.org/index.php/Arc ... bit_system
bling
Posts: 5
Joined: 28. Mar 2009, 19:56
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: Archlinux 64-bit

Re: 2.2beta2, additions cannot build drm module [manually fixed]

Post by bling »

also something i noticed which may or may not be related, i can't get 3D acceleration working because:

(EE) AIGLX error: dlopen of /usr/lib/xorg/modules/dri/vboxvideo_dri.so failed

that's in my X log file. i searched the entire directly in my guest additions and there's no files named *dri.so.
bling
Posts: 5
Joined: 28. Mar 2009, 19:56
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: Archlinux 64-bit

Re: 2.2beta2, additions cannot build drm module [manually fixed]

Post by bling »

anywho, i did the following to try and get it working (from searching the forums).

i did a:
$ cd /usr/lib/xorg/modules/dri
$ ln -s /usr/lib/VBoxOGL.so vboxvideo_dri.so

here's the output of LIBGL_DEBUG=verbose CR_DEBUG=1 glxinfo

Code: Select all

name of display: :0.0
libGL: XF86DRIGetClientDriverName: 1.0.0 vboxvideo (screen 0)
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/vboxvideo_dri.so
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/vboxvideo_dri.so
[0x7fda13243700] OpenGL Debug: In crNetConnectToServer( "vboxhgcm://host:0", port=7000, mtu=1024, broker=0 )
[0x7fda13243700] OpenGL Debug: Connecting to host on port 0, with protocol vboxhgcm
[0x7fda13243700] OpenGL Debug: HGCM connect was successful: client id =0x22

[0x7fda13243700] OpenGL Debug: Done connecting to vboxhgcm://host:0 (swapping=0)
[0x7fda13243700] OpenGL Debug: SPU 1/3: (0) "array"
[0x7fda13243700] OpenGL Debug: SPU 2/3: (1) "feedback"
[0x7fda13243700] OpenGL Debug: SPU 3/3: (2) "pack"
[0x7fda13243700] OpenGL Debug: Initializing error SPU
[0x7fda13243700] OpenGL Debug: Initializing pack SPU
[0x7fda13243700] OpenGL Debug: In crNetConnectToServer( "vboxhgcm://llp:7000", port=7000, mtu=5242880, broker=0 )
[0x7fda13243700] OpenGL Debug: Connecting to llp on port 7000, with protocol vboxhgcm
[0x7fda13243700] OpenGL Debug: HGCM connect was successful: client id =0x23

[0x7fda13243700] OpenGL Debug: Done connecting to vboxhgcm://llp:7000 (swapping=0)
[0x7fda13243700] OpenGL Debug: Buffer pool 0xc03b50 was empty; allocating new 5242896 byte buffer.
[0x7fda13243700] OpenGL Debug: Using system malloc

[0x7fda13243700] OpenGL Debug: Initializing error SPU
[0x7fda13243700] OpenGL Debug: Initializing passthrough SPU
[0x7fda13243700] OpenGL Debug: Initializing feedback SPU
[0x7fda13243700] OpenGL Debug: Initializing error SPU
[0x7fda13243700] OpenGL Debug: Initializing passthrough SPU
[0x7fda13243700] OpenGL Debug: Initializing array SPU
[0x7fda13243700] OpenGL Debug: trying /usr/lib/dri/swrast_dri.so
[0x7fda13243700] OpenGL Debug: /usr/lib/dri/swrast_dri.so doesn't export __driDriverExtensions
[0x7fda13243700] OpenGL Debug: vboxdriInitScreen: vbox_load_sw_dri failed...going to fail badly
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 5, (OK)
drmOpenByBusid: Searching for BusID pci:0000:00:02.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 5, (OK)
drmOpenByBusid: drmOpenMinor returns 5
drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
[0x7fda13243700] OpenGL Debug: swcore_call NULL for createNewScreen
libGL error: Calling driver entry point failedlibGL error: reverting to software direct rendering
T-u-N-i-X
Posts: 1
Joined: 1. Apr 2009, 18:17
Primary OS: Mac OS X Leopard
VBox Version: OSE other
Guest OSses: Arch Linux, Windows XP, Windows 7

Re: 2.2beta2, building drm and 3D acceleration on archlinux

Post by T-u-N-i-X »

i've the same problem... and despite i've done the things in this thread, the modules cannot be compiled. i use archlinux as my main distro so I hope this feature works well when the VBox 2.2 final is released..
Post Reply