FreeBSD Foundation's New Project: Implement GEM/KMS/DRI for Intel Graphics

Status
Not open for further replies.
I'm writing this from Firefox running on FreeBSD 9 with latest patch applied. My CPU is i3-2310M. It is running stable, no screen artifacts, glxgears runs smoothly etc. Console switching via Ctrl-Alt-Fx is not working (not implemented).
 
Konstantin's job is great, he is also very responsive and helpfull on the mailing list. The latest Intel driver works marvelously well even at this stage but of course there are still open issues.

His work will make many people that love FreeBSD happy.
 
I wonder if his great work will improve the performance of new ATI cards on FreeBSD, 'cause I have one. :)
 
YZMSQ said:
I wonder if his great work will improve the performance of new ATI cards on FreeBSD, 'cause I have one. :)

TTM needs to be added to the kernel to achieve that, which is not in the scope of that project.
 
Looks great! I hope it'll make the old ones too (e.g. 845G) run without problems. I'd be able to use the 3D acceleration again after all these years. :)
 
YZMSQ said:
So, is there someone handling the so-called TTM?:p

From the Intel_GPU FreeBSD's wiki page:

http://wiki.freebsd.org/Intel_GPU said:
1. Do you plan to port TTM ?
Not in the scope of this project. After the project is finished, I might look at TTM and execution managers for non-Intel cards, in particular, ATI/AMD. Apparently, KMS bits are not much interesting to me.
 
aZ said:
From the sixteenth July no update at http://people.freebsd.org/~kib/drm/ . all.5.8.patch still will not work (after kldload i915 just blank screen at x220t).

Maybe we could install a GPS unit on him, like prisoners, so we can see when he's coding. Or!... We could lock him in a cell with video surveillance and only let him out for a short time when certain milestones are met.
 
mingrone said:
Maybe we could install a GPS unit on him, like prisoners, so we can see when he's coding. Or!... We could lock him in a cell with video surveillance and only let him out for a short time when certain milestones are met.
The world is so constituted. There are prisoners who do not receive salaries. Also, there are slaves who work in office/shop/etc (as in prison, but with the "best conditions") and get paid. If uncontrolled slave gets paid for the work - the result of work will not be what we expect.

Kind regards,
Captain Obvious.
 
aZ said:
From the sixteenth July no update at http://people.freebsd.org/~kib/drm/ . all.5.8.patch still will not work (after kldload i915 just blank screen at x220t).

That's normal situation for this patch as it doesn't support text console! If you want to test it run 'startx' without loading module first (but better login through ssh into your machine or use serial/firewire console).
 
chmiels said:
That's normal situation for this patch as it doesn't support text console! If you want to test it run 'startx' without loading module first (but better login through ssh into your machine or use serial/firewire console).

One of the mostly useful message here. :) x220t now works fine! Thank you man!

P.S. thanks for Kostik too. Nice work. :)
 
That work on i3 370M. Thanks to developers.

At first i tryed load as module, but get black screen. After get it work with ".xinitrc" and "startx". But when logout again black screen :). Not tried unload module after logout, but maybe help.
Sorry for my great english :)
 
Is GEM/KMS scheduled to be part of 9-STABLE? Or is it recommended that those who wish to purchase a sandy-bridge system stay on CURRENT?

thanks
brad
 
b7j0c said:
Is GEM/KMS scheduled to be part of 9-STABLE? Or is it recommended that those who wish to purchase a sandy-bridge system stay on CURRENT?

thanks
brad
It should appear in 9.1-RELEASE.

What should I do to install the new Intel driver? I've patched kernel and rebuilt world (using 10.0-CURRENT) and copied all of files fetched from xorg-dev repository to /usr/ports, but when I do portmaster -ad, it always throws error when patching graphics/dri.
 
It's working fine on my EeePC 1008P (Pineview), just a few glitches with firefox from time to time when loading/unloading web pages.

@pkubaj: did you copied the files from xorg-dev or did you used the xorgmerge script?
also, you must rebuild the kernel after applying the patches, not the world.
 
I didn't see any script so I just deleted all of old directories from /usr/ports for ports from xorg-dev repository and copied the new ones.
 
I installed 9.0-RC2 and tried to upgrade to 10.0 (having patched the kernel, of course), but it always throws a few hundreds errors (and I'm not exaggerating here) when compiling sys/dev/drm/drm_crtc.c. All of them are "previous definition of '...' was here" and "redefinition of '...'". I compile using the bundled GCC, my /etc/make.conf is the one from /usr/share/examples/etc/, with CPUTYPE set to native (GCC supports it since 4.2 and it works on my two desktops). I didn't make any modifications to the kernel config, it's GENERIC. Is there anything I can do?
 
Well, I don't have any good memories from setting CPUTYPE to native, and im almost sure there are posts on this forum pointing that you shouldn't use it. But thats probably not main problem of your errors. Try searching for some lines with "error" and if you use % make -jn buildkernel to compile kernel, don't use -j switch because it eat error lines.
 
I got my X220i to work with new intel graphics drivers on FreeBSD 10.0-CURRENT (csup-d @ 2011-11-21) using all.12.1.patch

Initally I installed FreeBSD 8.2-RELEASE because it was the only FreeBSD version I was able to boot using USB memory stick. I upgraded it to 9.0-PRERELEASE and then to 10.0-CURRENT and only then I moved forward to patching.

Patching was bit of a mess (mostly due to my own faults), but nothing complicated. After fixing my patching errors, buildworld and buildkernel KERNCONF=GENERIC were successful.
Clarification: The patch assumed that several files did not exist and appended the content to already existing file thus duplicating the content (or more, since I applied patch serveral times). I just manually removed exessive content from those files. Somewhat tedious but not difficult. There was also a minor failure patching sys/dev/drm/i915_suspend.c file - patch expected the line 31 to look like this:
Code:
__FBSDID("$FreeBSD$");
But it had longer RCS ID, but I modified to to look like that before applying patch next time.

Next downloading ports tree and installing subversion to check out and merge xorg-dev ports branch into /usr/ports.
I went on to install x11/xorg port, which failed to compile x11-drivers/xf86-driver-intel port. I noticed that there was x11-drivers/xf86-video-intel-kms which I assumed to be the correct one and installed that one instead. Install was successful and I resumed building and installing x11/xorg port. After successful install I also installed x11-wm/openbox for testing.

Before trying to start X, I created /usr/local/etc/X11/xorg.conf with
Code:
X -configure
. I had to edit it because for some reason it added two Screen sections. I removed everything related to "Screen1" and also added following line to "ServerLayout" section:
Code:
Option "AutoAddDevices" "Off"
(why?)

To my (regular user) ~/.xinitrc I added just two lines:
Code:
xterm &
exec openbox

I then I started X with
Code:
startx
command and everything seemed to be normal.

So far I have installed and tested multimedia/mplayer, www/firefox, x11-wm/xcompmgr and www/linux-flashplugin-f11 - they all work as expected and no crashes.

Long story short:

On my Lenovo X220i I got following working while running FreeBSD 10.0-CURRENT:
* MPlayer with xvideo and gl/gl2 video outputs
* xcompmgr drawing shadows around window borders
* Firefox 8 playing videos on youtube
* Intel wireless
* Suspend/resume (I heard that there may be problem with USB devices though)
* Audio (w/ headphones works after hacking /boot/device.hints a bit, see below)
* games/nexuiz is perfectly playable with default settings @ resolution 1366x768
* astronomy/stellarium - no issues either

And no performance issues so far.

To get headphone jack working properly, I added following lines to /boot/device.hints:
Code:
hint.hdac.0.cad0.nid25.config="as=1 seq=15"
hint.hdac.0.cad0.nid31.config="as=1 seq=0"

I'm happy.
 
tyson said:
Well, I don't have any good memories from setting CPUTYPE to native, and im almost sure there are posts on this forum pointing that you shouldn't use it. But thats probably not main problem of your errors. Try searching for some lines with "error" and if you use % make -jn buildkernel to compile kernel, don't use -j switch because it eat error lines.

I don't use -j flag. I tried to compile world and kernel once again. World (as would have been expected) was compiled successfully, kernel, however wasn't. This time errors happened in sys/dev/drm/i915_suspend.c, but there weren't as many of them as before (2,5 pages). They appear in functions i915_pipe_enabled, i915_save_palette and i915_restore_palette. The errors itself are about undeclared variables and nested extern declarations.
I'm not really sure what to do about it. Before this compilation, I deleted /usr/src, downloaded the whole HEAD again and applied the patch with
Code:
patch -p1 -d /usr/src < ~/all.12.1.patch
. After that, the usual
Code:
make buildworld && make buildkernel
. Is there something wrong about the procedure?
 
Status
Not open for further replies.
Back
Top