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



## vermaden (Feb 17, 2011)

SOURCE: http://lists.freebsd.org/pipermail/freebsd-announce/2011-February/001361.html


> The FreeBSD Foundation is pleased to announce that Konstantin Belousov has been awarded a grant to implement support of GEM, KMS, and DRI for Intel Drivers. This project is being co-sponsored by iXsystems.
> 
> The project is to implement GEM, port KMS, and write new DRI drivers for Intel Graphics, including the latest Sandy Bridge generation of integrated graphic units. The work should allow the latest Intel open-source driver to run on FreeBSD, expanding the range of hardware where FreeBSD is suitable for the  desktop.
> 
> ...


----------



## aragon (Feb 17, 2011)

Awesome!


----------



## xibo (Feb 17, 2011)

Nice. Are there any plans to get it into FreeBSD-8, or will it be a >= 9 feature?


----------



## bschmidt (Feb 17, 2011)

xibo said:
			
		

> Nice. Are there any plans to get it into FreeBSD-8, or will it be a >= 9 feature?



I guess by the time this feature is in a usable state, 9.0 will be already (or soon to be) released. I might be wrong though.. go for it kib :beer


----------



## YZMSQ (Feb 17, 2011)

Good news!P


----------



## dandelion (Feb 17, 2011)

Will the KMS work be a continuation of newcons (and vtc) or it's gonna be tightly coupled to old non-mpsafe, non-utf8[1] syscons()?

[1] TEKEN_UTF8 is crippled to say the least, keyboard layer ignores it anyway


----------



## DutchDaemon (Feb 17, 2011)

Thread 21840


----------



## adamk (Feb 27, 2011)

Anyone know if this really will be limited to supporting just Intel GPUs?  That seems to be implied, but I'm really hoping is not the case.

Adam


----------



## pkubaj (Feb 27, 2011)

I think it's to big a change to be included in 8-STABLE. What I'm afraid of is whether he will manage to finish it till 9.0-RELEASE is released, otherwise it may be added to 10.0-RELEASE.


----------



## xibo (Feb 27, 2011)

adamk said:
			
		

> Anyone know if this really will be limited to supporting just Intel GPUs?  That seems to be implied, but I'm really hoping is not the case.
> 
> Adam


Even if this was done only for intel, once KMS, GEM and DRI are implemented, porting other drivers will become alot easier.


----------



## nakal (Feb 27, 2011)

No. Newer RadeonHD cards depend on KMS, too.


----------



## adamk (Feb 27, 2011)

Not only do they depend on KMS, they depend on the TTM memory manager, which is not even mentioned in the announcement.


----------



## grigorovl (Mar 5, 2011)

Seems that the focus will be on the newer Intel chips. Will the old ones get love? If not, I might just go back to GNU/Linux since my Thinkpad X60 has Intel video and it's not that great on FreeBSD.


----------



## adamk (Mar 5, 2011)

So I heard on IRC today that the initial work will be for Intel.  And, yes, it will likely focus on newer chipsets, but I imagine that any work on intel DRM will bring along improvements for intel GPUs in general, not just newer ones.  

It's sad for me, though, that there doesn't appear to be any direct interest in getting the Radeon DRM updated with KMS.

Adam


----------



## oliverh (Mar 5, 2011)

>It's sad for me, though, that there doesn't appear to be any direct interest in getting the Radeon DRM updated with KMS.

Sure, it's sad. But then, it's just one guy only, who is working on this. There is just one server left in my possession running FreeBSD, the other machines are either to some degree incompatible (bios ...) or beyond the capabilities of FreeBSD (drivers). It's a pity, but there is a massive lack of manpower, too much new hardware, lots of Linux-centric applications, hardly enough time and money.


----------



## adamk (Mar 5, 2011)

I understand the reason.  I still find it just sad.  Frankly, the r600 gallium driver is so much better than the stock mesa driver,  and DRI2 brings along so many improvements, it's hard to justify sticking with FreeBSD on these workstations.

Adam


----------



## grigorovl (Mar 5, 2011)

Well at least NVIDIA is doing something for the FreeBSD users. Unless the vendor invests in helping, a few individuals (in this case 1) will have a hard time keeping up.

I will wait out and see where this goes, though - hope dies last.:stud


----------



## kpedersen (Mar 6, 2011)

Looking forward to this.
Currently I need:-


```
LIBGL_ALWAYS_INDIRECT=1
```

to be set or any OpenGL software is very slow and whines about "Failed to initialize GEM so switching back to classic"..

(I assume this is related)


----------



## dareni (Mar 6, 2011)

I just donated to the FreeBSD project, and asked to start a similar project for radeon hd. Fingers crossed!


----------



## zspider (Apr 16, 2011)

Awesome! I was just lamenting the fact that I might have to go back to Linux. (new laptop will have Nvidia Optimus) Thank you so much.


----------



## mdg583 (Apr 17, 2011)

kpedersen said:
			
		

> Looking forward to this.
> to be set or any OpenGL software is very slow and whines about "Failed to initialize GEM so switching back to classic"..
> 
> (I assume this is related)



I don't think it likely is, actually. I get that message, but my opengl runs about as fast as I could expect on this machine.


----------



## grocha (Jun 8, 2011)

Is there any news on this? Maybe some wiki, mailing list or repo to see how work is going?


----------



## elvis4526 (Jun 9, 2011)

I would REALLY like to have more information about that too.


----------



## zspider (Jun 10, 2011)

I have been looking occasionally for info as well, I have found none, right now I'm running FreeBSD x86-64 out of VirtualBox on Windows 7 Pro x64, works reasonably well once you get Vbox Guest Additions and the video driver set up. I was surprised to find the 3D even gets 30 fps which is pretty good for what it is.


----------



## aZ (Jun 13, 2011)

After four months not any news. Konstantine received the money, but does nothing?


----------



## Gusi (Jun 13, 2011)

Well, I have no doubt Konstantine is working on it. But it would be nice to have some news about how it progresses. 

Some time ago I read in the PC-BSD forums that it was expected in the Summer (which is around the corner). If it is to be released this Summer, I think it would be necessary to have the code somewhere, in a svn or p4 server, because I think it will need some testing. 

Moreover there are a lot of people who have to run in VESA mode because the Intel boards are all around. A lot of laptops have it. And with laptops VESA is a PITA because of the non-standard VESA modes like the 16:9 and 16:10 widescreens. That makes a lot of systems unusable. For all of these people having some news would be nice.


----------



## Eponasoft (Jun 23, 2011)

I'm using an Intel chipset on my laptop so this is good news. The existing Intel driver is good for most things here, but I'm really looking forward to proper 3D acceleration.  KDE 3.5 sets my desktop resolution to 1680x1050 just fine, but games like quakeforge run slowly, and some others don't run at all. I'd gladly donate to the development if I had money to offer...


----------



## lockdoc (Jun 24, 2011)

Do they have a mailing list for the project?


----------



## aZ (Jun 24, 2011)

They have nothing at all! Suggestive of deception.


----------



## richardpl (Jun 24, 2011)

There is no free lunch.


----------



## YZMSQ (Jun 25, 2011)

aZ said:
			
		

> They have nothing at all! Suggestive of deception.


Please be patient to the developers. They've a lot of slave work to do 'cause KMS is kernel-related. In my opinion, any kernel-related stuffs are difficult to deal with. Feel free if you want to help them. :stud


----------



## aZ (Jun 25, 2011)

YZMSQ said:
			
		

> Feel free if you want to help them. :stud



I wrote him a letter two weeks ago and received no response. No news, and the game of hide and seek .. How can you be patient?

I think that FreeBSD Foundation is obliged to check the status of his work. Otherwise, just patiently wait for what may not happen - is absurd.


----------



## adamk (Jun 25, 2011)

In his defense, the developer is under no obligation to respond to you, just the folks paying his salary.


----------



## aZ (Jun 25, 2011)

Right! *Salary from FreeBSD Foundation!*. I'm worried about what this Ukrainian "developer" is not ate pork fat and vodka on the FreeBSD Foundation money instead of implementing the GEM/KMS/DRI.


----------



## adamk (Jun 25, 2011)

Right, so direct your questions at the FreeBSD Foundation.  Whining here isn't going to do any good...

Adam


----------



## Eponasoft (Jun 25, 2011)

aZ, attitude like that is exactly the reason why a lot of independent developers quit. Please be decent.


----------



## jrm@ (Jun 25, 2011)

aZ said:
			
		

> Right! *Salary from FreeBSD Foundation!*. I'm worried about what this Ukrainian "developer" is not ate pork fat and vodka on the FreeBSD Foundation money instead of implementing the GEM/KMS/DRI.



Konstantin has demonstrated his commitment to FreeBSD with years of "free" work and was elected by his peers to the core team.  Based on his record why do you doubt he will get the project done?  Why the quotes around developer?  What difference does it make that he's from Ukraine?


----------



## vermaden (Jun 25, 2011)

I would say shut up and wait, it's not Linux world where all the development work is tweeted all the way all araound while almost nothing was done, in BSD world it's about taking your head down, writing the code, testing, debugging and when it's finally ready, simple mail message takes place that informs people that that, that and that has been done, and its ready to use, commited, merged and done, nothing more, nothing less.

Give him a little time and patience, mates ...


----------



## aZ (Jun 26, 2011)

Shut up and wait? Haha. Way of slaves. Wait more for manna from heaven. Hope dies last.

I do not want to troll. I just wanted to see the status and development plan. Such information from anyone I had not made. All clear. No more questions I have.

P.S. About Ukranian's. I had business with them many times. They always lie and cheat. Also, I was in Kiev and *police tried to rob me*. Maybe bad luck, but it is my experience.


----------



## DutchDaemon (Jun 26, 2011)

Can we stop throwing around massively overstated national stereotypes from personal anecdotal experience here? Thanks.


----------



## pkubaj (Jun 28, 2011)

You can find out that Konstantin works here http://lists.freebsd.org/pipermail/svn-src-head/2011-June/author.html#start
His work doesn't seem to be related with KMS, but it's not in HEAD yet.


----------



## phoenix (Jun 30, 2011)

For all those who doubted; Kostik posted the following to the current@ mailing list this morning:



> Subject: Intel GPU kernel driver
> 
> [Please remove current@ when replying.]
> 
> ...



*Any of you detractors willing to offer up a public apology?*


----------



## aZ (Jun 30, 2011)

phoenix said:
			
		

> *Any of you detractors willing to offer up a public apology?*



Of course not. Now it's just part of useless code made at fast hand after well-founded public charges. Without it we would have waited another couple of months (years). Where is public apology from "Kostik"?


----------



## drhowarddrfine (Jun 30, 2011)

@aZ - from one with only 6 posts, I question why you popped up all of a sudden just to challenge this. Your motive is questionable.


----------



## DutchDaemon (Jun 30, 2011)

Enough of this smear campaign, @aZ. Help the guy test his patches and code, or just wait. I'm sure the FreeBSD Foundation doesn't need this kind of unfounded accusations to manage their own projects. Neither the Foundation nor the developer owe you a personal explanation. Moreover, these forums, since they're almost entirely end-user-oriented, play no role in this at all, so it is a poor (and highly annoying) location for your soapbox.


----------



## kpedersen (Jun 30, 2011)

From that post above it seems that the guy had written "~50KLOC"

That is probably more than I have written in my lifetime lol.

Not surprising that the developer was quiet for some time.

And I am sure that most of us are very thankful for it!


----------



## zspider (Jun 30, 2011)

This is good, eagerly awaiting the day it is finished. *flips hair back like Triple H :e*


----------



## dh (Jul 1, 2011)

Those attacks were indeed uncalled for, but it sure is nice to see some updates on progress!
I recently aquired Lenovo x220 with the hope that I will be able to run FreeBSD on it soon (currently running Ubuntu) and it seems to me that a lot of progress has been made regarding that!
I wish many sleepless nights and lots of coffee for Konstantine!


----------



## rdeiriar (Jul 3, 2011)

kpedersen said:
			
		

> From that post above it seems that the guy had written "~50KLOC"



Yes, and most of it touches the memory management structures in the kernel. This is difficult stuff!

Good luck Konstantine!


----------



## jrm@ (Jul 5, 2011)

*Links related to the project*

http://wiki.freebsd.org/Intel_GPU
http://www.phoronix.com/scan.php?page=news_item&px=OTYzMA
http://www.freebsdnews.net/2011/07/...TheUnknownGiant+(FreeBSD+-+the+unknown+Giant)


----------



## lockdoc (Jul 6, 2011)

Check the project page again, open for testing :-D


----------



## chmiels (Jul 14, 2011)

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).


----------



## thuglife (Jul 14, 2011)

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.


----------



## YZMSQ (Jul 15, 2011)

I wonder if his great work will improve the performance of new ATI cards on FreeBSD, 'cause I have one.


----------



## vermaden (Jul 15, 2011)

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.


----------



## UNIXgod (Jul 15, 2011)

Stoked!!!! I also have a x220 and can't wait to get back to running FreeBSD on a laptop!!!


----------



## YZMSQ (Jul 15, 2011)

vermaden said:
			
		

> TTM needs to be added to the kernel to achieve that, which is not in the scope of that project.


So, is there someone handling the so-called TTM?


----------



## Beastie (Jul 15, 2011)

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.


----------



## vermaden (Jul 15, 2011)

YZMSQ said:
			
		

> So, is there someone handling the so-called TTM?



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 (Jul 21, 2011)

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).


----------



## jrm@ (Jul 21, 2011)

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.


----------



## aZ (Jul 21, 2011)

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.


----------



## chmiels (Jul 21, 2011)

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).


----------



## aZ (Jul 21, 2011)

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.


----------



## chuvy (Aug 5, 2011)

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


----------



## b7j0c (Oct 24, 2011)

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


----------



## pkubaj (Oct 25, 2011)

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.


----------



## tobe (Nov 18, 2011)

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.


----------



## pkubaj (Nov 19, 2011)

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.


----------



## tyson (Nov 19, 2011)

Just use http://people.freebsd.org/~miwi/xorg/xorgmerge to merge your xorg-dev repo into /usr/ports. And remember to modify it to suit your local repo location.


----------



## pkubaj (Nov 21, 2011)

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?


----------



## tyson (Nov 22, 2011)

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.


----------



## dh (Nov 22, 2011)

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:

```
__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 
	
	



```
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:

```
Option "AutoAddDevices" "Off"
```
 (why?)

To my (regular user) ~/.xinitrc I added just two lines:

```
xterm &
exec openbox
```

I then I started X with 
	
	



```
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:

```
hint.hdac.0.cad0.nid25.config="as=1 seq=15"
hint.hdac.0.cad0.nid31.config="as=1 seq=0"
```

I'm happy.


----------



## pkubaj (Nov 22, 2011)

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 
	
	



```
patch -p1 -d /usr/src < ~/all.12.1.patch
```
. After that, the usual 
	
	



```
make buildworld && make buildkernel
```
. Is there something wrong about the procedure?


----------



## dh (Nov 22, 2011)

pkubaj said:
			
		

> Is there something wrong about the procedure?



No, you're doing it correctly, I think you have the same problem I had with patching. Read my previous post.


----------



## chmiels (Nov 22, 2011)

pkubaj said:
			
		

> Is there something wrong about the procedure?


Check your workspace for .rej files. I've found that patch doesn't apply cleanly to stable/9.


----------



## pkubaj (Nov 22, 2011)

chmiels said:
			
		

> Check your workspace for .rej files. I've found that patch doesn't apply cleanly to stable/9.



I'm using CURRENT, so it doesn't matter.
Anyway, I've successfully compiled the kernel. There was a problem while doing *make installworld* (http://www.mail-archive.com/freebsd-current@freebsd.org/msg123380.html), but it's OK now, thanks.


----------



## mrstolpe (Dec 4, 2011)

I just got an X121e and was so used to Intel graphics card working out of the box that I didn't check any further than that but was a little more worries about Wifi and 3G etc. Of course it was completely the other way around. All network stuff worked immediately but graphics was only distorted Vesa.

Now I found this thread and upgraded to 10.0-current, patched, rebuilt etc. Now I can start X which looks a lot better but everything freezes. Neither keyboard or mouse works and I cannot even switch back to console. SSH works as long as I don't kill X. I tried the 


```
Option "AutoAddDevices" "Off"
```

but it does not seem to help. Any suggestions? Should we disable HAL altogether now? Was KMS support fro DRI a good idea?


----------



## mrstolpe (Dec 5, 2011)

mrstolpe said:
			
		

> I just got an X121e and was so used to Intel graphics card working out of the box that I didn't check any further than that but was a little more worries about Wifi and 3G etc. Of course it was completely the other way around. All network stuff worked immediately but graphics was only distorted Vesa.
> 
> Now I found this thread and upgraded to 10.0-current, patched, rebuilt etc. Now I can start X which looks a lot better but everything freezes. Neither keyboard or mouse works and I cannot even switch back to console. SSH works as long as I don't kill X. I tried the
> 
> ...



I checked that I had some remains from my previous Xorg build. After rebuild of xf86-input-ports at least mouse and keyboard works under X.

I still lose console as X starts and KDE keeps screaming about dbus though.


----------



## mrstolpe (Dec 5, 2011)

mrstolpe said:
			
		

> I checked that I had some remains from my previous Xorg build. After rebuild of xf86-input-ports at least mouse and keyboard work under X.
> 
> I still lose console as X starts and KDE keeps screaming about dbus though.



Sorry to disturb you guys. The dbus problem was certainly a permission problem (I tend to do *su -m* and get a lot of root stuff in my home dir).

I really would like to have console and X working at the same time though.


----------



## tzak12 (Dec 17, 2011)

*Core i3-370M Ironlake Laptop*

Installed 9-current from USB.


```
portsnap fetch extract

cd /usr/ports/ports-mgmt/portmaster

make install clean

portmaster -a

portmaster net/cvsup

cvsup 10-current source

cp -R /usr/src /src.bkup

fetch all.12.3.patch

build and install source (google "freebsd buildworld")

cd /usr/ports/ports-mgmt/portmaster; make install clean

portmaster -a

portmaster ncurses

portmaster patch

edit /usr/src/sys/dev/drm/i915_suspend.c (as mentioned) and i915_drv.h (similarly but towards the middle of the file)

patch -p1 -d /usr/src <all.12.3.patch (run find /usr/src "*.rej" -print)

restore source from backup after examining .rej files; look at man files for "patch" and "diff"

edit /usr/src/sys/sys/types.h

build and install patched source

portmaster devel/subversion

svn co [xorg-dev]

fetch xorgmerge

portmaster x11/xorg
```


----------



## akregator (Jan 13, 2012)

Intel i915 (sandybridge with an nVidia GT 425m) works with 12.5 and 12.6 patch on FreeBSD 10.0-CURRENT. 12.4 not tested and 12.3 does'nt work because of build fail.

THe only thing it's impossible to return to a TTY and keyboard is frozen. So it's better to startx && sudo reboot (with a proper /usr/local/etc/sudoers file to avoid password ask) if you don't want your system to be frozen.

kldunload i915 after exiting Xorg just make the system rebooting immediately, causing filesystems being not unmounted the right way.


----------



## vermaden (Jan 14, 2012)

akregator said:
			
		

> startx && sudo reboot (with a proper /usr/local/etc/sudoers file to avoid password ask)



Make that startx && shutdown -r now and add yourself to the operator group, that way You do not need sudo.


----------



## ayja (Jan 15, 2012)

Hi here! The xf86-video-intel-kms driver was removed in https://trillian.chruetertee.ch/svn/ports/branches/xorg-dev. In svn log it was written, that it is dead. Before removal everything is worked great for me, until now. Do you know what problem is?


----------



## pkubaj (Jan 15, 2012)

ayja said:
			
		

> Hi here! The xf86-video-intel-kms driver was removed in https://trillian.chruetertee.ch/svn/ports/branches/xorg-dev. In svn log it was written, that it is dead. Before removal everything is worked great for me, until now. Do you know what problem is?



xf86-video-intel is the old xf86-video-intel-kms.


----------



## ayja (Jan 15, 2012)

yeah, but somehow now its not working, but thanks for answer, maybe problem not with the new port


----------



## alie (Jan 18, 2012)

I am getting this issue even though i already changed the line 31 on i915_suspend.c after patching with all.13.0.patch


```
.
.
.
./../dev/drm/i915_suspend.c
/usr/home/alie/fbsd/src/sys/modules/drm/i915/../../../dev/drm/i915_suspend.c:41:21: error: use of undeclared identifier 'DPLL_A'
                return (I915_READ(DPLL_A) & DPLL_VCO_ENABLE);
                                  ^
@/dev/drm/i915_drv.h:1250:48: note: expanded from:                                                                                                               
#define I915_READ(reg)          i915_read32(dev_priv, (reg))
                                                       ^
/usr/home/alie/fbsd/src/sys/modules/drm/i915/../../../dev/drm/i915_suspend.c:43:21: error: use of undeclared identifier 'DPLL_B'                                 
                return (I915_READ(DPLL_B) & DPLL_VCO_ENABLE);
                                  ^
@/dev/drm/i915_drv.h:1250:48: note: expanded from:                                                                                                               
#define I915_READ(reg)          i915_read32(dev_priv, (reg))
                                                       ^
/usr/home/alie/fbsd/src/sys/modules/drm/i915/../../../dev/drm/i915_suspend.c:49:40: error: use of undeclared identifier 'PALETTE_A'                              
        unsigned long reg = (pipe == PIPE_A ? PALETTE_A : PALETTE_B);
                                              ^
/usr/home/alie/fbsd/src/sys/modules/drm/i915/../../../dev/drm/i915_suspend.c:49:52: error: use of undeclared identifier 'PALETTE_B'                              
        unsigned long reg = (pipe == PIPE_A ? PALETTE_A : PALETTE_B);
                                                          ^
/usr/home/alie/fbsd/src/sys/modules/drm/i915/../../../dev/drm/i915_suspend.c:68:40: error: use of undeclared identifier 'PALETTE_A'                              
        unsigned long reg = (pipe == PIPE_A ? PALETTE_A : PALETTE_B);
                                              ^
/usr/home/alie/fbsd/src/sys/modules/drm/i915/../../../dev/drm/i915_suspend.c:68:52: error: use of undeclared identifier 'PALETTE_B'                              
        unsigned long reg = (pipe == PIPE_A ? PALETTE_A : PALETTE_B);
                                                          ^
/usr/home/alie/fbsd/src/sys/modules/drm/i915/../../../dev/drm/i915_suspend.c:817:3: warning: implicit declaration of function 'ironlake_disable_drps' is invalid 
      in C99 [-Wimplicit-function-declaration]
                ironlake_disable_drps(dev);
.
.
.
```


----------



## Syhlx (Jan 18, 2012)

There are other files where this line defers from the patch.
To avoid this problem, do this before patching:

```
for file in `grep 'a/' /path/to/the/patch/all.13.0.patch | grep -v diff | sed -e's/--- a/\/usr\/src/g'`
do
  sed -i ".old" -e's/\$FreeBSD\:.*\$/\$FreeBSD\$/g' "$file"
done
```


----------



## alie (Jan 19, 2012)

I got different issues now


```
/usr/home/alie/fbsd/src/sys/modules/drm/drm/../../../dev/drm/drm_crtc.c:3343:8: error: redefinition of 'drm_prop_enum_list'
struct drm_prop_enum_list {
       ^
/usr/home/alie/fbsd/src/sys/modules/drm/drm/../../../dev/drm/drm_crtc.c:39:8: note: previous definition is here                                                                                            
struct drm_prop_enum_list {
       ^
/usr/home/alie/fbsd/src/sys/modules/drm/drm/../../../dev/drm/drm_crtc.c:3363:34: error: redefinition of 'drm_dpms_enum_list'                                                                               
static struct drm_prop_enum_list drm_dpms_enum_list[] =
                                 ^
/usr/home/alie/fbsd/src/sys/modules/drm/drm/../../../dev/drm/drm_crtc.c:59:34: note: previous definition is here                                                                                           
static struct drm_prop_enum_list drm_dpms_enum_list[] =
.
.
.                                      
20 errors generated.
*** Error code 1
```


----------



## Syhlx (Jan 19, 2012)

Did you patch a source which was already patched? Cause it might be your problem: you can't apply the patch a second time. You need to re-sync the source (using SVN) before applying the patch.

So,

First: Sync the source again using SVN. You can backup it after download to keep clean version of the source locally.

Second:

```
for file in `grep 'a/' /path/to/the/patch/all.13.0.patch | grep -v diff | sed -e's/--- a/\/path\/to\/src/g'`
do
  sed -i ".old" -e's/\$FreeBSD\:.*\$/\$FreeBSD\$/g' "$file"
done
```

And finally apply the patch.


----------



## ashleyd (Jan 25, 2012)

I'm getting a blank/black screen with *startx*.

I managed to patch 9 Release with the standard /usr/src that came from the install CD and the patch applied cleanly. I used a special patch for 9 release source.

xf86-video-intel-kms doesnt seem to exist anymore, so I put 
	
	



```
WITH_NEW_XORG="YES"
```
 into my make.conf and it seemed to build the newer versions of xorg and xf86-video-intel correctly.

When I use the -retro option with Xorg it works. However, when I use *startx* I get a blank screen. My .xinitrc has "exec wmaker", i have also tried "exec startxfce4".

I have tried with and without a custom xorg.conf.

Does anyone have any suggestions? Thanks


----------



## chmiels (Jan 25, 2012)

ashleyd said:
			
		

> Im getting a blank/black screen with startx.
> 
> Does anyone have any suggestions? Thanks



Have you upgraded your ports? Use portdowngrade to downgrade libxcb-1.7 from libxcb-1.8, it helped me.


----------



## ashleyd (Jan 28, 2012)

chmiels said:
			
		

> Have you upgraded your ports? Use portdowngrade to downgrade libxcb-1.7 from libxcb-1.8, it helped me.



That fixed it! Thanks!

Also thanks to the person (I believe mico) who made the RELENG-9 patches available at http://tsatsenko.ru/files/


----------



## tmow (Feb 8, 2012)

Thanks to all of you and Martin Wilke (his blog post at http://miwi.bsdcrew.de/2012/02/cft-xorg-upgrade-7-5-2/) I've finally succeeded applying the patch.

Just a question, what should I do to keep it updated? Should I reapply the patches each time?

Thanks a lot!


----------



## Toto (Feb 11, 2012)

Gentleman, 

It is great pleasure for me to join this community. I really enjoy freebsd FreeBSD, I spend 2 to 3 hours per day on it. Ok, let's get to the serious point. Just like many I do have expectation to get my Intel Ironlake work at my best on freebsd FreeBSD laptop. I've tried to follow the procedure given by Martin to the best of my knowledge. unforturnately, I'm not as successful as tmow or others in getting this to work properly. Any help in getting this issue resolved would be much appreciated.

*M*y /var/log/Xorg.0.log

```
X.Org X Server 1.10.4
Release Date: 2011-08-19
[   417.745] X Protocol Version 11, Revision 0
[   417.745] Build Operating System: FreeBSD 9.0-RELEASE i386 
[   417.745] Current Operating System: FreeBSD zoohoo.mydomain.com 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Sat Feb 11 12:35:54 CET 2012
     root@zoohoo.mydomain.com:/usr/obj/usr/src/sys/CUSTOM i386
[   417.747] Build Date: 11 February 2012  03:50:19PM
[   417.747] Current version of pixman: 0.24.2
[   417.747] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[   417.748] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   417.749] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Feb 11 16:32:47 2012
[   417.751] (++) Using config file: "xorg.conf.new"
[   417.754] (==) ServerLayout "X.org Configured"
[   417.754] (**) |-->Screen "Screen0" (0)
[   417.754] (**) |   |-->Monitor "Monitor0"
[   417.756] (**) |   |-->Device "Card0"
[   417.756] (**) |-->Screen "Screen1" (1)
[   417.756] (**) |   |-->Monitor "Monitor1"
[   417.758] (**) |   |-->Device "Card1"
[   417.759] (**) |-->Input Device "Mouse0"
[   417.759] (**) |-->Input Device "Keyboard0"
[   417.759] (==) Automatically adding devices
[   417.759] (==) Automatically enabling devices
[   417.762] (**) FontPath set to:
	/usr/local/lib/X11/fonts/misc/,
	/usr/local/lib/X11/fonts/TTF/,
	/usr/local/lib/X11/fonts/OTF/,
	/usr/local/lib/X11/fonts/Type1/,
	/usr/local/lib/X11/fonts/100dpi/,
	/usr/local/lib/X11/fonts/75dpi/,
	/usr/local/lib/X11/fonts/misc/,
	/usr/local/lib/X11/fonts/TTF/,
	/usr/local/lib/X11/fonts/OTF/,
	/usr/local/lib/X11/fonts/Type1/,
	/usr/local/lib/X11/fonts/100dpi/,
	/usr/local/lib/X11/fonts/75dpi/
[   417.762] (**) ModulePath set to "/usr/local/lib/xorg/modules"
[   417.763] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[   417.763] (WW) Disabling Mouse0
[   417.763] (WW) Disabling Keyboard0
[   417.763] (II) Loader magic: 0x81ef100
[   417.763] (II) Module ABI versions:
[   417.763] 	X.Org ANSI C Emulation: 0.4
[   417.763] 	X.Org Video Driver: 10.0
[   417.763] 	X.Org XInput driver : 12.2
[   417.763] 	X.Org Server Extension : 5.0
[   417.765] (--) PCI:*(0:0:2:0) 8086:0046:103c:172a rev 2, Mem @ 0xd0000000/4194304, 0xc0000000/268435456, I/O @ 0x00005080/8,
 BIOS @ 0x????????/65536
[   417.766] (II) "extmod" will be loaded. This was enabled by default and also specified in the config file.
[   417.766] (II) "dbe" will be loaded. This was enabled by default and also specified in the config file.
[   417.766] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[   417.766] (II) "record" will be loaded. This was enabled by default and also specified in the config file.
[   417.766] (II) "dri" will be loaded. This was enabled by default and also specified in the config file.
[   417.766] (II) "dri2" will be loaded. This was enabled by default and also specified in the config file.
[   417.766] (II) LoadModule: "extmod"
[   417.772] (II) Loading /usr/local/lib/xorg/modules/extensions/libextmod.so
[   417.775] (II) Module extmod: vendor="X.Org Foundation"
[   417.775] 	compiled for 1.10.4, module version = 1.0.0
[   417.775] 	Module class: X.Org Server Extension
[   417.775] 	ABI class: X.Org Server Extension, version 5.0
[   417.775] (II) Loading extension MIT-SCREEN-SAVER
[   417.775] (II) Loading extension XFree86-VidModeExtension
[   417.776] (II) Loading extension XFree86-DGA
[   417.776] (II) Loading extension DPMS
[   417.776] (II) Loading extension XVideo
[   417.776] (II) Loading extension XVideo-MotionCompensation
[   417.776] (II) Loading extension X-Resource
[   417.776] (II) LoadModule: "record"
[   417.781] (II) Loading /usr/local/lib/xorg/modules/extensions/librecord.so
[   417.782] (II) Module record: vendor="X.Org Foundation"
[   417.782] 	compiled for 1.10.4, module version = 1.13.0
[   417.782] 	Module class: X.Org Server Extension
[   417.783] 	ABI class: X.Org Server Extension, version 5.0
[   417.783] (II) Loading extension RECORD
[   417.783] (II) LoadModule: "dbe"
[   417.788] (II) Loading /usr/local/lib/xorg/modules/extensions/libdbe.so
[   417.789] (II) Module dbe: vendor="X.Org Foundation"
[   417.790] 	compiled for 1.10.4, module version = 1.0.0
[   417.790] 	Module class: X.Org Server Extension
[   417.790] 	ABI class: X.Org Server Extension, version 5.0
[   417.790] (II) Loading extension DOUBLE-BUFFER
[   417.790] (II) LoadModule: "glx"
[   417.795] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[   417.797] (II) Module glx: vendor="X.Org Foundation"
[   417.797] 	compiled for 1.10.4, module version = 1.0.0
[   417.798] 	ABI class: X.Org Server Extension, version 5.0
[   417.798] (==) AIGLX disabled
[   417.798] (II) Loading extension GLX
[   417.798] (II) LoadModule: "dri"
[   417.804] (II) Loading /usr/local/lib/xorg/modules/extensions/libdri.so
[   417.806] (II) Module dri: vendor="X.Org Foundation"
[   417.806] 	compiled for 1.10.4, module version = 1.0.0
[   417.806] 	ABI class: X.Org Server Extension, version 5.0
[   417.806] (II) Loading extension XFree86-DRI
[   417.807] (II) LoadModule: "dri2"
[   417.812] (II) Loading /usr/local/lib/xorg/modules/extensions/libdri2.so
[   417.814] (II) Module dri2: vendor="X.Org Foundation"
[   417.814] 	compiled for 1.10.4, module version = 1.2.0
[   417.814] 	ABI class: X.Org Server Extension, version 5.0
[   417.814] (II) Loading extension DRI2
[   417.814] (II) LoadModule: "intel"
[   417.824] (II) Loading /usr/local/lib/xorg/modules/drivers/intel_drv.so
[   417.830] (II) Module intel: vendor="X.Org Foundation"
[   417.830] 	compiled for 1.10.4, module version = 2.17.0
[   417.830] 	Module class: X.Org Video Driver
[   417.830] 	ABI class: X.Org Video Driver, version 10.0
[   417.830] (II) LoadModule: "vesa"
[   417.839] (II) Loading /usr/local/lib/xorg/modules/drivers/vesa_drv.so
[   417.840] (II) Module vesa: vendor="X.Org Foundation"
[   417.840] 	compiled for 1.10.4, module version = 2.3.0
[   417.841] 	Module class: X.Org Video Driver
[   417.841] 	ABI class: X.Org Video Driver, version 10.0
[   417.841] (II) intel: Driver for Intel Integrated Graphics Chipsets: i810,
	i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G, 915G,
	E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM, Pineview G,
	965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33, GM45,
	4 Series, G45/G43, Q45/Q43, G41, B43, B43, Clarkdale, Arrandale,
	Sandybridge Desktop (GT1), Sandybridge Desktop (GT2),
	Sandybridge Desktop (GT2+), Sandybridge Mobile (GT1),
	Sandybridge Mobile (GT2), Sandybridge Mobile (GT2+),
	Sandybridge Server, Ivybridge Mobile (GT1), Ivybridge Mobile (GT2),
	Ivybridge Desktop (GT1), Ivybridge Desktop (GT2), Ivybridge Server
[   417.845] (II) VESA: driver for VESA chipsets: vesa
[   417.846] (--) Using syscons driver with X support (version 2.0)
[   417.846] (--) using VT number 9

[   417.859] (II) Loading /usr/local/lib/xorg/modules/drivers/intel_drv.so
[   417.859] (WW) Falling back to old probe method for vesa
[   417.859] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   417.861] drmOpenDevice: node name is /dev/dri/card0
[   417.863] Failed to change owner or group for file /dev/dri! 2: No such file or directory
[   417.865] Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
[   417.865] drmOpenDevice: open result is -1, (No such file or directory)
[   417.865] Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
[   417.866] drmOpenDevice: open result is -1, (No such file or directory)
[   417.866] drmOpenDevice: Open failed
[   417.868] [drm] failed to load kernel module "i915"
[   417.868] (EE) intel(0): [drm] Failed to open DRM device for pci:0000:00:02.0: File exists
[   417.868] (EE) intel(0): Failed to become DRM master.
[   417.868] (==) intel(0): Depth 24, (--) framebuffer bpp 32
[   417.869] (==) intel(0): RGB weight 888
[   417.869] (==) intel(0): Default visual is TrueColor
[   417.869] (II) intel(0): Integrated Graphics Chipset: Intel(R) Arrandale
[   417.869] (--) intel(0): Chipset: "Arrandale"
[   417.871] (**) intel(0): Relaxed fencing disabled
[   417.871] (**) intel(0): Wait on SwapBuffers? enabled
[   417.871] (**) intel(0): Triple buffering? enabled
[   417.872] (**) intel(0): Framebuffer tiled
[   417.872] (**) intel(0): Pixmaps tiled
[   417.872] (**) intel(0): 3D buffers tiled
[   417.872] (**) intel(0): SwapBuffers wait enabled
[   417.872] (==) intel(0): video overlay key set to 0x101fe
[   417.872] (EE) intel(0): failed to get resources: Bad file descriptor
[   417.873] (II) UnloadModule: "intel"
[   417.873] (II) Unloading intel
[   417.873] (EE) Screen(s) found, but none have a usable configuration.
[   417.873] 
Fatal server error:
[   417.874] no screens found
[   417.874] 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[   417.874] Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   417.874]
```


----------



## Toto (Feb 12, 2012)

Hello folks, 

Back again to describe my (unseccessful) experience. I've restarted the process again this sunday afternoon; below is the procedure that I've rigorously applied:

*step0:* install FreeBSD 9.0 STABLE, using the i386 DVD image and my favorite text editor.

*step1:* update the ports tree

[CMD=""]portsnap fetch extract[/CMD]

*step2:* install required ports to get things done


```
cd /usr/ports/ports-mgmt/portmaster
make install clean
cd /usr/ports/devel/subversion
make install clean
portmaster net/cvsup
```

(reboot)

*step3:* update ports and complete source code
`portmaster -a`
`cvsup cvsup0.txt`

where 

cvsup0.txt

```
*default host=cvsup.FreeBSD.org
*default prefix=/usr
*default base=/var/db
*default release=cvs tag=RELENG_9
*default delete use-rel-suffix compress

src-all
```

(very classical things I guess for most of you)

*step4:* manually editing i915_suspend.c and i915_drv.h so that "$FreeBSD: blah[...]blah$" becomes "$FreeBSD$"

*step5:* apply patch

`patch -p1 -d /usr/src </root/drm-all.13.0-stable9.1.patch`

*step6:* recompile kernel


```
cd /usr/src/sys/i386/conf
mkdir /root/kernels
cp GENERIC /root/kernels/CUSTOM
ln -s /root/kernels/CUSTOM
cd /usr/src
make buildkernel KERNCONF=CUSTOM
```

(reboot)

`make installkernel KERNCONF=CUSTOM`

(reboot)

*step7:* add to /etc/make.conf the following lines:


```
WITH_NEW_XORG="YES"
WITH_KMS="YES"
```

*step8:* install xorg

`cd /usr/ports/x11/xorg`
`make install clean`

(reboot)

*step9:* check out new version of Xorg then merge
`svn co [url]https://trillian.chruetertee.ch/svn/ports/tags/xorg_7_5_2[/url]`
leading to have /root/xorg_7_5_2 then merge by editing the merge scripts with:
`KDEDIR="/root/xorg_7_5_2"`

*step10:* rebuild xf86-* ports

`portmaster -Raf`

(a little bit too brutal, but exhaustive)

(reboot)

I'll be very happy if you can help me in my beginnings with FreeBSD.

Thanks and have a nice week.


----------



## flop (Feb 13, 2012)

Toto said:
			
		

> *step9:* check out new version of Xorg then merge
> `svn co [url]https://trillian.chruetertee.ch/svn/ports/tags/xorg_7_5_2[/url]`
> leading to have /root/xorg_7_5_2 then merge by editing the merge scripts with:
> `KDEDIR="/root/xorg_7_5_2"`
> ...



It seems to me that you didn't execute the merge-script.


----------



## Toto (Feb 13, 2012)

Well, step 9 should be rewritten as following:

*step9:* check out new version of Xorg, edit the merge script then apply:
`svn co [url]https://trillian.chruetertee.ch/svn/ports/tags/xorg_7_5_2[/url]`
leading to have /root/xorg_7_5_2 then editing the merge scripts with:
`KDEDIR="/root/xorg_7_5_2"`

then apply
`sh xorgmerge`

(merge script got executed)


----------



## wblock@ (Feb 13, 2012)

step 4 can be

```
sed -i -e 's/FreeBSD: src.*Exp /FreeBSD/' /usr/src/sys/dev/drm/i915_suspend.c
```


----------



## ashleyd (Feb 16, 2012)

tmow said:
			
		

> Thanks to all of you and Martin Wilke (his blog post at http://miwi.bsdcrew.de/2012/02/cft-xorg-upgrade-7-5-2/) I've finally succeeded applying the patch.
> 
> Just a question, what should I do to keep it updated? Should I reapply the patches each time?
> 
> Thanks a lot!



I believe that as long as you don*'*t touch your source or update it you will not have to apply the patch again, even if you rebuild your kernel. If you *cvsup* your /usr/src to update it then I assume you will need to apply the patch again.

I am running *xorgmerge* again every time I upgrade my ports just to be safe, it only takes 1 second.


----------



## tmow (Feb 17, 2012)

*Do not update the source tree!*



			
				ashleyd said:
			
		

> I believe that as long as you don*'*t touch your source or update it you will not have to apply the patch again, even if you rebuild your kernel. If you *cvsup* your /usr/src to update it then I assume you will need to apply the patch again.
> 
> I am running *xorgmerge* again every time I upgrade my ports just to be safe, it only takes 1 second.




Thanks ashleyd, unlucky I've updated the source tree, so the above patches cannot be applied anymore... I'm looking for a solution (and waiting for a new patch set for STABLE).


----------



## Toto (Feb 17, 2012)

Hi,

Finally, this enterprise is a success, I am a happy guy .

Below is the exact receipe I've followed while remaining within 9_STABLE:

*step0:* install FreeBSD 9.0 STABLE, using the i386 DVD image and my favorite text editor.

*step1:* update the ports tree

[CMD=""]portsnap fetch extract[/CMD]

*step2:* install required ports to get things done


```
cd /usr/ports/ports-mgmt/portmaster
make install clean
cd /usr/ports/devel/subversion
make install clean
```

(reboot)

*step3:* update ports and complete source code
`portmaster -a`
`csup cvsup0.txt`

where 

cvsup0.txt

```
*default host=cvsup.FreeBSD.org
*default prefix=/usr
*default base=/var/db
*default release=cvs tag=RELENG_9
*default delete use-rel-suffix compress

src-all
```

*step4:* edit i915_suspend.c so that "$FreeBSD: blah[...]blah$" becomes "$FreeBSD$"

`sed -i -e 's/FreeBSD: src.*Exp /FreeBSD/' /usr/src/sys/dev/drm/i915_suspend.c`

*step5:* get and apply patch apply patch from /root

`fetch [url]http://tsatsenko.ru/files/all.13.7-stable-9.patch[/url]
patch [b]-d[/b] /usr/src </root/all.13.1-stable-9.patch`

*check that there are no reject file!! otherwise reapply patch on clean source again and again: *
`find / -name "*.rej"`

*step6:* recompile kernel
under /usr/src:
`make buildworld && make buildkernel && make installkernel`

(reboot)

`make installworld`

(reboot)

*step7:* add to /etc/make.conf the following lines:


```
WITH_NEW_XORG="YES"
WITH_KMS="YES"
```

*step8:* install xorg

`cd /usr/ports/x11/xorg`
`make install clean`

(reboot)

*step9:* check out new version of Xorg and download the xorgmerge script.

`svn co [url]https://trillian.chruetertee.ch/svn/ports/tags/xorg_7_5_2[/url]`
`fetch [url]http://people.freebsd.org/~miwi/xorg/xorgmerge[/url]`
The svn check-outleads to have /root/xorg_7_5_2, hence edit the xorgmerge script with:
`KDEDIR="/root/xorg_7_5_2"`
then exec merge script:
`sh xorgmerge`

*step10:* rebuild xf86-* ports

`portmaster -Raf` (actually this rebuild everything)


----------



## router54g (Feb 19, 2012)

Will the above method work on amd64?


----------



## flop (Feb 20, 2012)

router54g said:
			
		

> Will the above method work on amd64?



Well, it works for me, just try it


----------



## ahavatar (Feb 20, 2012)

Does this mean that after FreeBSD 9.1-RELEASE, the Intel Sandy-Bridge GPU just works out of box?


----------



## router54g (Feb 21, 2012)

I haven't found any indication that this is slated for 9.1-RELEASE. The man that's porting these features to the kernel and porting the new Intel driver over is still working on it. This isn't even considered a "testing" release yet. The most I can gather is it'll be done when it's done, and it seems like people in the community expect it to land in FreeBSD 10, although 9.x is certainly a possibility.


----------



## UNIXgod (Feb 21, 2012)

router54g said:
			
		

> I haven't found any indication that this is slated for 9.1-RELEASE. The man that's porting these features to the kernel and porting the new Intel driver over is still working on it. This isn't even considered a "testing" release yet. The most I can gather is it'll be done when it's done, and it seems like people in the community expect it to land in FreeBSD 10, although 9.x is certainly a possibility.



/me patiently waits =)


----------



## bes (Feb 27, 2012)

PC-BSD 9-STABLE testing snapshot which includes the new DRM/GEM/KMS work is now available to testers.

Please report any issues you find to the FreeBSD X11 mailing list so that the FreeBSD Xorg porting team can address them.


----------



## cartola (Mar 6, 2012)

Hi, I have tried first to update the source tree to 9-STABLE with cvsup using RELENG_9 and applied the patch. Don't remember having checked for *.rej, but there might have been, because the compilation didn't work. Tried then to update to 10-CURRENT without reading here with the necessary attention. Now I have a 10-CURRENT installed. Is there a resonably easy way to implement a patch to this? Does the author has a home page or somewhere where we can check? I think it would be also important, because the 9-STABLE (RELENG_9) is a live source code and after some days the patch would not fit anymore anyway. It would be a better idea to have a patch to a RELEASE.

Is it possible for someone to do this? If someone has the correct stable and has had success applying the patch it is possible to download the 9.0-RELEASE source and generate a new patch to this, isn't it? Otherwise I see only the PC-BSD possibility now...

Cheers, Cartola.


----------



## Toto (Mar 7, 2012)

router54g said:
			
		

> Will the above method work on amd64?



It seems to be working on my laptop: Intel Core i5 520M; intel GMA X4500 ironlake.

Regards.


----------



## alie (Mar 7, 2012)

This snapshot doesn't works for me. Leads my screen to blank.


----------



## Toto (Mar 7, 2012)

alie said:
			
		

> This snapshot doesn't works for me. Leads my screen to blank.



I had the same problem, however if you install xfce4, it works.


----------



## stuckpig (Mar 7, 2012)

alie said:
			
		

> This snapshot doesn't works for me. Leads my screen to blank.



Make sure you load the drm kernel module.


----------



## stuckpig (Mar 7, 2012)

cartola said:
			
		

> Hi, I have tried first to update the source tree to 9-STABLE with cvsup using RELENG_9 and applied the patch. Don't remember having checked for *.rej, but there might have been, because the compilation didn't work. Tried then to update to 10-CURRENT without reading here with the necessary attention. Now I have a 10-CURRENT installed. Is there a resonably easy way to implement a patch to this? Does the author has a home page or somewhere where we can check? I think it would be also important, because the 9-STABLE (RELENG_9) is a live source code and after some days the patch would not fit anymore anyway. It would be a better idea to have a patch to a RELEASE.
> 
> Is it possible for someone to do this? If someone has the correct stable and has had success applying the patch it is possible to download the 9.0-RELEASE source and generate a new patch to this, isn't it? Otherwise I see only the PC-BSD possibility now...
> 
> Cheers, Cartola.



Take a look at http://miwi.bsdcrew.de/2012/02/cft-xorg-upgrade-7-5-2/

I was running 9-RELEASE, updated my source to 9-STABLE, grabbed the latest 9-STABLE patch from http://tsatsenko.ru/files/ followed Toto's steps outlined in this thread and everything works great. If your kernel build is failing during compilation, rm /usr/src, rm /usr/obj, grab the sources again, apply the patch (edit i915_suspend.c first) rebuild world and kernel. It should work fine.


----------



## alie (Mar 8, 2012)

stuckpig said:
			
		

> Make sure you load the drm kernel module.



How to load it if its live session?


----------



## stuckpig (Mar 8, 2012)

alie said:
			
		

> How to load it if its live session?



use the command `# kldload drm`. 

additionally, add the line 
	
	



```
drm_load="YES"
```
 to /boot/loader.conf to have this module loaded when the machine boots.


----------



## alie (Mar 8, 2012)

Toto said:
			
		

> I had the same problem, however if you install xfce4, it works.



Same problem with XFCE and LXDE. The screen blanks after installation and after restart.


----------



## Toto (Mar 10, 2012)

Since your hardware (hp2560p?) is not much different from what most of the people have here (including me), there is not magic or bad luck, my feeling is that you have a problem of method, you must be doing something wrong or working on some wrong assumptions; you may review things carefully.

Whether one chooses to follow the 10_CURRENT path of the 9_STABLE one, there should be enough materials developed here to get it right (that's only the humble opinion of a 1 month-old newbie).


----------



## phpwolf (Mar 16, 2012)

Hi guys, Hello Toto,

I have an optimus laptop with i915 card + nvidia GT520M. I followed your steps, everything works fine regarding the kms activation process, but unfortunatelly, when the X is initialized, a lot of artifacts (random pixels) are shown in the top part of the screen. Also, the mouse clicks doesn't have any impact (the wm menu is not activated when I press left or right button - I use twm, fvwm2 or fluxbox - no menu with left/right/middle click).

So we talking about 2 problems:

1. artifacts present on the top of the screen
2. mouse clicks doesn't work

Technical notes:
- I used http://tsatsenko.ru/files/all.13.5-stable-9.patch (the newest patch from 04-Mar-2012 17:17) because I didn't find the patch 13.1 on the tsatsenko website
- I didn't found any *.rej files after aplying the patch so it seems I'm ok on that side
- The console switch (ctrl+alt+f2) seems to work for me, but when I quit the X (of course, by killing it, because the mouse buttons doesn't work), when I try to startx again, the X initialization fails with some drm initialization errors (this behavior is quite normal in my opinion, as long as kms support is in a pre-alpha stage).

And one more question: if I want to try another patch, not the newest one, do I need to rebuild the X again or to build the world will be enough?

Thank you very much, Toto, your tutorial was very helpful for me


----------



## Toto (Mar 18, 2012)

Hi, 

Just to be clear: I'm new at FreeBSD and I don't consider myself experienced enough to give sound advices. What prevail is common sense make and careful reviewing.

Getting back to your points:

- why a pre-alpha version of this driver meant to be working on intel nominally would ever have a chance to work on nvidia ? By default, you are lucky to only have pixel flickering...and forget about any ctrl+alt+fn combination (which is not even supposed to work with intel cards).

- As for your mouse problem: posting:Configuring X - read before you ask questions!

- I've tried 13.1 and 13.5 without noticing much difference. My desktop way of working (time spent/application used) doesn't pretend to be exhaustive enough to stress out any relevant difference.


Happy BSD-unixing !


----------



## bsdolith (Mar 25, 2012)

ahavatar said:
			
		

> Does this mean that after FreeBSD 9.1-RELEASE, the Intel Sandy-Bridge GPU just works out of box?



This is copied out of the PC-BSD handbook:

http://wiki.pcbsd.org/index.php/PC-BSD_Users_Handbook



> 2.4.2 Laptops with Built-In Intel Video Chip
> The FreeBSD Foundation and iXsystems are funding a project to add native DRI, GEM, and KMS support to the
> FreeBSD kernel for version 9.1. In the mean time, video drivers that require these kernel hooks currently use the
> X.org driver with those features disabled. Usually this means that the card works but may be missing features
> such as 3D acceleration.



So it is looking good!


----------



## phpwolf (Mar 26, 2012)

Toto said:
			
		

> Hi,
> 
> Just to be clear: I'm new at FreeBSD and I don't consider myself experienced enough to give sound advices. What prevail is common sense make and careful reviewing.
> 
> ...



Yes, I'm a n00b regarding the Unix operating systems but I'm a game programmer for about 10 years so everyday I play with compilers/debuggers/openGL/directX/iOS SDK/Xbox dev kit and so on. In my world (yes, is a win or mac world), a patch means a patch - so as far as I know, a patch is a peace of code, not a peace of s**t. And I said that because I tried for several times to apply that bloody patch for drm from http://people.freebsd.org/~kib/drm/ (on src9 version or src10 head version) and I found a lot of *.rej files. What kind of patch is this if it doesn't feet even with the newest source code?

The problem is that some guys said the KMS patch works fine for them. Then a lot of people said "nooo, this code is only in an alpha stage and you should be happy to have artifacts on the screen, to have random crashes and so on".

Unfortunately, my laptop doesn't have a BIOS switch from Intel to NVidia card and the NVidia native driver doesn't work. That's why I try to configure somehow my videocard in FreeBSD. In fact, my plan is to make free casual games for FreeBSD - that's why I need to have 3D acceleration on my laptop.

Also, I already had hal and dbus (+gnome) enabled when I asked for help. I still don't know why the mouse clicks doesn't work.


----------



## grigorovl (Mar 26, 2012)

Woohoo 9.1 as target is nice. Of course, you can use manual patches meanwhile as well.

GJ


----------



## akregator (Mar 27, 2012)

phpwolf said:
			
		

> And I said that because I tried for several times to apply that bloody patch for drm from http://people.freebsd.org/~kib/drm/ (on src9 version or src10 head version) and I found a lot of *.rej files.



http://tsatsenko.ru/files/ You should use these patch for src9 RELEASE and STABLE. For src10, I think it's normal because it is a development branch and it moves several times a day. What are these .rej files ?


----------



## phpwolf (Mar 28, 2012)

akregator said:
			
		

> http://tsatsenko.ru/files/ You should use these patch for src9 RELEASE and STABLE. For src10, I think it's normal because it is a development branch and it moves several times a day. What are these .rej files ?



I didn't find any *.rej files using the tsatsenko's patches (I used 13.5 and 13.6 patches) applied on src9 (my frustration was releated to src10 + http://people.freebsd.org/~kib/drm/ patches). With tsatsenko's patches everything was compiled fine, I have KMS support, but as I said in a previous post, I found two big problems:

- screen artifacts (random pixels) appears at the top of the screen (fvwm, twm, even XFce starts, but a lot of random flickering pixels are present in the top part of the screen)
- the mouse clicks doesn't have any impact (again, YES, I have hald/dbus/gnome support enabled).

A note: keyboard works, but when I press, let's say (ALT+F2 - to open run app dialog in XFce), the screen artifacts change their position (random pixels are moving but only on 1/3 part of the screen - the top one).

So I think the problem is regarding the pixel buffer blitting from memory to the screen (maybe the video card pixel buffer address is wrong obtained or is malformed somehow). I should throw an eye on the .c files to see how the kernel works with drm and how these addreses are obtained - but I didn't have any experience regarding the *Free*BSD kernel; actually, I'm new to the BSD world, but I like this OS and I consider it a great opportunity for me to contrib with some casual free games.

Thanks for help!


----------



## akregator (Mar 29, 2012)

I have screens artefacts too. For mouse, is moused daemon enabled ? I'm not sure it can help but just try.


----------



## fontorio (Mar 30, 2012)

For those who have sbp_targ loaded at boot from loader.conf, it will crash and coredump with this GEM/KMS patch.


----------



## grigorovl (Apr 2, 2012)

I have followed Toto's guide and Xfce4 works. When moving windows around, there seems to be some breaking, but I don't see any of the mentioned artifacts anywhere. 720p runs with sound fine.

I have a minor problem, though. Before Xfce4 just doing startx, and exiting, I get a black screen. I typed reboot, but nothing happenend. Same thing happens if I click Log out in Xfce. Seems that monitor and keyboard die out after exit from X. I have to hard shutdown.

But X works with the patch 13.7 and Toto's steps.


----------



## router54g (Apr 3, 2012)

Switching back to the console is currently disabled in the patch. This is for ease of development. It'll be implemented when the patch hits public stage. 

See the wiki entry Intel GPU for more info.


----------



## Toto (Apr 3, 2012)

router54g said:
			
		

> Switching back to the console is currently disabled in the patch. This is for ease of development. It'll be implemented when the patch hits public stage.
> 
> See the wiki entry Intel GPU for more info.




This is what I've understood as well so far.

@phpwolf:



			
				phpwolf said:
			
		

> Hi guys, Hello Toto,
> - The console switch (ctrl+alt+f2) seems to work for me,



This is what make me suspicious about your install. Are you sure to have no reject file/ patch beeing applied correctly?

*H*ow could it be possible to have pixel flickering (assuming as a result of a patch application) and having console switch working at the same time? (open question)

Regards,


----------



## phpwolf (Apr 3, 2012)

grigorovl said:
			
		

> I have followed Toto's guide and Xfce4 works. When moving windows around, there seems to be some breaking, but I don't see any of the mentioned artifacts anywhere. 720p runs with sound fine.
> 
> I have a minor problem, though. Before Xfce4 just doing startx, and exiting, I get a black screen. I typed reboot, but nothing happenend. Same thing happens if I click Log out in Xfce. Seems that monitor and keyboard die out after exit from X. I have to hard shutdown.
> 
> But X works with the patch 13.7 and Toto's steps.



So this means you have a full functional X with 3D acceleration? Did you tried to run an openGL game like neverball and it worked fine? Wow, that's sounds awsome - maybe I should try to reinstall everything (including the OS) - maybe I missed something. And maybe I should try with the 13.7 patch too.

By the way, what kind of video card you have?


----------



## phpwolf (Apr 3, 2012)

Toto said:
			
		

> This is what I've understood as well so far.
> @phpwolf:
> This is what make me suspicious about your install. Are you sure to have no reject file/ patch beeing applied correctly? *H*ow could it be possible to have pixel flickering and having console switch at the same time? (open question)
> Regards,



After `patch -d /usr/src </root/patchfile` I did `find /usr/src -name "*.rej"` 
and no rej files returned. Also the kernel was compiled fine, *kldstat* said that the drm is loaded, X starts with the intel driver. I will try to reinstall everything, because something is really wrong here - for example, in Xfce the mouse clicks don't work on icons (by the way, when the mouse moves, some black rectangles remain under the mouse cursor), but if I open the "thunar" filemanager (ALT+F2 then blind typed "thunar" - blind typed because I can see anything) in Thunar the clicks works great (and then I can browse folders, rename files, copy/paste etc) I can even move the window with the mouse.

One note: when I upgraded X to 7.5.2 I choosed "default" options for everything, because I don't have enough experience to know what is necessary and what is unnecessary when the system ask me for some packages. So if you, guys, are checked some additional options for the X upgrading, please, let me know.

I should reinstall everything and try with the newest patch. Thanks a lot, guys, for your help!


----------



## Toto (Apr 3, 2012)

phpwolf said:
			
		

> One note: when I upgraded X to 7.5.2 I choosed "default" options for everything, because I don't have enough experience to know what is necessary and what is unnecessary when the system ask me for some packages. So if you, guys, are checked some additional options for the X upgrading, please, let me know.



*S*tep 10: Beware, at some point, you will be asked whether you want to use KMS (with the mention "very experimental" as far as I remember), make sure you check it before proceeding further.

Regards,


----------



## phpwolf (Apr 3, 2012)

I reinstalled the whole OS using the same process but this time everything worked fine (I have 3d acceleration, XFce, mouse). Now I'm posting this using my laptop and I'm a happy guy. I don't know what was wrong with my previous installation, I'm happy enough for the moment.

Some notes:

@Toto
Yes, the KMS option was also checked in my previous install.

I found that the X freeze and the system hangs up after 2 - 3 mins of playing neverball/neverputt - maybe this will be fixed with the new patches. X seems to be stable enough for everyday work.

Now, please, forgive me if I'm offtopic, but let me share with you some ideas about my next plans: I'm the CEO of OBLONE Software (the game company that made SunBlast game http://www.sunblastthegame.com). My company released (after ~5years of work) a completely new programming language especially designed for multimedia applications and game programming (for example, SunBlast is a game written entirely in this programming language). This works on several platforms (including BSD) and I plan to release this programming language with a free license for the BSD platform (including permission of using it to produce commercial applications) as a contribution. I'll go back to you with more informations regarding this in a separate thread next weeks, and who knows, maybe we will release the SunBlast for BSD under a free license 

Thanks again for your patience, tips and help. Toto, I should send you some bottles of Romanian beer


----------



## fontorio (Apr 4, 2012)

Support for E3-1260L seems to be missing. I posted the error messages and info here: http://miwi.bsdcrew.de/2012/02/working-on-xorg-stuff/


----------



## Toto (Apr 4, 2012)

phpwolf said:
			
		

> Thanks again for your patience, tips and help. Toto, I should send you some bottles of Romanian beer



My pleasure .


----------



## grigorovl (Apr 5, 2012)

When I run X, CPU skyrockets to 50C at best. Then to 60C when doing browser stuff and the fan goes crazy. I do have powerd and the adaptive flag and states do change, however, I think the problem is CPU stays in turbo mode and highest mode longer and fan can't keep up. I usually don't go above 65C for browsing since fan is loud by then, but I also can't drop below 50C. This issue doesn't appear when not in X.

I have a X220 with custom world only with latest patch for STABLE and stock kernel. Powerd is enabled.

```
# uname -a
FreeBSD LGX 9.0-STABLE FreeBSD 9.0-STABLE #0: Mon Apr  2 13:20:47 PDT 2012     root@LGX:/usr/obj/usr/src/sys/GENERIC  amd64
```


Any help would be great as 50C-60C for browsing is too much. Not sure if problem with patch or CPU throttling, but if you have any ideas, it will be great.

P.S. I localized the problem to my lowest C-states going back to C1 for all 4 cores. I do have them to be C3, but it seems when I do heavy CPU stuff, they reset to C1 and get stuck there. But still, the fan doesn't spin its lowest mode when in X, and the temp is the same.


----------



## phpwolf (Apr 12, 2012)

grigorovl said:
			
		

> When I run X, CPU skyrockets to 50C at best. Then to 60C when doing browser stuff and the fan goes crazy. I do have powerd and the adaptive flag and states do change, however, I think the problem is CPU stays in turbo mode and highest mode longer and fan can't keep up. I usually don't go above 65C for browsing since fan is loud by then, but I also can't drop below 50C. This issue doesn't appear when not in X.
> 
> I have a X220 with custom world only with latest patch for STABLE and stock kernel. Powerd is enabled.
> 
> ...



I found that the X crashes random and the system automatically reboots after a short period of time (let's say 10 on 15 mins of normal using). Also, I found that the crash is happen when you "stress" the video card with 3D content (for example, if you open a 3D game the X crash in three or five minutes). I think this is a temp problem as you already said.


----------



## fontorio (Apr 21, 2012)

I tested the all.14.3-stable-9.patch file with /usr/src update to revision 234130. It crashed with panic when I loaded the i915 kernel module. The older patch all.13.7-stable-9.patch file did not crash with revision 233231 but failed to load Xorg. I have a E3-1260L processor which did not have pmc support in revision 233231. Now, it has pmc support but the i915 module crashes the machine immediately after loaded.


----------



## mpeterma (May 12, 2012)

With the recipe above I was able to enable graphics on my Lenovo X121e (i3, HD3000 graphics). Step 8 seems not to be required anymore as ports were upgraded to Xorg 7.5.2. I used latest RELENG_9 and all.14.7-stable-9.patch from http://tsatsenko.ru/files.

Thanks Toto and the others for this useful information. I'm so happy to be able to have FreeBSD on my laptop now.


----------



## fontorio (May 16, 2012)

The latest patch all.14.9-stable-9.patch still doesn't work for E3-1260L (i.e. HD2000 graphics).


```
drm0: <Intel SandyBridge (M)> on vgapci0
info: [drm] MSI enabled 1 message(s)
error: [drm:pid2031:drm_load] *ERROR* Card isn't AGP, or couldn't initialize AGP.
device_attach: drm0 attach returned 12
```

Is anyone using a Sandy Bridge CPU that comes with HD2000 and able to get it to work?


----------



## xibo (May 16, 2012)

I have a E3-1260L but haven't tested it so far since my mainboard doesn't support the IGP to begin with.
Given there's only two mainboards out there that do support it, this might be a good point to ask whether there's any GPGPU-like functionality possible with the IGPs not connected or connectable to any screens?


----------



## grigorovl (May 19, 2012)

I would like to say with pleasure that 14.9 works on my X220. Since I went through the full method once all I needed this time was:

update source via csup (same file)
apply patch, remove .rej's
`make -j8 buildworld && make installworld`
reboot
!!ATTENTION!! READ THE UPDATED FAQ HERE: http://wiki.freebsd.org/Intel_GPU


> 8. I get a reject in i915_suspend.c.
> The cause is that you use subversion-freebsd, which causes $FreeBSD$ tag expansion in the checkout. Manually edit the i915_suspend.c before applying the patch, to undo the expanded $FreeBSD$ tag into it short form.
> 
> 9. I get a reject in i915_mem.c.
> Remove this file, also remove i915_mem.c.rej, i915_mem.c.orig.



No ports upgrading or Xorg merging. Works like a charm. I don't get any crashing on 3D video or games through Wine. So far 13.7 and 14.9 work for me. Keep up the good work!


----------



## router54g (May 20, 2012)

grigorovl said:
			
		

> Works like a charm. I don't get any crashing on 3D video or games through Wine. So far 13.7 and 14.9 work for me. Keep up the good work!



Good metric. I have the same machine, and looking forward to install fBSD FreeBSD on it as well. 

What kind of games are you using to test this? Would you mind listing any work, and their condition (performance? working flawlessly?). Thanks.


----------



## nenadlalos83 (May 20, 2012)

Hi everyone,

I have an i3 540 Clarkdale, with Intel HD graphics. If someone has this configuration please let me know if it works with freebsd FreeBSD. I can't get it running with Intel drivers.

Please someone write here step by step what to do after installinging a fresh freebsd FreeBSD 9-STABLE 64 or 32 bit, with latest patch for Intel HD graphics.

Or maybe to upgrade to freebsd FreeBSD 10-CURRENT with a step by step instruction.

Thanks


----------



## phpwolf (May 21, 2012)

@grigorovl


> I don't get any crashing on 3D video or games through Wine



Try to run Neverball or Neverputt and you will find a lot of crashes. There is a problem when too many objects need to be rendered. Neverball crashes after ~30 seconds of playing and Neverputt crashes after ~3 minutes of playing.

Also, I found that if you play something in fullscreen the crash repro rate is lower than if you run the same thing in window mode. For example, if I run DOS games with dosbox in fullscreen, I can play even for 30 minutes without any crash. Maybe that's why you didn't find crashes on 3D video games in Wine (maybe you run your games in fullscreen mode).

Another way to hang up the system is to compile something in X. Just open an xterm and install something from ports.

I didn't find any notable improvements between 13.7 and 14.x so far.


----------



## xibo (May 21, 2012)

phpwolf said:
			
		

> Another way to hang up the system is to compile something in X. Just open an xterm and install something from ports.



Never had that problem so far, though here the system crashes when randomly right-clicking in kdevelop.


----------



## thuglife (May 22, 2012)

The patch committed to head a few minutes ago. (r235782, r235783)


----------



## alie (May 22, 2012)

Hoping it's commited to 9-STABLE :-D


----------



## pkubaj (May 23, 2012)

Not yet, but it's supposed to be MFC'ed after a month.


----------



## jeffutter (Jun 1, 2012)

Hey all,

Couple of questions here. I'm trying to get this working on an Intel HD4000 chip. Has anyone tried/gotten it working on one of these?

Also, is all.14.9-stable-9.patch the latest patch? It applies cleanly with the exception of the _mem reject (which *I* deleted). However when I rebuild and *kldload* the module nothing shows up in dmesg and Xorg dies with: 


```
# X

X.Org X Server 1.10.6
Release Date: 2012-02-10
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 9.0-STABLE amd64 
Current Operating System: FreeBSD jeffu-htpc 9.0-STABLE FreeBSD 9.0-STABLE #0: Fri Jun  1 22:30:59 EDT 2012
     root@jeffu-htpc:/usr/obj/usr/src/sys/GENERIC amd64
Build Date: 01 June 2012  11:59:09PM
 
Current version of pixman: 0.24.2
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat Jun  2 04:04:52 2012
(==) Using default built-in configuration (30 lines)
(EE) Failed to load module "fbdev" (module does not exist, 0)
(EE) intel(0): [drm] Failed to open DRM device for pci:0000:00:02.0: File exists
(EE) intel(0): Failed to become DRM master.
DRM_IOCTL_I915_GEM_APERTURE failed: Bad file descriptor
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [9]
param: 4, val: 0
Assertion failed: (0), function drm_intel_bufmgr_gem_init, file intel_bufmgr_gem.c, line 2332.
zsh: abort (core dumped)  X
```

I'm working on starting over from scratch, documenting every step I take to see if *I* went wrong somewhere. Will post that once it's done either successfully or not.


----------



## finn (Jun 2, 2012)

*my path to KMS*

I am still in the process of testing, but I haven't encountered any obvious errors and my CPU usage and heat development are at normal levels. The CPU I'm using is an Intel i7-2640M with HD 3000 in a ThinkPad X220 (mentioning this because some others in this thread have the same machine). What I did to get KMS working is basically an updated version of Toto's guide, where I take into account that KMS is now part of CURRENT.


*step0*, *step1* and *step2* are identical.
*step3* stays the same, except RELENG_9 is replaced with:

cvsup0.txt

```
*default host=cvsup.FreeBSD.org
*default prefix=/usr
*default base=/var/db
*default release=cvs tag=.
*default delete use-rel-suffix compress

src-all
```

This gives us HEAD in /usr/src/.

*step4* and *step5* are no longer necessary since the code used in the patch has been merged.
*step6*, *step7* and *step8* follow as before.
*step9*  skip
*step10* this also stays the same.
After I went through with this process all I needed to do was load i915kms:
`kldload i915kms`

Don't be surprised if your screen goes black once it loads. With a bit of luck you will now be able to `startx`

At the moment it isn't possible to return to the console and will have to start X blindly or by using a login manager (I have been pointed to slim and it does the job).

Good luck and enjoy!


----------



## xibo (Jun 3, 2012)

jeffutter said:
			
		

> Hey all,
> 
> Couple of questions here. I'm trying to get this working on an Intel HD4000 chip. Has anyone tried/gotten it working on one of these?
> 
> ...



The i915_mem.c file must be modified before applying the patch, like the i915_suspend.c file, i.e. rewritten from 

```
__FBSDID("$FreeBSD: stable/9/sys/dev/drm/i915_mem.c 182080 2008-08-23 20:59:12Z rnoland $");
```
to

```
__FBSDID("$FreeBSD$");
```
somewhere at the top of the file.

The newest patch is 15.1 IIRC, though since kib committed the patches to upstream it's no longer refered. On his wiki page kib wrote what steps you need to take if you want to pull the driver into a RELENG source tree.


----------



## sickboy (Jun 8, 2012)

After an update of xf86-video-intel-2.7.1_4 from 7th June, my Xorg refuses to work anymore (Xorg with KMS worked fine on my 9-STABLE until then). Today, I changed from RELENG9 to HEAD, (I took the steps of finn, described in this thread).

Unfortunately, graphics/libdrm won't build:


```
modetest.c:58:19: error: cairo.h: No such file or directory
modetest.c: In function 'make_pwetty':
modetest.c:394: error: 'cairo_surface_t' undeclared (first use in this function)
modetest.c:394: error: (Each undeclared identifier is reported only once
modetest.c:394: error: for each function it appears in.)
modetest.c:394: error: 'surface' undeclared (first use in this function)
modetest.c:395: error: 'cairo_t' undeclared (first use in this function)
modetest.c:395: error: 'cr' undeclared (first use in this function)
modetest.c:399: error: 'CAIRO_FORMAT_ARGB32' undeclared (first use in this function)
modetest.c:405: error: 'CAIRO_LINE_CAP_SQUARE' undeclared (first use in this function)
*** [modetest.o] Error code 1
1 error
*** [all-recursive] Error code 1
1 error
*** [all-recursive] Error code 1
1 error
*** [all] Error code 2
1 error
*** [do-build] Error code 1

Stop in /usr/ports/graphics/libdrm.
*** [build] Error code 1

Stop in /usr/ports/graphics/libdrm.

===>>> make failed for graphics/libdrm
===>>> Aborting update
```

Any suggestions?


----------



## xibo (Jun 8, 2012)

Either was cairo not (properly) installed, or the include paths wasn't extended. What's the compiler invocation that caused that error at your system?


----------



## pkubaj (Jun 9, 2012)

I'm using 9.0-STABLE with the 14.9 patch and have recently upgraded the Intel driver (from ports), but only later read that it's for -CURRENT. Of course, it doesn't work. I've downgraded the port to the previous version and tried to compile it, but it doesn't even patch correctly.


```
===>  Applying FreeBSD patches for xf86-video-intel-2.17.0
2 out of 2 hunks failed--saving rejects to uxa/uxa-priv.h.rej
=> Patch patch-uxa_uxa-priv.h failed to apply cleanly.
*** Error code 1

Stop in /usr/ports/x11-drivers/xf86-video-intel.
```


----------



## sickboy (Jun 11, 2012)

xibo said:
			
		

> Either was cairo not (properly) installed, or the include paths wasn't extended. What's the compiler invocation that caused that error at your system?



I reinstalled graphics/cairo but this didn't help.

That's what I get while compiling:

```
libdrm 2.4.31 will be compiled with:

  libkms         yes
  Intel API      yes
  vmwgfx API     no
  Radeon API     yes
  Nouveau API    yes

===>  Building for libdrm-2.4.31_1
/usr/bin/make  all-recursive
Making all in .
  CC     libdrm_la-xf86drmHash.lo
  CC     libdrm_la-xf86drm.lo
  CC     libdrm_la-xf86drmRandom.lo
  CC     libdrm_la-xf86drmSL.lo
  CC     libdrm_la-xf86drmMode.lo
  CCLD   libdrm.la
Making all in libkms
  CC     linux.lo
  CC     intel.lo
  CC     dumb.lo
  CC     api.lo
  CC     nouveau.lo
  CC     radeon.lo
  CCLD   libkms.la
Making all in intel
  CC     intel_bufmgr.lo
  CC     intel_bufmgr_fake.lo
  CC     intel_bufmgr_gem.lo
  CC     intel_decode.lo
intel_decode.c: In function 'decode_3d_primitive':
intel_decode.c:2418: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:2418: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:2418: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:2418: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:2418: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:2418: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:2418: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:2418: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:2418: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:2418: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:2418: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:2418: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:2418: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:2418: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:2418: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:2418: warning: cannot optimize loop, the loop counter may overflow
  CC     mm.lo
  CC     test_decode.o
test_decode.c: In function 'compare_batch':
test_decode.c:91: warning: unused variable 'size'
intel_decode.c: In function 'decode_2d_br01':
intel_decode.c:299: warning: 'format' may be used uninitialized in this function
intel_decode.c: In function 'drm_intel_decode':
intel_decode.c:3105: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:3105: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:3105: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:3105: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:3105: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:3105: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:3105: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:3105: warning: cannot optimize loop, the loop counter may overflow
intel_decode.c:3105: warning: cannot optimize loop, the loop counter may overflow
  CCLD   libdrm_intel.la
  CCLD   test_decode
Making all in nouveau
  CC     nouveau_device.lo
  CC     nouveau_channel.lo
  CC     nouveau_pushbuf.lo
  CC     nouveau_grobj.lo
  CC     nouveau_notifier.lo
  CC     nouveau_bo.lo
  CC     nouveau_resource.lo
  CC     nouveau_reloc.lo
  CCLD   libdrm_nouveau.la
Making all in radeon
  CC     radeon_bo_gem.lo
  CC     radeon_cs_gem.lo
radeon_cs_gem.c:334: warning: 'cs_gem_dump_bof' defined but not used
  CC     radeon_cs_space.lo
  CC     radeon_bo.lo
  CC     radeon_cs.lo
  CC     radeon_surface.lo
  CC     bof.lo
bof.c: In function 'bof_object_get':
bof.c:68: warning: cannot optimize loop, the loop counter may overflow
bof.c:68: warning: cannot optimize loop, the loop counter may overflow
bof.c:68: warning: cannot optimize loop, the loop counter may overflow
bof.c:68: warning: cannot optimize loop, the loop counter may overflow
bof.c:68: warning: cannot optimize loop, the loop counter may overflow
  CCLD   libdrm_radeon.la
Making all in tests
Making all in modeprint
  CC     modeprint.o
  CCLD   modeprint
Making all in kmstest
  CC     main.o
  CCLD   kmstest
Making all in modetest
  CC     modetest.o
modetest.c:58:19: error: cairo.h: No such file or directory
modetest.c: In function 'make_pwetty':
modetest.c:394: error: 'cairo_surface_t' undeclared (first use in this function)
modetest.c:394: error: (Each undeclared identifier is reported only once
modetest.c:394: error: for each function it appears in.)
modetest.c:394: error: 'surface' undeclared (first use in this function)
modetest.c:395: error: 'cairo_t' undeclared (first use in this function)
modetest.c:395: error: 'cr' undeclared (first use in this function)
modetest.c:399: error: 'CAIRO_FORMAT_ARGB32' undeclared (first use in this function)
modetest.c:405: error: 'CAIRO_LINE_CAP_SQUARE' undeclared (first use in this function)
*** [modetest.o] Error code 1
1 error
*** [all-recursive] Error code 1
1 error
*** [all-recursive] Error code 1
1 error
*** [all] Error code 2
1 error
*** [do-build] Error code 1

Stop in /usr/ports/graphics/libdrm.
*** [build] Error code 1

Stop in /usr/ports/graphics/libdrm.
```

Edit: Very strange: I tried it again and again and suddenly it worked. I could compile and 10.0-CURRENT runs fine now.


----------



## xibo (Jun 11, 2012)

thuglife said:
			
		

> The patch committed to head a few minutes ago. (r235782, r235783)


It just got into RELENG_9 two minutes ago.


----------



## alie (Jun 12, 2012)

Thanks a lot Konstantin Belousov and iXSystem.


----------



## Beastie (Jun 12, 2012)

It's a great day for FreeBSD-powered desktops. Thanks!


----------



## jeffutter (Jun 13, 2012)

These changes (neither on 9-STABLE or 10) support my IvyBridge video chip. This is an Intel HD 4000 from an i5 i5-3570K. What can *I* do to get the pciids added?


```
% pciconf -lvv
vgapci1@pci0:0:2:0:     class=0x038000 card=0x01621849 chip=0x01628086 rev=0x09 hdr=0x00
    vendor     = 'Intel Corporation'
    class      = display
```


----------



## jrm@ (Jun 14, 2012)

xibo said:
			
		

> It just got into RELENG_9 two minutes ago.



I just went from 9.0-RELEASE to STABLE.  This is all I had to do (as root) to get things working beautifully.


```
echo "WITH_NEW_XORG=true" >> /etc/make.conf
portmaster x11/xorg
X -configure
# move the generated configuration file to /usr/local/etc/
```


----------



## SNK (Jun 16, 2012)

It works great! With Mobile Intel GM45 Express Chipset.



			
				jrm said:
			
		

> I just went from 9.0-RELEASE to STABLE.  This is all I had to do (as root) to get things working beautifully.
> 
> 
> ```
> ...



In addition I had to reinstall some x11-drivers/xf86-video-XXXXXX based on the EE messages I got from running *configure*. Then a reboot, and it works great!


----------



## SR_Ind (Jun 18, 2012)

*Failed on RELENG_9*

The procedure failed on FreeBSD 9 with a Mobile Intel(R) 965 Express Chipset. This coupled with laptop overheating with this release really left a bitter taste.

Until 10.x I'll stick with 8.2

Wanted to tinker with Clang, alas.


----------



## SR_Ind (Jun 21, 2012)

Okay, got it working with FreeBSD 10.

Switching to console doesn't work. That's ok.

But...I don't even get back the console when I quit my Window Manager. I'm using *jwm*.

Any hints?


----------



## pkubaj (Jun 21, 2012)

SR_Ind said:
			
		

> Okay, got it working with FreeBSD 10.
> 
> Switching to console doesn't work. That's ok.
> 
> ...



It doesn't work at the moment. Once you load i915kms and drm2, you cannot go back to tty. Unloading is not supported yet.


----------



## BlackSteel (Jun 21, 2012)

That's because switching code is not implemented yet and kernel module is still unloadable. Only reboot seems to help to get text console back.


----------



## phpwolf (Jun 22, 2012)

Guys, one little question: when you say "it works" you say that your card is correctly initialized or you say that your card really works for everyday use? The discussion is only about functionallity? The stability doesn't matter?

Did you tried to run neverball game? Does it runs for 5 minutes or more? I asqued this because in my case, even with the latest kernel sources, if I run neverball or I use firefox to browse some complex HTML pages (e.g. with .swf embedded) the system hangs up after a while.

I'm a little bit confused: you say that you have a STABLE system with kms?

Neverball still hangs up the system in about 30s.

Note: I hate neverball, ok? I'm not a fan of this game, I just test the patch with it.


----------



## xibo (Jun 22, 2012)

STABLE means RELENG_9, not stable release. 2D acceleration works pretty well here, X11 didn't crash at all recently. However, when trying to shut down the system it crashes before flushing the disks quite often, leaving me worried about data consistency...


----------



## phpwolf (Jun 22, 2012)

xibo said:
			
		

> STABLE means RELENG_9, not stable release. 2D acceleration works pretty well here, X11 didn't crash at all recently. However, when trying to shut down the system it crashes before flushing the disks quite often, leaving me worried about data consistency...



In my previous post, I used STABLE as an antonym of UNSTABLE, not as a FreeBSD STABLE release branch (sorry for writing "stable" with capital letters and generate confusion - I don't know wtf is wrong with me these days).

So, is there anyone here who has a healthy X11 + KMS + 3D system that doesn't crashe after, let's say, one hour of normal use (or 30 seconds of neverball use)?


----------



## pkubaj (Jun 22, 2012)

There's no 3D acceleration yet. But I use my laptop often for 4-5 hours in X11 without any problems.


----------



## SR_Ind (Jun 22, 2012)

Mine is running for some 4.5 hours and I've building ports in a rxvt terminal and also running MPlayer with the gl2 driver to test some 1080p HD videos. CPU temperature showing to be 63 degrees.

Shutdown and reboots only possible from rxvt terminal.


----------



## SNK (Jun 22, 2012)

BlackSteel said:
			
		

> That's because switching code is not implemented yet and kernel module is still unloadable. Only reboot seems to help to get text console back.



The console is there but you just cannot see it. But you can start X again or reboot.



			
				phpwolf said:
			
		

> Guys, one little question: when you say "it works" you say that your card is correctly initialized or you say that your card really works for everyday use? The discussion is only about functionallity? The stability doesn't matter?
> 
> Did you tried to run neverball game? Does it runs for 5 minutes or more? I asked this because in my case, even with the latest kernel sources, if I run neverball or I use firefox to browse some complex HTML pages (e.g. with .swf embedded) the system hangs up after a while.
> 
> ...



X never crashes and games/neverball runs smooth. Perhaps it is because I did only compile with WITH_NEW_XORG and did not add WITH_KMS.

My system/config: dual-core 1.3GHz; AMD64; STABLE-9 (r237099); Mobile Intel GM45 Express Chipset; x11-wm/awesome WM.


----------



## UNIXgod (Jun 23, 2012)

Hey check it out:

http://intellinuxgraphics.org/documentation.html


----------



## zeissoctopus (Jun 24, 2012)

phpwolf said:
			
		

> So, is there anyone here who has a healthy X11 + KMS + 3D system that doesn't crashe after, let's say, one hour of normal use (or 30 seconds of neverball use)?



I don't know the 3D part. My Acer 1810TZ with G45 works healthy in FreeBSD 9-STABLE + KMS + NEW_XORG. I use this laptop average 5 hours per day.


----------



## jopeto (Jun 29, 2012)

Hi, I have a basic question:

What's the difference between building Xorg with both

```
WITH_NEW_XORG="YES"
WITH_KMS="YES"
```
and with

```
WITH_NEW_XORG="YES"
```
only?

I had a problem with the resolution of my screen not being recognized properly, so I upgraded from 9-RELEASE to 9-STABLE and rebuilt Xorg with both KMS and NEW_XORG. Now the resolution is working beautifully and I don't need to type [cmd=]kldload i915kms[/cmd] before starting X in order to get my resolution working.

The problem is that now my laptop is heating more than before, so I'm wondering if I shouldn't rebuild Xorg only with NEW_XORG if that would be sufficient to provide widescreen resolution.


----------



## BlueCoder (Sep 29, 2012)

*New xorg working on an MSI wind 100!.*

Just wanted to thank miwi and everyone else for their hard work.

Successfully recompiled world and kernel with clang to boot!

Currently compiling Xfce4. Can't wait to do some actual testing.

Didn't do a portupgrade. Just recompiled everything from scratch. Had a little trouble with xorg-drivers not pulling in any drivers what so ever. Just had to manually compile xf86-input/video drivers and all is working now.

Hopefully we can get the i910kms driver to successfully unload and reset the video card at some point. Can't wait for syscons integration.


----------



## G_Nerc (Nov 3, 2012)

Hi friends!
Can anybody help me?
I have a Intel Core i5 3210M with HD4000 video.
I'm install FreeBSD 10-Current amd64
Have 
	
	



```
WITH_NEW_XORG=yes
WITH_KMS=yes
```
Install x11-drivers/xf86-video-intel
*kldstat*

```
11    1 0xffffffff8244f000 5f8bd    i915kms.ko
15    1 0xffffffff824b4000 2dd50    drm2.ko
```
*xorg.conf*

```
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        ModulePath   "/usr/local/lib/xorg/modules"
        FontPath     "${prefix}/share/fonts/X11/misc/"
        FontPath     "${prefix}/share/fonts/X11/TTF/"
        FontPath     "${prefix}/share/fonts/X11/OTF/"
        FontPath     "${prefix}/share/fonts/X11/Type1/"
        FontPath     "${prefix}/share/fonts/X11/100dpi/"
        FontPath     "${prefix}/share/fonts/X11/75dpi/"
EndSection

Section "Module"
        Load  "extmod"
        Load  "record"
        Load  "dbe"
        Load  "dri"
        Load  "dri2"
        Load  "glx"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/sysmouse"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Device"
        Identifier  "Card0"
        Driver      "intel"
        BusID       "PCI:0:2:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection
```
When I'm do startx or kldload i915kms, screen blanks and nothing else. But i can login throught ssh, and that is 
*tail Xorg.0.log*

```
[   322.560] (WW) intel(0): drmDropMaster failed: Unknown error: -22
```
Full log on pastebin
*pciconf -lvv*

```
hostb0@pci0:0:0:0:      class=0x060000 card=0x27021558 chip=0x01548086 rev=0x09 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '3rd Gen Core processor DRAM Controller'
    class      = bridge
    subclass   = HOST-PCI
pcib1@pci0:0:1:0:       class=0x060400 card=0x27021558 chip=0x01518086 rev=0x09 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = 'Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI
pcib2@pci0:0:1:1:       class=0x060400 card=0x27021558 chip=0x01558086 rev=0x09 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = 'Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI
vgapci1@pci0:0:2:0:     class=0x030000 card=0x27021558 chip=0x01668086 rev=0x09 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '3rd Gen Core processor Graphics Controller'
    class      = display
    subclass   = VGA
xhci0@pci0:0:20:0:      class=0x0c0330 card=0x27021558 chip=0x1e318086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '7 Series/C210 Series Chipset Family USB xHCI Host Controller'
    class      = serial bus
    subclass   = USB
none0@pci0:0:22:0:      class=0x078000 card=0x27021558 chip=0x1e3a8086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '7 Series/C210 Series Chipset Family MEI Controller'
    class      = simple comms
ehci0@pci0:0:26:0:      class=0x0c0320 card=0x27021558 chip=0x1e2d8086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '7 Series/C210 Series Chipset Family USB Enhanced Host Controller'
    class      = serial bus
    subclass   = USB
hdac0@pci0:0:27:0:      class=0x040300 card=0x27021558 chip=0x1e208086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '7 Series/C210 Series Chipset Family High Definition Audio Controller'
    class      = multimedia
    subclass   = HDA
pcib3@pci0:0:28:0:      class=0x060400 card=0x27021558 chip=0x1e108086 rev=0xc4 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '7 Series/C210 Series Chipset Family PCI Express Root Port 1'
    class      = bridge
    subclass   = PCI-PCI
pcib4@pci0:0:28:2:      class=0x060400 card=0x27021558 chip=0x1e148086 rev=0xc4 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '7 Series/C210 Series Chipset Family PCI Express Root Port 3'
    class      = bridge
    subclass   = PCI-PCI
pcib5@pci0:0:28:3:      class=0x060400 card=0x27021558 chip=0x1e168086 rev=0xc4 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '7 Series/C210 Series Chipset Family PCI Express Root Port 4'
    class      = bridge
    subclass   = PCI-PCI
ehci1@pci0:0:29:0:      class=0x0c0320 card=0x27021558 chip=0x1e268086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '7 Series/C210 Series Chipset Family USB Enhanced Host Controller'
    class      = serial bus
    subclass   = USB
isab0@pci0:0:31:0:      class=0x060100 card=0x27021558 chip=0x1e598086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'HM76 Express Chipset LPC Controller'
    class      = bridge
    subclass   = PCI-ISA
ahci0@pci0:0:31:2:      class=0x010601 card=0x27021558 chip=0x1e038086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '7 Series Chipset Family 6-port SATA Controller [AHCI mode]'
    class      = mass storage
    subclass   = SATA
none1@pci0:0:31:3:      class=0x0c0500 card=0x27021558 chip=0x1e228086 rev=0x04 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '7 Series/C210 Series Chipset Family SMBus Controller'
    class      = serial bus
    subclass   = SMBus
vgapci0@pci0:1:0:0:     class=0x030000 card=0x27021558 chip=0x0de910de rev=0xa1 hdr=0x00
    vendor     = 'NVIDIA Corporation'
    device     = 'GF108 [GeForce GT 630M]'
    class      = display
    subclass   = VGA
none2@pci0:4:0:0:       class=0x028000 card=0x072610ec chip=0x872310ec rev=0x00 hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    class      = network
none3@pci0:5:0:0:       class=0xff0000 card=0x27021558 chip=0x528910ec rev=0x01 hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
re0@pci0:5:0:2: class=0x020000 card=0x27021558 chip=0x816810ec rev=0x0a hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8111/8168B PCI Express Gigabit Ethernet controller'
    class      = network
    subclass   = ethernet
```
*/var/log/messages*

```
Nov  3 18:03:32 MYBSD kernel: drmn1: <Intel IvyBridge (M)> on vgapci1
Nov  3 18:03:32 MYBSD kernel: info: [drm] MSI enabled 1 message(s)
Nov  3 18:03:32 MYBSD kernel: info: [drm] AGP at 0xd0000000 256MB
Nov  3 18:03:32 MYBSD kernel: iicbus0: <Philips I2C bus> on iicbb0 addr 0xff
Nov  3 18:03:32 MYBSD kernel: iic0: <I2C generic I/O> on iicbus0
Nov  3 18:03:32 MYBSD kernel: iic1: <I2C generic I/O> on iicbus1
Nov  3 18:03:32 MYBSD kernel: iicbus2: <Philips I2C bus> on iicbb1 addr 0xff
Nov  3 18:03:32 MYBSD kernel: iic2: <I2C generic I/O> on iicbus2
Nov  3 18:03:32 MYBSD kernel: iic3: <I2C generic I/O> on iicbus3
Nov  3 18:03:32 MYBSD kernel: iicbus4: <Philips I2C bus> on iicbb2 addr 0xff
Nov  3 18:03:32 MYBSD kernel: iic4: <I2C generic I/O> on iicbus4
Nov  3 18:03:32 MYBSD kernel: iic5: <I2C generic I/O> on iicbus5
Nov  3 18:03:32 MYBSD kernel: iicbus6: <Philips I2C bus> on iicbb3 addr 0xff
Nov  3 18:03:32 MYBSD kernel: iic6: <I2C generic I/O> on iicbus6
Nov  3 18:03:32 MYBSD kernel: iic7: <I2C generic I/O> on iicbus7
Nov  3 18:03:32 MYBSD kernel: iicbus8: <Philips I2C bus> on iicbb4 addr 0xff
Nov  3 18:03:32 MYBSD kernel: iic8: <I2C generic I/O> on iicbus8
Nov  3 18:03:32 MYBSD kernel: iic9: <I2C generic I/O> on iicbus9
Nov  3 18:03:32 MYBSD kernel: iicbus10: <Philips I2C bus> on iicbb5 addr 0xff
Nov  3 18:03:32 MYBSD kernel: iic10: <I2C generic I/O> on iicbus10
Nov  3 18:03:32 MYBSD kernel: iic11: <I2C generic I/O> on iicbus11
Nov  3 18:03:32 MYBSD kernel: iicbus12: <Philips I2C bus> on iicbb6 addr 0xff
Nov  3 18:03:32 MYBSD kernel: iic12: <I2C generic I/O> on iicbus12
Nov  3 18:03:32 MYBSD kernel: iic13: <I2C generic I/O> on iicbus13
Nov  3 18:03:32 MYBSD kernel: iicbus14: <Philips I2C bus> on iicbb7 addr 0xff
Nov  3 18:03:32 MYBSD kernel: iic14: <I2C generic I/O> on iicbus14
Nov  3 18:03:32 MYBSD kernel: iic15: <I2C generic I/O> on iicbus15
Nov  3 18:03:32 MYBSD kernel: info: [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
Nov  3 18:03:32 MYBSD kernel: info: [drm] Driver supports precise vblank timestamp query.
Nov  3 18:03:33 MYBSD kernel: drmn1: taking over the fictitious range 0xd0000000-0xe0000000
Nov  3 18:03:33 MYBSD kernel: info: [drm] Initialized i915 1.6.0 20080730
```


----------



## G_Nerc (Nov 5, 2012)

UPD. All works now, just with changed *xorg.conf*


----------



## cartola (Nov 6, 2012)

Hi,

can you tell us what changes did you make in the xorg.conf? My screen blanks too...

Thanks, Cartola.


----------



## Naval (Feb 25, 2016)

Good Day to All,
I'm new to FreeBSD and new to forum.
Several days ago I do shift from GNU/Linux to FreeBSD and installed 10.2 RELEASE to mine laptop.

All softaware, including *xorg*, *kde* and rest related was installed from packages, not ports.

Mine system equipped with the Intel GMA graphic.

KDE installed and works.

xorg.conf not configured, as I do receive blank screen. Xorg using built-in settings.

The log from X.org showed (EE)rror on fbdev. Error gone after install of xf86-video-fbdev, but appeared new one EE - absence of fddev*hw*

If I do disable load of fbdev - startx not starting.

Actually all woriking, but I wish to remove EE from logs of X.Org.

*===*

So, questions are following:
1. Are the fbdev required for intel card?
2. Are the 
	
	



```
WITH_NEW_XORG="YES"
```
 and 
	
	



```
WITH_KMS="YES"
```
 included in xorg from packages?
2. Do I need to consider rebuilding xorg from ports using those options in q.no.2?
3. Maybe required some additional drivers form fbdev*hw*?

_I'm sorry for questions, which might be dummy for freebsd professionals, but they are essential to me.

Thanks beforehands for reply,_


----------



## Maxnix (Feb 25, 2016)

Naval said:


> 1. Are the fbdev required for intel card?


No, x11-drivers/xf86-video-fbdev is an alternative driver. If your graphic card is supported you do not need it (and however you would prefer x11-drivers/xf86-video-vesa instead).



Naval said:


> 2. Do I need to consider rebuilding xorg from ports using those options in q.no.2?


Both WITH_NEW_XORG="YES" and WITH_KMS="YES" are not needed anymore. You do not have to recompile anything.


----------



## Maxnix (Feb 25, 2016)

Give a look here even, perhaps can help: https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x-config.html


----------



## wblock@ (Feb 25, 2016)

Please start new threads for this type of question.  This particular one is four years old.


----------

