# serial/tablet problems

## kingofearth

I bought a convertable tablet laptop a week ago, specifically the Gateway CX210X. I followed the instructions that were on the Ubuntu forum and Linux Questions regarding Gateway tablets, but I can't get it to work. The problem seems to have to do with accessing the serial port.

Doing `cat /dev/ttyS*` gives me:

```
localhost find # cat /dev/ttyS*

cat: /dev/ttyS0: Input/output error

cat: /dev/ttyS1: Input/output error

cat: /dev/ttyS2: Input/output error

cat: /dev/ttyS3: Input/output error

```

I've got the serial drivers compiled into my kernel, and I've even tried the genkernel with everything installed and got the same result.

I have setserial run on boot with the following config file:

```

/dev/ttyS0 autoconfig

/dev/ttyS0 uart 16450 port 0x3F8 irq 4

/dev/ttyS1 uart 16450 port 0x2F8 irq 3

/dev/ttyS2 uart 16450 port 0x3E8 irq 4

/dev/ttyS3 uart 16450 port 0x2E8 irq 3

```

and cat /proc/ioports gives me:

```

eric@localhost /tmp $ cat /proc/ioports

0000-001f : dma1

0020-0021 : pic1

0040-0043 : timer0

0050-0053 : timer1

0060-006f : keyboard

0070-0077 : rtc

0080-008f : dma page reg

00a0-00a1 : pic2

00c0-00df : dma2

00f0-00ff : fpu

01f0-01f7 : ide0

02e8-02ef : serial

02f8-02ff : serial

03c0-03df : vga+

03e8-03ef : serial

03f6-03f6 : ide0

03f8-03ff : serial

0cf8-0cff : PCI conf1

1000-107f : 0000:00:1f.0

  1000-107f : motherboard

    1000-1003 : ACPI PM1a_EVT_BLK

    1004-1005 : ACPI PM1a_CNT_BLK

    1008-100b : ACPI PM_TMR

    1020-1020 : ACPI PM2_CNT_BLK

    1028-102f : ACPI GPE0_BLK

1180-11bf : 0000:00:1f.0

  1180-11bf : motherboard

1640-164f : motherboard

1800-1807 : 0000:00:02.0

1810-181f : 0000:00:1f.1

  1810-1817 : ide0

1820-183f : 0000:00:1d.0

  1820-183f : uhci_hcd

1840-185f : 0000:00:1d.1

  1840-185f : uhci_hcd

1860-187f : 0000:00:1d.2

  1860-187f : uhci_hcd

1880-189f : 0000:00:1d.3

  1880-189f : uhci_hcd

18b0-18bf : 0000:00:1f.2

  18b0-18bf : ahci

18c0-18c3 : 0000:00:1f.2

  18c0-18c3 : ahci

18c4-18c7 : 0000:00:1f.2

  18c4-18c7 : ahci

18c8-18cf : 0000:00:1f.2

  18c8-18cf : ahci

18d0-18d7 : 0000:00:1f.2

  18d0-18d7 : ahci

18e0-18ff : 0000:00:1f.3

  18e0-18ff : i801_smbus

2000-2fff : PCI Bus #02

  2000-201f : 0000:02:00.0

    2000-201f : e1000

3000-3fff : PCI Bus #03

4000-4fff : PCI Bus #04

  4000-40ff : PCI CardBus #05

  4400-44ff : PCI CardBus #05

fe00-fe00 : motherboard

```

So I think setserial has the correct ports, and it doesn't give any errors when booting up so I've run out of things to check, so if any one has some recommendations (other than getting a different tablet) I'd appreciate it. And if nothing else I'm sure there'll be support for it in a few months or so, Linux is generally pretty good to me when it comes to that stuff  :Smile: 

----------

## gustafson

Any luck?

----------

## sedorox

gustafson's been in PM with me for a few weeks now. I will be posting an updated HOWTO once I get the time and everything together (and updated... my base system is so out of date (for ~x86 anyway)). 

Honestly, you need windows for this, or at least thats how I got my information. Everything I found and looked up, everyone has a different port value they put in set serial. mine is 0x06a8. Once I got this out of windows, I was able to get the table working in linux/xorg following the posting on linux questions. Hope this helps.

----------

## kingofearth

Thank you,  I set the serial port to 0x06a8 and now when I touch the screen with the pen the mouse starts moving randomly around the screen. So I guess the serial port part of the problem is solved, but my xorg.conf seems to be messed up. I used the one that I found on the ubuntu forum. Heres what I have for my touchscreen:

```
Section "InputDevice"

Identifier "Tablet"

Driver "fpit"

Option "Device" "/dev/ttyS0"

Option "AlwaysCore" "on"

Option "InvertY"

Option "MaximumXPosition" "12550"

Option "MaximumYPosition" "7650"

Option "MinimumXPosition" "400"

Option "MinimumYPosition" "400"

Option "SendCoreEvents"

EndSection

```

Whats your xorg.conf look like?

----------

## gustafson

 :Shocked:  (My wife made me add this!  Small price for gooffing off on a Saturday)

Hey guys, it seems we are cross posting here and linuxquestions now... for the benefit of other gentoo users, here is my xorg.conf which I worked out with the help of sedorox.

```
Section "ServerLayout"

   Identifier     "X.org Configured"

   Screen      0  "Screen0" 0 0

   InputDevice    "Mouse0" "CorePointer"

   InputDevice "Tablet"

   InputDevice    "Keyboard0" "CoreKeyboard"

    Option   "blank time"   "1"

    Option   "standby time"   "2"

    Option   "suspend time"   "3"

    Option   "off time"   "6"

EndSection

Section "Files"

   RgbPath      "/usr/share/X11/rgb"

   ModulePath   "/usr/lib/xorg/modules"

   FontPath     "/usr/share/fonts/misc/"

   FontPath     "/usr/share/fonts/TTF/"

   FontPath     "/usr/share/fonts/OTF"

   FontPath     "/usr/share/fonts/Type1/"

   FontPath     "/usr/share/fonts/CID/"

   FontPath     "/usr/share/fonts/100dpi/"

   FontPath     "/usr/share/fonts/75dpi/"

EndSection

Section "Module"

   Load  "glx"

   Load  "extmod"

   Load  "xtrap"

   Load  "record"

   Load  "dbe"

   Load  "dri"

   Load  "freetype"

   Load  "type1"

EndSection

Section "InputDevice"

   Identifier  "Keyboard0"

   Driver      "kbd"

EndSection

Section "InputDevice"

   Identifier  "Mouse0"

   Driver      "mouse"

   Option       "Protocol" "auto"

   Option       "Device" "/dev/input/mice"

   Option       "ZAxisMapping" "4 5 6 7"

EndSection

Section "InputDevice"

   Identifier  "Tablet"

   Driver      "fpit"

   Option      "Device"           "/dev/ttyS0"

   Option      "AlwaysCore"       "on"

   Option      "InvertY"

   Option      "MaximumXPosition" "12550"

   Option      "MaximumYPosition" "7650"

   Option      "MinimumXPosition" "400"

   Option      "MinimumYPosition" "400"

   Option      "SendCoreEvents"

EndSection

Section "Monitor"

   #DisplaySize     300   180   # mm

   Identifier   "Monitor0"

   VendorName   "SEC"

   ModelName    "3257"

  Option  "DPMS"  "true"

EndSection

Section "Device"

   Identifier  "Card0"

   Driver      "i810"

   VendorName  "Intel Corporation"

   BoardName   "Mobile 945GM/GMS/940GML Express Integrated Graphics Controller"

   BusID       "PCI:0:2:0"

EndSection

Section "Screen"

   Identifier "Screen0"

   Device     "Card0"

   Monitor    "Monitor0"

   SubSection "Display"

      Viewport   0 0

      Depth     1

           EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     4

           EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     8

           EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     15

           EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     16

           EndSubSection

   SubSection "Display"

      Viewport   0 0

      Depth     24

          EndSubSection

EndSection
```

Also, my serial.conf works best with:

```
/dev/ttyS0 uart 8250 port 0x06a8 baud_base 38400
```

Credit sedorox for the suggestion.Last edited by gustafson on Mon Jan 08, 2007 9:13 pm; edited 1 time in total

----------

## kingofearth

Wow, I didn't even notice that you were in both forums, you wouldn't happen to be checking the Ubuntu one too would you? Anyway, I changed my serial.conf to have the same baud and uart that you listed, and even tried using the exact xorg.conf you posted, but the pointer still moves randomly all over the screen. I don't even know what to post to try to fix it since I've tried everything related to the touchscreen the same way you've done it. The only thing I can think of is the kernel. I'm using the 2.6.19.1 kernel, and I think I've got the right stuff compiled in seeing as the touchscreen "works", just not properly. Did you use the standard x11-drivers/xf86-input-fpit-1.1.0 ebuild?

This is starting to get slightly annoying. Oh well, at least Beryl works nicely and does a good job keeping me entertained  :Smile: 

----------

## gustafson

Guys, I'm retracting my statement about changing the baud rate.  For some reason it has now gone unstable that way.  Stick with sedorox's initial suggestion until further notice.  I will edit the above post to reflect this.

----------

## gustafson

Hey guys, what do you make of this error I've gotten after updating kernels to gentoo-sources-2.6.19-r3?

```
# setserial /dev/ttyS0 uart 8250 port 0x06a8 baud_base 38400

Cannot set serial info: Device or resource busy
```

I've lost my pen functionality.

----------

## InvalidComponent

I've got CX2610 too, but I haven't got the pen to move at all.  :Sad: 

I emerged xf86-input-fpit and tried with it, didn't work.

Any progress with this?

----------

## kingofearth

After you emerge xf86-input-fpit you also have to emerge setserial, modify it's configuration, and then modify your xorg.conf. And if you want to be able to "click" with your pen (and a tablet is fairly pointless if you can't), your going to need to modify the fpit source code a little bit and recompile it. The info on how to do everything can be found  at http://www.linuxquestions.org/questions/showthread.php?p=2487606

And since you need to recompile fpit anyway, I would recommend applying the following patch from Meekles over at linux questions:

http://alumni.imsa.edu/~justinb/xf86-input-fpit-1.1.0-RandR.patch

It will allow you to click and will make the touchscreen work when rotating the screen. Most problems have been solved in the thread, but if you need any help just ask either here or there.

----------

## InvalidComponent

Kingofearth: I did those things already, but I noticed something: cat /dev/ttyS0 hangs my computer up when kept like ~5 secs on! Could this be the problem?

----------

## kingofearth

Running cat /dev/ttyS0 while in X it also locks up my computer. Does it display anyout put when you run cat /dev/ttyS0 and you touch the screen with the pen? If it does post your xorg.conf file because the problem is probably in there somewhere. Otherwise post your serial.conf

----------

## InvalidComponent

Usually it doesn't, but once it outputted something like pprp, and then froze.   :Confused: 

Here's my xorg.conf:

```
Section "ServerLayout"

   Identifier   "X.Org Configured"

   Screen   0   "Screen0" 0 0

   InputDevice   "Keyboard0" "CoreKeyboard"

# PS/2 Mouse not detected

# Serial Mouse not detected

   InputDevice   "USB Mouse" "AlwaysCore"

   InputDevice   "Synaptics" "AlwaysCore"

   InputDevice   "Tablet"

EndSection

Section "ServerFlags"

   Option   "AllowMouseOpenFail" "true"

   

EndSection

Section "Files"

   FontPath   "/usr/share/fonts/util"

   FontPath   "/usr/share/fonts/encodings"

   FontPath   "/usr/share/fonts/misc"

   FontPath   "/usr/share/fonts/local"

   FontPath   "/usr/share/fonts/terminus"

   FontPath   "/usr/share/fonts/corefonts"

   FontPath   "/usr/local/share/fonts"

   FontPath   "/usr/share/fonts/default"

   FontPath   "/usr/share/fonts/TTF"

   FontPath   "/usr/share/fonts/type1"

   FontPath   "/usr/share/fonts/100dpi"

   FontPath   "/usr/share/fonts/75dpi"

   FontPath   "/usr/share/fonts/arphicfonts"

   FontPath   "/usr/share/fonts/jisx0213"

   FontPath   "/usr/share/fonts/shinonome"

   FontPath   "/usr/share/fonts/baekmuk-fonts"

   FontPath   "/usr/share/fonts/kacst-fonts"

   FontPath   "/usr/share/fonts/sgi-fonts"

   FontPath   "/usr/share/fonts/unfonts"

   FontPath   "/usr/share/fonts/default/ghostscript"

   FontPath   "/usr/share/fonts/xfonts-cronyx-100dpi:unscaled"

   FontPath   "/usr/share/fonts/xfonts-cronyx-75dpi:unscaled"

   FontPath   "/usr/share/fonts/xfonts-cronyx-misc:unscaled"

   FontPath   "/usr/share/fonts/xfonts-cronyx-100dpi"

   FontPath   "/usr/share/fonts/xfonts-cronyx-75dpi"

   FontPath   "/usr/share/fonts/xfonts-cronyx-misc"

   FontPath   "/usr/share/fonts/xfonts-cronyx-cp1251-100dpi:unscaled"

   FontPath   "/usr/share/fonts/xfonts-cronyx-cp1251-75dpi:unscaled"

   FontPath   "/usr/share/fonts/xfonts-cronyx-cp1251-misc:unscaled"

   FontPath   "/usr/share/fonts/xfonts-cronyx-cp1251-100dpi"

   FontPath   "/usr/share/fonts/xfonts-cronyx-cp1251-75dpi"

   FontPath   "/usr/share/fonts/xfonts-cronyx-cp1251-misc"

   FontPath   "/usr/share/fonts/xfonts-cronyx-isocyr-100dpi:unscaled"

   FontPath   "/usr/share/fonts/xfonts-cronyx-isocyr-75dpi:unscaled"

   FontPath   "/usr/share/fonts/xfonts-cronyx-isocyr-misc:unscaled"

   FontPath   "/usr/share/fonts/xfonts-cronyx-isocyr-100dpi"

   FontPath   "/usr/share/fonts/xfonts-cronyx-isocyr-75dpi"

   FontPath   "/usr/share/fonts/xfonts-cronyx-isocyr-misc"

   FontPath   "/usr/share/fonts/xfonts-cronyx-koi8r-100dpi:unscaled"

   FontPath   "/usr/share/fonts/xfonts-cronyx-koi8r-75dpi:unscaled"

   FontPath   "/usr/share/fonts/xfonts-cronyx-koi8r-misc:unscaled"

   FontPath   "/usr/share/fonts/xfonts-cronyx-koi8r-100dpi"

   FontPath   "/usr/share/fonts/xfonts-cronyx-koi8r-75dpi"

   FontPath   "/usr/share/fonts/xfonts-cronyx-koi8r-misc"

   FontPath   "/usr/share/fonts/xfonts-cronyx-koi8u-100dpi:unscaled"

   FontPath   "/usr/share/fonts/xfonts-cronyx-koi8u-75dpi:unscaled"

   FontPath   "/usr/share/fonts/xfonts-cronyx-koi8u-misc:unscaled"

   FontPath   "/usr/share/fonts/xfonts-cronyx-koi8u-100dpi"

   FontPath   "/usr/share/fonts/xfonts-cronyx-koi8u-75dpi"

   FontPath   "/usr/share/fonts/xfonts-cronyx-koi8u-misc"

EndSection

Section "Module"

   Load   "ddc"

   Load   "vbe"

   Load   "GLcore"

   Load   "dbe"

   Load   "dri"

   Load   "extmod"

   Load   "glx"

   Load   "bitmap"

   Load   "type1"

   Load   "freetype"

   Load   "record"

EndSection

Section "InputDevice"

   Identifier   "Keyboard0"

   Driver   "kbd"

   Option   "CoreKeyboard"

   Option   "XkbRules" "xorg"

   Option   "XkbModel" "pc104"

   Option   "XkbOptions" "grp:toggle,grp_led:scroll"

   Option   "XkbVariant" ",winkeys"

EndSection

Section "InputDevice"

   Identifier   "Serial Mouse"

   Driver   "mouse"

   Option   "Protocol" "Microsoft"

   Option   "Device" "/dev/ttyS0"

   Option   "Emulate3Buttons" "true"

   Option   "Emulate3Timeout" "70"

   Option   "SendCoreEvents"  "true"

EndSection

Section "InputDevice"

   Identifier   "PS/2 Mouse"

   Driver   "mouse"

   Option   "Protocol" "IMPS/2"

   Option   "Device" "/dev/misc/psaux"

   Option   "Emulate3Buttons" "true"

   Option   "Emulate3Timeout" "70"

   Option   "SendCoreEvents"  "true"

   Option   "ZAxisMapping" "4 5"

EndSection

Section "InputDevice"

   Identifier   "USB Mouse"

   Driver   "mouse"

   Option   "Device" "/dev/input/mice"

   Option   "SendCoreEvents" "true"

   Option   "Protocol" "IMPS/2"

   Option   "ZAxisMapping" "4 5"

   Option   "Buttons" "5"

EndSection

Section "InputDevice"

  Identifier  "Tablet"

  Driver      "fpit"

  Option      "Device"           "/dev/ttyS0"

  Option      "AlwaysCore"       "on"

  Option      "InvertY"

  Option      "MaximumXPosition" "12550"

  Option      "MaximumYPosition" "7650"

  Option      "MinimumXPosition" "400"

  Option      "MinimumYPosition" "400"

  Option      "SendCoreEvents"

  #Option      "Rotate"

EndSection

Section "InputDevice"

   Identifier   "Synaptics"

   Driver   "synaptics"

   Option   "Protocol" "event"

   Option   "Device" "/dev/input/event1"

   Option   "LeftEdge" "1900"

   Option   "RightEdge" "5400"

   Option   "TopEdge" "1900"

   Option   "BottomEdge" "4000"

   Option   "FingerLow" "25"

   Option   "FingerHigh" "30"

   Option   "MaxTapTime" "180"

   Option   "MaxTapMove" "220"

   Option   "VertScrollDelta" "100"

   Option   "MinSpeed" "0.02"

   Option   "MaxSpeed" "0.10"

   Option   "AccelFactor" "0.0010"

   Option   "SHMConfig" "on"

EndSection

# Auto-generated by mkxf86config

Section "Monitor"

   Identifier   "Monitor0"

   HorizSync    28.0 - 96.0

   VertRefresh  50.0 - 75.0

EndSection

Section "Device"

   ### Available Driver options are:-

   # sw_cursor is needed for some ati and radeon cards

   #Option     "sw_cursor"

   #Option     "hw_cursor"

   #Option     "NoAccel"

   #Option     "ShowCache"

   #Option     "ShadowFB"

   #Option     "UseFBDev"

   #Option     "Rotate"

   Identifier  "Card0"

   # The following line is auto-generated by x11-misc/mkxf86config

   Driver      "i810"

   VendorName  "All"

   BoardName   "All"

   Option      "Rotate"

   Option      "DRI"

   BusID       "PCI:0:2:0"

EndSection

Section "Screen"

   Identifier   "Screen0"

   Device   "Card0"

   Monitor   "Monitor0"

   DefaultColorDepth 24

   SubSection "Display"

      Depth   1

      Modes "1024x768" "800x600" "640x480"

   EndSubSection

   SubSection "Display"

      Depth   4

      Modes "1024x768" "800x600" "640x480"

   EndSubSection

   SubSection "Display"

      Depth   8

      Modes "1024x768" "800x600" "640x480"

   EndSubSection

   SubSection "Display"

      Depth   15

      Modes "1024x768" "800x600" "640x480"

   EndSubSection

   SubSection "Display"

      Depth   16

      Modes "1024x768" "800x600" "640x480"

   EndSubSection

   SubSection "Display"

      Depth   24

      Modes "1024x768" "800x600" "640x480"

   EndSubSection

   SubSection "Display"

      Depth   32

      Modes "1024x768" "800x600" "640x480"

   EndSubSection

EndSection

Section "DRI"

   Mode 0666

EndSection

```

And here's my serial.conf: (with the non relevant comments excluded)

```
/dev/ttyS0 port 0x06a8 irq 4 baud_base 38400
```

----------

## kingofearth

First comment out the serial mouse, because thats also trying to use /dev/ttyS0 so that might be your problem.

```
 Section "InputDevice" 

    Identifier   "Serial Mouse" 

    Driver   "mouse" 

    Option   "Protocol" "Microsoft" 

    Option   "Device" "/dev/ttyS0" 

    Option   "Emulate3Buttons" "true" 

    Option   "Emulate3Timeout" "70" 

    Option   "SendCoreEvents"  "true" 

 EndSection 
```

And if that doesn't work, check the output of "cat /var/log/Xorg.0.log | grep -i FPIT" because if nothing shows up that means fpit isn't loading for some reason. If something does show up, post it here because it might contain something to help us figure out whats going on. If those two things don't lead to a solution I'm not really sure what else to check. If anyone else has any ideas, just let us know.

----------

## InvalidComponent

W007!

Thank you so much, I got the pen working!  :Very Happy: 

What I did: commented out my serial mouse, took my setserial.conf and edited it a little, and it WORKS! Great! Now I just have to install XGL and the swing-desktops-cube-program!

Well, has anybody got the DRI working?  :Smile: 

My computer can't find the modules AGP and INTEL_AGP, should they be something completely else?

----------

## kingofearth

With the intel card I'd recommend going with AIGLX rather than XGL. It only takes a couple minutes to set up and you can find the instructions at http://gentoo-wiki.com/AIGLX.

Then the instructions for installing Beryl are at http://gentoo-wiki.com/Beryl. It's a long page, but it's really not that much work if you just use the beryl in portage which is unfortunately a little behind the overlay.

----------

## InvalidComponent

Thanks for the fast reply! So AIGLX it is.

But, now that I have committed the patches from http://www.linuxquestions.org/questions/showthread.php?t=497879&page=3 to my ebuild, digested and stuff, the movement is broken: anytime I move the pen near the screen the cursor goes to the right-down corner. Searching at Gentoo's handpages, I didn't find anything about putting arrays/multiple things in the variables, so I put those like in DEPEND variable...but won't work.  :Confused: 

```

PATCHES="${FILESDIR}/xf86-input-fpit-1.1.0_01-cleanup.patch

         ${FILESDIR}/xf86-input-fpit-1.1.0_02-active_pen_right_button.patch

         ${FILESDIR}/xf86-input-fpit-1.1.0_03-rotation.patch"

```

----------

## kingofearth

After applying those patches you have to add 

```
Option "TrackRandR"
```

 into xorg.conf in your tablet's InputDevice section. And I should let you know that I've been having problems with windows not redrawing when using Beryl while the screen is rotated, so when you rotate the screen your probably going to have to use Kwin or Metacity or whatever you normaly use until the bug gets fixed. It's probably a beryl thing.

----------

## z35

I have gotten the pen to work, but it is extremely gitery and i have random button presses. 

```
# grep -vG "^#" /etc/serial.conf

/dev/ttyS0 port 0x03f8 irq 4 baud_base 38400 
```

I have gone through almost all of the urts and starting twm, and nothing seems to remove these issues. I have applied all 3 patches, (still nothing). I have kinda ran out of options.

----------

## kingofearth

What computer do you have and what version of the driver are you using? Do you have any patches applied? What does your xorg.conf look like?

----------

## z35

gateway cx2610, using fpit 1.1.0 with the 3 patches applied.

----------

## kingofearth

Does your xorg.conf look something like this:

```
Section "InputDevice"

        Identifier "Tablet"

        Driver "fpit"

        Option "Device" "/dev/ttyS0"

        Option "AlwaysCore" "on"

        Option "InvertY"

        Option "MinimumXPosition" "350"

        Option "MaximumXPosition" "12580"

        Option "TrackRandR"

        Option "MinimumYPosition" "350"

        Option "MaximumYPosition" "7690"

        Option "SendCoreEvents"

EndSection
```

Did you add Option "TrackRandR"?

I don't really know what else to check. You should probably post over at the linux questions thread, because theres people over there who know much more about this than I do. Specifically Meekles. He helped me with my problem.

----------

## z35

posted, http://www.linuxquestions.org/questions/showthread.php?p=2604207#post2604207

----------

## InvalidComponent

Hmm. Can't get the rotation to work:

```

invalidco@localhost ~ $ xrandr -o inverted

Failed to change the screen configuration!

```

My i810 xorg.conf:

```

Section "Device"

        ### Available Driver options are:-

        # sw_cursor is needed for some ati and radeon cards

        #Option     "sw_cursor"

        #Option     "hw_cursor"

        #Option     "NoAccel"

        #Option     "ShowCache"

        #Option     "ShadowFB"

        #Option     "UseFBDev"

        #Option     "Rotate"

        Identifier  "Card0"

        # The following line is auto-generated by x11-misc/mkxf86config

        Driver      "i810"

        VendorName  "All"

        BoardName   "All"

        Option      "Rotate"

        Option      "DRI"

        Option      "RandR"

        BusID       "PCI:0:2:0"

EndSection

```

What am I doing wrong?

----------

## kingofearth

My video card driver section looks like this and rotation works using xrandr

```
Section "Device"

    Identifier  "** Intel i810 (generic)               [i810]"

    Driver      "i810"

    Option      "XAANoOffscreenPixmaps"

    Option      "DRI"     "true"

    VideoRam    65536

EndSection
```

----------

## InvalidComponent

Hmm. Didn't work for me. Could you post your Screen conf? I think my problem is there.

```

Section "Screen"

        Identifier      "Screen0"

        Device  "Card0"

        Monitor "Monitor0"

        DefaultColorDepth 24

        SubSection "Display"

                Depth   1

                Modes "1200x786" "1024x768" "800x600" "640x480"

        EndSubSection

        SubSection "Display"

                Depth   4

                Modes "1200x786" "1024x768" "800x600" "640x480"

        EndSubSection

        SubSection "Display"

                Depth   8

                Modes "1200x786" "1024x768" "800x600" "640x480"

        EndSubSection

        SubSection "Display"

                Depth   15

                Modes "1200x786" "1024x768" "800x600" "640x480"

        EndSubSection

        SubSection "Display"

                Depth   16

                Modes "1200x786" "1024x768" "800x600" "640x480"

        EndSubSection

        SubSection "Display"

                Depth   24

                Modes "1200x786" "1024x768" "800x600" "640x480"

        EndSubSection

        SubSection "Display"

                Depth   32

                Modes "1200x786" "1024x768" "800x600" "640x480"

        EndSubSection

EndSection

```

Oh yeah, and widescreen doesn't work either  :Smile: 

----------

## kingofearth

First of all to get widescreen working your going to need to emerge 915resolution.

Then set /etc/conf.d/915resolution to look like this:

```
# Copyright 1999-2006 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: /var/cvsroot/gentoo-x86/sys-apps/915resolution/files/confd,v 1.2 2006/07/22 17:41:50 chutzpah Exp $

# Config file for /etc/init.d/915resolution

# based on the config file included with sys-apps/855resolution

# this example will replace mode "4c" with 1280x768x24

replace=( "54 1280 768 32" )

# to replace more than one mode do something like this

#replace=(

#       "4d 1280 768 24"

#       "5c 1400 1050 16"

#)

# if you want to log the output add the file here.

# this will be overwritten at every boot

log="/var/log/915resolution"
```

This makes BIOS replace one of the other resolutions with 1280x768

Then you need to add a mode line to your Monitor section of xorg.conf. Mine looks like:

```
Section "Monitor"

    Identifier  "My Monitor"

    Modeline "1280x768@87" 130.00 1280 1312 1800 1832 768 782 793 807

EndSection
```

Then my screen section looks like:

```
Section "Screen"

    Identifier  "Screen 1"

    Device      "** Intel i810 (generic)               [i810]"

    #Device     "vesa"

    Monitor     "My Monitor"

    DefaultDepth 24

    Subsection "Display"

        Depth       8

        Modes       "1280x768" "1024x768" "800x600" "640x480"

        ViewPort    0 0

    EndSubsection

    Subsection "Display"

        Depth       16

        Modes       "1280x768" "1024x768" "800x600" "640x480"

        ViewPort    0 0

    EndSubsection

    Subsection "Display"

        Depth       24

        Modes       "1280x768" "1024x768" "800x600" "640x480"

        ViewPort    0 0

    EndSubsection

    Subsection "Display"

        Depth       32

        Modes       "1280x768" "1024x768" "800x600" "640x480"

        ViewPort    0 0

    EndSubsection

EndSection
```

Although the only resolution I can select from the KDE display configuration is 1280x768, but most people rarely change the resolution.

If you want to see my entire xorg.conf you can go to http://kingofearth.com/linux/xorg.conf

----------

## InvalidComponent

Thanks, got widescreen working now!

Although, I'm completely lost with the DRI thing, if I use AIGLX do I have to load AGP and related stuff at boot time?

----------

## kingofearth

I don't think so. I think you just have to put 

```
Option "AIGLX" "true"
```

in your server layout of your xorg.conf and then put

```
 Section "dri"

    Group 0

    Mode 0666

 EndSection

 Section "Extensions"

    Option "Composite" "Enable"

 EndSection
```

at the end of xorg.conf and then make sure that xorg-server is compiled with the aiglx use flag if it's available for the version your using.

----------

## InvalidComponent

Well, I compiled Compiz with the AIGLX flag and did stuff that a tutorial told me to, but still - no direct rendering. Also, as the Compiz window manager decides not to work, I have to start Metacity from a terminal to get usable desktop. But, if I run compiz-start it says:

```

XGL detected

Using GTK decorator

GTK Accessibility Module initialized

compiz: No GLXFBConfig for default depth, this isn't going to work.

compiz: Failed to manage screen: 0

compiz: No manageable screens found on display :0.0

```

----------

## kingofearth

What does 

```
glxinfo | grep rendering
```

 output? it should say "direct rendering: Yes" if DRI is on.

And you said you compiled with AIGLX support, but it looks like Compiz is trying to use XGL. There is probably a setting somewhere in Compiz to change it from XGL to AIGLX. I'm not entirely sure what difference it would make, but it could the source of your problem. I'm a Beryl user though, not Compiz, so I can't tell you how to go about changing Compiz settings.

----------

## InvalidComponent

No direct rendering, it said. O_o

How I'm going to get that one? I consulted Gentoo's doc repo for that earlier, but doing the steps in that doc didn't help me.  :Sad: 

EDIT: I think the problem was that I didn't know which kernel modules to load.

EDIT2: I'll try Beryl.

EDIT3: Beryl didn't work  :Sad: 

EDIT4: Does AIGLX need AGPGART?

----------

## kingofearth

If your kernel has the following configuration in make menuconfig then direct rendering should work. I got this from the gentoo-wiki and checked it against my kernel config.

```
Processor type and features

  [*] MTRR (Memory Type Range Register) support 

Device Drivers

  Graphics Support -->

     [*] Support Frame Buffer Devices

     <*> Intel 830M ... (Experimental)

  Character devices  --->

   --- /dev/agpgart (AGP Support)

   ---   Intel 440LX/BX/GX, I8xx and E7x05 chipset support 

  <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)

      <*> Intel 830M ... -->

             i915
```

From the looks of my kernel configuration agpgart is allways on by default in the kernel.

And did you modify your xorg.conf for AIGLX support?

http://gentoo-wiki.com/HOWTO_AIGLX

[url]http://gentoo-wiki.com/HOWTO_Direct_rendering_on_Intel_Extreme_Graphics_(855GM)_chipsets[/url]

If you think you did everything correctly and it still isn't working post your xorg.conf

----------

## InvalidComponent

Well, I tried for a chance to compile the AGP_INTEL and stuff into modules, then when I added 'em to /etc/modules.autoload.d/kernel-2.6 and rebooted modprobe starts whining about segmentation faults and the whole system jams at "Setting dm-crypts".  :Sad:  Hope you'll know better, I'd like to show off my friends how flashy 3D Linux is today.  :Smile: 

----------

## kingofearth

Don't really know what to tell you if it isn't working and you configured it right. Maybe try a different kernel version, maybe your version is buggy for some reason. Which ebuild and version do you use for your kernel?

----------

