# unable to set the resolution + bad slow referesh



## behzad (Dec 27, 2011)

I am not able to set the resolution to "1366x768" (which is the correct value according to my linux and windows installations), and besides that the screen looks very ugly and it is very slow in refreshing,

The Xorg.0.log says 


```
(II) VESA(0): Monitor0: Using hsync value of 47.41 kHz
(II) VESA(0): Monitor0: Using vrefresh value of 60.01 Hz
(II) VESA(0): Not using mode "1366x768" (no mode of this name)
```

I have no idea if this is a driver problem or a configuration problem. I am attaching both Xorg.0.log and xorg.conf in case it's helpful.


----------



## behzad (Dec 27, 2011)

*Edit: graphics hardware*


```
description: VGA compatible controller
product: Core Processor Integrated Graphics Controller
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 18
width: 64 bits
clock: 33MHz
capabilities: vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
```


----------



## bbzz (Dec 27, 2011)

Please post code on something like github.


----------



## adamk (Dec 27, 2011)

Your GPU requires the GEM/KMS patches for newer Intel GPUs:  http://wiki.freebsd.org/Intel_GPU


----------



## behzad (Dec 27, 2011)

adamk said:
			
		

> Your GPU requires the GEM/KMS patches for newer Intel GPUs:  http://wiki.freebsd.org/Intel_GPU



Thanks, but how should I apply these patches? Can you help me out here because I am new to bsd FreeBSD. So I did [cmd=]git clone git://anongit.freedesktop.org/xorg/proto/dri2proto[/cmd] and I did the same for the other packages, and applied the mentioned patch.

Yet there is no configure file inside the folders but configure.ac and autogen.sh. Should I just run *autogen.sh*?

P.S. 1- I cannot find any ab10008 for xf86-video-intel. This is very ambiguous to me.
P.S. 2- I am working with freebsd FreeBSD 9, if that matters.


----------



## pkubaj (Dec 29, 2011)

Why are you trying to make things more difficult by downloading from git? Just use https://trillian.chruetertee.ch/svn/ports/branches/xorg-dev Then run xorgmerge script  ( http://people.freebsd.org/~miwi/xorg/xorgmerge ), and upgrade your ports. As wiki states ( http://wiki.freebsd.org/Intel_GPU ), the patches are against HEAD. 9.0 isn't HEAD, 10.0 is. If you'd like to keep using 9.0, there are backported patches for 9.0 at http://tsatsenko.ru/files/


----------



## behzad (Dec 30, 2011)

pkubaj said:
			
		

> Why are you trying to make things more difficult ...



I did


```
# svn co https://trillian.chruetertee.ch/svn/ports/branches/xorg-dev
# wget http://people.freebsd.org/~miwi/xorg/xorgmerge

# chmod u+x xorgmerge
# ./xorgmerge

# portupgrade -a
```

but nothing changed!

Is there anything so obvious to do that is not mentioned on http://miwi.bsdcrew.de/2011/02/cft-xorg-7-5-miwi1-freebsd-edition/ and I am missing it?

I am attaching Xorg.0.log, it has a line which says 

```
(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support"
```

Does it mean there is anything wrong in the configuration?


----------



## pkubaj (Dec 30, 2011)

You must edit KDEDIR variable in xorgmerge.


----------



## behzad (Dec 31, 2011)

pkubaj said:
			
		

> You must edit KDEDIR variable in xorgmerge.



Again thanks, I missed that line,

However, now the problem is that xf86-video-intel does not compile.

I did a fresh install of FreeBSD, and applied above patch before installing anything, still when I want to install X11/xorg, xf86-video-intel does not compile.

This is what I get 


```
===>  Building for xf86-video-intel-2.7.1_4
make  all-recursive
Making all in uxa
Making all in src
make  all-recursive
Making all in xvmc
make  all-am
Making all in bios_reader
Making all in ch7017
Making all in ch7xxx
Making all in ivch
Making all in sil164
Making all in tfp410
Making all in reg_dumper

     .
 'skipped'
     .

i830_video.c: In function 'I830InitVideo':
i830_video.c:590: warning: 'Xalloc' is deprecated (declared at /usr/local/include/xorg/os.h:222)
i830_video.c:660: warning: 'Xfree' is deprecated (declared at /usr/local/include/xorg/os.h:235)
i830_video.c: In function 'I830SetupImageVideoOverlay':
i830_video.c:845: warning: 'Xcalloc' is deprecated (declared at /usr/local/include/xorg/os.h:226)
i830_video.c: In function 'I830SetupImageVideoTextured':
i830_video.c:972: warning: 'Xcalloc' is deprecated (declared at /usr/local/include/xorg/os.h:226)
i830_video.c:973: warning: 'Xcalloc' is deprecated (declared at /usr/local/include/xorg/os.h:226)
i830_video.c:974: warning: 'Xcalloc' is deprecated (declared at /usr/local/include/xorg/os.h:226)
i830_video.c:975: warning: 'Xcalloc' is deprecated (declared at /usr/local/include/xorg/os.h:226)
i830_video.c:979: warning: 'Xfree' is deprecated (declared at /usr/local/include/xorg/os.h:235)
i830_video.c:980: warning: 'Xfree' is deprecated (declared at /usr/local/include/xorg/os.h:235)
i830_video.c:981: warning: 'Xfree' is deprecated (declared at /usr/local/include/xorg/os.h:235)
i830_video.c:982: warning: 'Xfree' is deprecated (declared at /usr/local/include/xorg/os.h:235)
i830_video.c: In function 'i830_fill_colorkey':
i830_video.c:2167: error: 'WindowTable' undeclared (first use in this function)
i830_video.c:2167: error: (Each undeclared identifier is reported only once
i830_video.c:2167: error: for each function it appears in.)
i830_video.c:2179: warning: passing argument 1 of 'ChangeGC' from incompatible pointer type
i830_video.c:2179: warning: passing argument 2 of 'ChangeGC' makes pointer from integer without a cast
i830_video.c:2179: warning: passing argument 3 of 'ChangeGC' makes integer from pointer without a cast
i830_video.c:2179: error: too few arguments to function 'ChangeGC'
i830_video.c:2182: warning: 'Xalloc' is deprecated (declared at /usr/local/include/xorg/os.h:222)
i830_video.c:2194: warning: 'Xfree' is deprecated (declared at /usr/local/include/xorg/os.h:235)
i830_video.c: In function 'I830AllocateSurface':
i830_video.c:2751: warning: 'Xalloc' is deprecated (declared at /usr/local/include/xorg/os.h:222)
i830_video.c:2753: warning: 'Xalloc' is deprecated (declared at /usr/local/include/xorg/os.h:222)
i830_video.c:2754: warning: 'Xfree' is deprecated (declared at /usr/local/include/xorg/os.h:235)
i830_video.c:2757: warning: 'Xalloc' is deprecated (declared at /usr/local/include/xorg/os.h:222)
i830_video.c:2758: warning: 'Xfree' is deprecated (declared at /usr/local/include/xorg/os.h:235)
i830_video.c:2759: warning: 'Xfree' is deprecated (declared at /usr/local/include/xorg/os.h:235)
i830_video.c: In function 'I830FreeSurface':
i830_video.c:2803: warning: 'Xfree' is deprecated (declared at /usr/local/include/xorg/os.h:235)
i830_video.c:2804: warning: 'Xfree' is deprecated (declared at /usr/local/include/xorg/os.h:235)
i830_video.c:2805: warning: 'Xfree' is deprecated (declared at /usr/local/include/xorg/os.h:235)
i830_video.c: In function 'I830InitOffscreenImages':
i830_video.c:2889: warning: 'Xalloc' is deprecated (declared at /usr/local/include/xorg/os.h:222)
*** Error code 1

Stop in /usr/ports/x11-drivers/xf86-video-intel/work/xf86-video-intel-2.7.1/src.
*** Error code 1

Stop in /usr/ports/x11-drivers/xf86-video-intel/work/xf86-video-intel-2.7.1/src.
*** Error code 1

Stop in /usr/ports/x11-drivers/xf86-video-intel/work/xf86-video-intel-2.7.1/src.
*** Error code 1

Stop in /usr/ports/x11-drivers/xf86-video-intel/work/xf86-video-intel-2.7.1.
*** Error code 1

Stop in /usr/ports/x11-drivers/xf86-video-intel/work/xf86-video-intel-2.7.1.
*** Error code 1

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


----------



## behzad (Jan 5, 2012)

I am confused in here. Some threads and posts claim that intel drivers do not yet work in FreeBSD and one needs to stick to vesa drivers which work dismally. Then we have got http://wiki.freebsd.org/Intel_GPU patch and stuff which at least in my case they don't work either.

Can somebody explain for me what is the status of intel graphics (particularity i915) in FreeBSD 9? Is it going to change any time soon? What are the options for someone who has got i915?

P.S. I tried to install xf86-video-intel29 but that didn't compile either.


----------



## shaman (Jan 6, 2012)

Did you try install with *pkg_add*?


----------



## behzad (Jan 7, 2012)

shaman said:
			
		

> Did you try install with pkg_add ?



It will install, but then it will not work. Running 

`# Xorg -configure` 

will produce some errors, among them that WindowTable is undeclared (or unknown?!)


----------

