# Intel GMA



## Xenon (Nov 2, 2011)

Hello everyone,

I decided to install FreeBSD 8.2 Generic to a machine I bought recently. Everything seems to be performing well except for the graphics card, which as you can see in the title, is an Intel HD GMA integrated graphics card. There are two video outputs, a VGA and an HDMI, I am currently using the HDMI output at 1280x768 resolution.

I've compiled Xorg (Just standard Xorg, NOT Xorg-server) from ports with no errors, which installed the x11-drivers/xf86-intel-video driver. Simply running a "startx", everything checks out fine. Resolution is okay, a little bit grainy, but okay. 

So I then installed gnome2 from packages with "pkg_add -r gnome2". Starting GDM from the console worked fine, resolution is still okay. But I am finding that the graphics are VERY choppy. If I open Firefox, I can't move my mouse across the screen without it lagging. So I compiled Chromium from ports, thinking it could just be Firefox, but the same thing, with pretty much every program.

I tried to generate and edit my Xorg.conf file to no avail. Setting the Horizonal and Vertical refresh rates and the default depth and modes, all that. In my generated Xorg.conf, the driver listed as in use it "vesa".

Is my hardware just not very well supported, or did Xorg try to configure Xorg.conf with the wrong driver? I read in another thread that people were using Xorg-server with Mesa 7.x and they said they had no issues. Is my problem that I am using Xorg instead of Xorg-server and without Mesa? 

Should I try and use Xorg-server with Mesa 7.x and xf86-intel-video? Or will that not make any real difference in performance at all? Any suggestions are appreciated, I've tried everything I can think of. I would just like some confirmation if Xorg-server and Mesa is the way to go or if I am stuck. 

- Thanks.


----------



## wblock@ (Nov 2, 2011)

Xenon said:
			
		

> Hello everyone,
> 
> I decided to install FreeBSD 8.2 Generic to a machine I bought recently. Everything seems to be performing well except for the graphics card, which as you can see in the title, is an Intel HD GMA integrated graphics card. There are two video outputs, a VGA and an HDMI, I am currently using the HDMI output at 1280x768 resolution.
> 
> I've compiled Xorg (Just standard Xorg, NOT Xorg-server)



xorg-server is part of xorg.



> from ports with no errors, which installed the x11-drivers/xf86-intel-video driver. Simply running a "startx", everything checks out fine. Resolution is okay, a little bit grainy, but okay.



It's using the vesa driver.



> So I then installed gnome2 from packages with "pkg_add -r gnome2". Starting GDM from the console worked fine, resolution is still okay. But I am finding that the graphics are VERY choppy. If I open Firefox, I can't move my mouse across the screen without it lagging. So I compiled Chromium from ports, thinking it could just be Firefox, but the same thing, with pretty much every program.



The vesa driver is slow.  The intel driver has acceleration but needs KMS, which is a work in progress on FreeBSD.



> Is my hardware just not very well supported, or did Xorg try to configure Xorg.conf with the wrong driver? I read in another thread that people were using Xorg-server with Mesa 7.x and they said they had no issues. Is my problem that I am using Xorg instead of Xorg-server and without Mesa?



xorg-server is a major component of xorg, you're already using it.  Mesa is for 3D acceleration.  See http://wiki.freebsd.org/Intel_GPU for more information about the Intel KMS work.


----------



## SirDice (Nov 2, 2011)

Try x11-drivers/xf86-video-intel29, it's slightly newer then x11-drivers/xf86-video-intel.


----------



## Xenon (Nov 2, 2011)

Okay, so the problem is the lack of KMS support and that the Vesa driver is just slow, then. I tried to deinstall the intel-2.7 driver and upgrade the intel-2.9 driver, now X doesn't start at all. I checked the Xorg logfile, and got a few errors, the main one of concern being:

"Failed to open DRM device on pci0000:02.0: File exists"

So, I then checked if the kernel modules were loaded using kldstat, both i915.ko and drm.ko were auto loaded. So I tried to unload and re-load them manually, then startx, same error from Xorg.

The other error Xorg spat out was:

"Screen(s) detected, but no useable configuration was found."

So, looks like I am waiting for new drivers then? The vesa driver isn't unusable, but it certainly is very slow.


----------



## wblock@ (Nov 2, 2011)

Please put /var/log/Xorg.0.log on pastebin.com and post a link here.


----------



## Xenon (Nov 2, 2011)

My Xorg.0.log file: 

http://pastebin.com/tAg8uSGA

The errors start to occur on line 154.


----------



## SirDice (Nov 3, 2011)

Can you post your xorg.conf too?


----------



## Xenon (Nov 3, 2011)

I'm not currently using an Xorg configuration file. If I auto-generate one, the same errors occur and no difference is made.


----------



## T-Daemon (Nov 4, 2011)

http://pastebin.com/tAg8uSGA


```
â€¦
173. drmOpenDevice: [color="Red"]node name is /dev/dri/card0[/color]
174. Failed to change owner or group for file /dev/dri! 2: No such file or directory
175. [color="Red"]Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory[/color]
176. drmOpenDevice: open result is -1, (No such file or directory)
177. Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
178. drmOpenDevice: open result is -1, (No such file or directory)
179. drmOpenDevice: Open failed
180. [drm] failed to load kernel module "i915"
181. (EE) intel(0): [drm] Failed to open DRM device for pci:0000:00:02.0: File exists
182. (EE) intel(0): Failed to become DRM master.
...
```

The device node for card0 isn't created. Try starting X after creating it manual. Please search for it under /dev, if it's there, link to it. If it isn't there, create a device node. mknod(8)

`# mknod /dev/dri/card0 c 226 0` 

This is a temporal workaround. The node will be cleaned out after a reboot, but let's see if X can be started. If it can't, paste Xorg.0.log again on pastebin.com.


----------



## Xenon (Nov 5, 2011)

Well, now the problem has become that /dev/dri isn't a directory, it can't be created, and therefore creating the device node fails. Any other suggestions? I switched back to the 2.7 driver for the moment...


----------

