# intel 855GM - Dual Head How To

## mxc

Hi all,

This is sort of a work in progress but thought I would let people know what I have managed to do so as to get some help on the outstanding issues.

Problem

I have a Dell Inspiron 510M which has the following graphics card

```
0000:00:00.0 Host bridge: Intel Corp. 82852/855GM Host Bridge (rev 02)

0000:00:00.1 System peripheral: Intel Corp. 855GM/GME GMCH Memory I/O Control Registers (rev 02)

0000:00:00.3 System peripheral: Intel Corp. 855GM/GME GMCH Configuration Process Registers (rev 02)

0000:00:02.0 VGA compatible controller: Intel Corp. 82852/855GM Integrated Graphics Device (rev 02)

0000:00:02.1 Display controller: Intel Corp. 82852/855GM Integrated Graphics Device (rev 02)

```

Since its a laptop and I use it for presentations I would like to be able to view both the LCD and a projector at the same time.

History

I originally did a fresh install of gentoo and got XFree86 working. It was the Xfree86 4.3 version.  I didn't need to do anything fancy and assumed that the ability to display on the LCD and through a projector at the same time was  completely a hardware thing that didn't require any additional work. I soon realised my mistake when I tried my first presentation on the machine. If I used the <fn><f8> keys the image would switch from the lcd to the monitor but the image would be corrupted and the mouse pointer would dissapear. I could cycle back to the lcd but the image would remain corrupted. I could not get the screen to display simultaneouslly on the lcd and projector. After some research it appeared that the ability to display simulatenously depended on the driver used by X. Sadly Xfree4.3 did not support the dual-head functionality, as it is know, for the intel chipset. I did find out that intel had a driver out for linux to support this card and it claimed it supported dual-head. Also the next release of X was to  have support for the dual-head on the i830 chipsets as well. This is what I did.

1) Upgraded Kernel to 2.6 and compiled in the following:

under device drivers->character devices select

                     <M> /dev/agpgart (AGP Support)                                                               

                        <M>   Intel 440LX/BX/GX, I8xx and E7x05 chipset support                                      

                        <M>   Intel i865 chipset support                                                             

                       [*] Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)                          

                          <M>   Intel 830M, 845G, 852GM, 855GM, 865G   

Other people have suggested that the  option

   < > Intel/AMD/VIA HW Random Number Generator support    

needs to be compiled as well. I just got errors though when this option was compiled as a module or into the kernel so I left it out.

2) Switched to Xorg and upgraded to Xorg-6.8

The latest version of XFree and Xorg now have better support for the 855GM chipset in the form of the i830 driver support. Since gentoo is not going to support XFree its best to bite the bullet and move. As far as I can tell X is reliant on the kernel video drivers (see above) but needs to also have some support built into X as well. Otherwise I assume you could just have recompiled the kernel to get the new driver. 

3) Intalled intel drivers Installing the intel drivers proved to be a challenge. I finally managed to get them to compile and have recorded what I did  at https://bugs.gentoo.org/show_bug.cgi?id=59490 This driver will install a module called gdg.ko and upgrade the agpgart driver. I am not sure how this all interacts with the i830 driver in the kernel. It looks like it adds functionality to it as X loads both for you.

4) Changes to modules.autoload (not)

I initially made changes to modules.autoload.d/kernel2.6 to autoload the i830 and gdg moudles. This generated error messages when the machine booted so I took them out. It seems X automatically loads these modules once it starts as a lsmod showed that both i830 and gdg where loaded. I was not sure if gdg was to replace the i830 driver but it seems X needs both of them. Note: Changes to xorg device section to use the "gdg" or "i830" instead of "i810" as the driver just caused errors. The "i810" driver includes the "i830" driver and this is what should be used in the xorg.conf file.

5) Setup /etc/xorg.conf

To get the ability to do simultaneous display I needed to add the following option to the xorg.conf file in the device section

Option "monitorlayout" "CRT,LFP"

 The documentation on this option, http://freedesktop.org/~xorg/X11R6.8.0/doc/i810.4.html,is a bit vague and I had to play around to get it to work. I found that if I put the option as "LFD,CRT" it wouldn't work and PIPEA would become disabled. (I saw this in /var/log/xorg.0.log) By changing it around as above I could get the image on a CRT and the LCD at the same time.

6) Outstanding issues

a) If I cycle the <fn><f8> keys -eventually the crt diplay is corrupted and the mouse pointer disappers. 

b) Once the image is displaying on both screens I can't get it to display on one display only.

i.e <crt> => <crt><lcd> => <lcd> does not work.

c) While researching it appears that the "monitorlayout" option is slightly different from the "clone" option. As I understand it one can use the pipea and pipeb to display different areas of yor desktop. If this is so I would like to get it to work.

d) I have no idea what the driver manual means by using an option like "CRT+LFP,LFP" but it sounds cool.

e) Do I need to set up different monitor,screen sections for the lcd and crt in xorg.conf?

If anyone has additional info to get this dual-head functionality working 100% it would be great.

Thanks

----------

## apoirier

Hi,

On my 510m laptop, I use i855crt (http://sourceforge.net/projects/i855crt) to manage the crt output.

Working fine with XFree or Xorg.

Before to launch it, I set the LCD resolution to a compatible one with the projector, simply using the KDE control panel (projector doesn't like in general 1400x1050).

Regards

----------

## tdi

but how did you both manage to get direct rendering on xorg ? ive got latitude d500 with the same chip

----------

## Koxta

Do you really need intel drivers to activate dual head? Can't I use dri drivers included in xorg?

Regards,

Koxta

----------

## Koxta

bump

----------

## bonbons

 *tdi wrote:*   

> but how did you both manage to get direct rendering on xorg ? ive got latitude d500 with the same chip

 

I'm on Acer TM660 with i855GME, and have DRI working (but with VERY POOR performance...)

For it to work, Xorg needs to be set to single-screen mode, DRI support compiled into Kernel, and activated in xorg.conf.

```
Section "Module"

    ...

    Load "dri"

    Load "glx"

EndSection
```

 *apoirier wrote:*   

> On my 510m laptop, I use i855crt (http://sourceforge.net/projects/i855crt) to manage the crt output.

 

I did get the CRT to work with i855crt as well, but needs to be same resolution as LDP... The cool thing would be to have X work correctly and not fail on a VBIOS call! As the aim is to have dual-screen, not just cloning.

By the way, fullscreen seems not to work while i855crt has activated the CRT! (Wesnoth crashes each time I tell it to change to full-screen!)

 *mxc wrote:*   

> If I cycle the <fn><f8> keys -eventually the crt diplay is corrupted and the mouse pointer disappers.

 The equivalent key does not work at all for my Acer when running Linux, is probably some event sent to the kernel/driver once that key is hit, but don't known how to get it... I would like to hide i855crt behind until Xorg gets it to work on it's own!

What I don't know either is how X should be expected to work in dual-head mode once the CRT is disconnected...

I tried the Intel driver, but this one fails when it should return to X (when I did switch to console)

In addition I could not run glxgears to test OpenGL performance, it was always complaining about not being able to get RGB-double-buffered memory  :Sad: 

DualHead didn't work either:

I always get this error:

```
Exended BIOS function 0x5f64 failed
```

The only thing I might need to try is disably the vBIOS patching at boot which enables my 1400x1050 resolution...

----------

## BlinkEye

to get dual head do the following:

1. download i855cft

2. tar xvzf i855crt-0.4.tar.gz

3. edit the xorg.conf section:

```
Section "Module"

    Load  "type1"

    Load  "freetype"

    Load  "dri"

EndSection
```

REMARK: if enabling glx my system crashes, that's why i don't load the glx module

```
Section "Device"

    Identifier  "i810"

    Driver "i810"

    Option "SWCursor" "1"
```

```
 Section "DRI"

    Mode 0666

 EndSection
```

that's it. restart X, as root 

```
cd /path/to/i855crt-0.4
```

and now execute

```
./i855crt swcursor overlaycrt on 1024x768@85
```

and behold dual head! if you get problems with your mouse pointer take a glance at the README - it's a good README. 

what i haven't achieved yet is exporting a resolution bigger than the one i use on the laptop. i don't know if this is even possible ...

[EDIT]

For easy use open up your /root/.bashrc and add

```
function dualhead

{

        echo $1

        cd ~/i855crt-0.4

        ./i855crt swcursor overlaycrt on 1024x768@$1

        cd -

}
```

source your new .bashrc:

```
source /root/.bashrc
```

and use your new function dualhead:

```
dualhead Hz
```

replace Hz with your desired refresh rate on the external monitor/beamer. if you don't have i855crt-0.4 placed in /root/ you must change the line

```
cd ~/i855crt-0.4
```

accordingly.

[/EDIT]

----------

## bonbons

 *BlinkEye wrote:*   

> to get dual head do the following:
> 
> 1. download i855cft
> 
> 2. tar xvzf i855crt-0.4.tar.gz
> ...

 

As far as I got out, i855crt does just create a copy of the screen to the other head. This works with "MonitorLayout ldp+crt" in xorg.conf...

What I'm looking for is having two screens so I can put some apps on one screen, some on the second one! E.g. presentation on second head, but my classic desktop on the main screen!

Does anyone know why X does not allow DRI in xinerama mode?

----------

## BlinkEye

 *bonbons wrote:*   

> 
> 
> As far as I got out, i855crt does just create a copy of the screen to the other head. This works with "MonitorLayout ldp+crt" in xorg.conf...
> 
> What I'm looking for is having two screens so I can put some apps on one screen, some on the second one! E.g. presentation on second head, but my classic desktop on the main screen!
> ...

 

i see, i obviously used the word dual head wrong - as did the original poster. so, maybe we should change the subject to "how to get vga out working" ...

besides, "MonitorLayout ldp+crt"  doesn't work for me

----------

## _hephaistos_

hi guys!

I'm looking for a dualhead solution very long too  :Smile: 

so I found this:

https://bugs.freedesktop.org/show_bug.cgi?id=1064

and I get the same errors...

hope they will bring a fix in the next release...

cheers

----------

## bonbons

 *hephaistos6 wrote:*   

> I'm looking for a dualhead solution very long too 
> 
> so I found this:
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=1064
> ...

 

I did try the two pre-releases 8.1.9x in portage but non fixes it. I did also find the Bug-entry on freedesktop, and it looks like nobody from the X.org team wants to take over the task, the bug is still not assigned.

If anyone from the Gentoo X-devs knows how i810 works and is willing to try fixing the issue, please do! If I am right, i810crt is able to activate the second pipe!

----------

## _hephaistos_

hi!

yes, I saw that the bug is not assigned currently.

but the bug-report is from 2005-01-10 -> just 18 ays, so I thought they might fix it in the next release...

bug if any xorg gentoo-dev is able to find the problem!! we will really be happy  :Smile: 

cheers

----------

## bonbons

 *hephaistos6 wrote:*   

> yes, I saw that the bug is not assigned currently.
> 
> but the bug-report is from 2005-01-10 -> just 18 ays, so I thought they might fix it in the next release...

 

Read carefuly, bug was opened on 2004-08-12, but just last comment was on 2005-01-10!

----------

## _hephaistos_

ok. sorry - you are right. I didn't read carefully  :Sad: 

cheers

----------

## _hephaistos_

SO BUMP:

 very goood news!

I wrote to the mailing list concerning this "old-and-still-unassigned" bugreport.

And a developer, Alan Hourihane, sent me a working driver (and gave me the permission to redistribute it).

So, Dualhead works perfect for me now!

If anyone is interested in the driver >> please pm me.

cheers

----------

