Difference between revisions of "Thinkpad R31"

From Blue-IT.org Wiki

(Webcam)
(Heres what I did to things fixed permanently)
Line 211: Line 211:
 
  cd /where/the/xserver-xorg-video-*-files-are-on-Install-CD
 
  cd /where/the/xserver-xorg-video-*-files-are-on-Install-CD
 
  dpkg -i xserver-xorg-core* xserver-xorg-video-*
 
  dpkg -i xserver-xorg-core* xserver-xorg-video-*
 +
 +
It might be additionally necessary to uninstall the ''xserver-xorg-video-intel'' and only use the ''xserver-xorg-video-i810'' driver
 +
apt-get remove xserver-xorg-video-intel
 +
 +
You then have to use the '''i810''' driver in the '''xorg.conf''' instead of the ''intel'' driver.
  
 
3. Take care, that the xserver-xorg files are not updated. Therefore edit the ''50unattended-upgrades'' file from the package manager.
 
3. Take care, that the xserver-xorg files are not updated. Therefore edit the ''50unattended-upgrades'' file from the package manager.

Revision as of 11:32, 16 January 2008

General Info

The article is for linux operation system only.

This is a Thinkpad R31 2656-65G with

  • PIII M(obile) Intel Prozessor
  • 1024MB Ram (max)
  • (not very powerful) Intel i830 Grafics prozessor
  • 100 Mbs Network
  • USB 1.1
  • No wlan
  • Trackpoint, no tochpad
  • Bios Version 3.110 1FETF1WW (2004-11-16, Embedded Controller Version 02.29.12)

Unfortunatly, a very few time after I bought this laptop, a lot of better versions of the R-series thinkpads arrived. I noticed, that the USB 1.1 and sloppy Intel Graphics Chip where no good choice. Also the ACPI implementation is more than worse and IBM never really fixed it.

Within the next years with excessive use during my studies in computer science I had a lot of trouble getting the direct rendering and stable USB support running. This happens arround the time when the new 2.6 kernel series and the new Xserver (after 6.8) came up.

Nevertheless this is a thinkpad in best traditions, easy to use, comfortable and with excellent support. The latter I had to use 2 times replacing my motherboard.

dmidecode

dmidecode get's the following

BIOS Information
       Vendor: IBM
       Version: 1FETF1WW (3.110)
       Release Date: 11/16/2004
       Address: 0xF0000
       Runtime Size: 64 kB
       ROM Size: 512 kB
       Characteristics:
               ISA is supported
               PCI is supported
               PC Card (PCMCIA) is supported
               PNP is supported
               APM is supported
               BIOS is upgradeable
               BIOS shadowing is allowed
               Boot from CD is supported
               Selectable boot is supported
               EDD is supported
               Japanese floppy for NEC 9800 1.2 MB is supported (int 13h)
               Japanese floppy for Toshiba 1.2 MB is supported (int 13h)
               3.5"/720 KB floppy services are supported (int 13h)
               3.5"/2.88 MB floppy services are supported (int 13h)
               Print screen service is supported (int 5h)
               8042 keyboard services are supported (int 9h)
               Serial services are supported (int 14h)
               Printer services are supported (int 17h)
               CGA/mono video services are supported (int 10h)
               ACPI is supported
               AGP is supported
               Smart battery is supported

and

Processor Information
       Socket Designation: U11
       Type: Central Processor
       Family: Pentium III
       Manufacturer: Intel
       [...]
       Signature: Type 0, Family 6, Model 11, Stepping 1
       Version: Pentium(R) III-M         
       Voltage: 1.6 V
       External Clock: 133 MHz
       Max Speed: 1133 MHz
       Current Speed: 1133 MHz

lspci

00:00.0 Host bridge: Intel Corporation 82830 830 Chipset Host Bridge (rev 04)
00:02.0 VGA compatible controller: Intel Corporation 82830 CGC [Chipset Graphics Controller] (rev 04)
00:02.1 Display controller: Intel Corporation 82830 CGC [Chipset Graphics Controller]
00:1d.0 USB Controller: Intel Corporation 82801CA/CAM USB Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801CA/CAM USB Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801CA/CAM USB Controller #3 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 42)
00:1f.0 ISA bridge: Intel Corporation 82801CAM ISA Bridge (LPC) (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801CAM IDE U100 Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801CA/CAM SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801CA/CAM AC'97 Audio Controller (rev 02)
00:1f.6 Modem: Intel Corporation 82801CA/CAM AC'97 Modem Controller (rev 02)
01:08.0 Ethernet controller: Intel Corporation 82801CAM (ICH3) PRO/100 VE (LOM) Ethernet Controller (rev 42)
01:09.0 CardBus bridge: Texas Instruments PCI1410 PC card Cardbus Controller (rev 02)

Bios

Settings

  • Floppy, Serial Port, Parallel Port and Infrared Port are disabled
  • The PCI Settings are all set to auto (do not set the IRQs manually)

Custom ACPI table for linux The bios acpi is buggy. I use the latest Version 3.110 1FETF1WW of 2004-11-16 and fixed it.

Later in this section you have create initramfs too because of the removal of usplash so to safe time you can skip this for now.

sudo unzip /wherever/DSDT.zip -d /etc/initramfs-tools
sudo update-initramfs -c -k `uname -r`

After reboot your dmesg should show something like

root@ibmr31:~# dmesg | grep DSDT
[  885.444768] ACPI: Looking for DSDT in initramfs... successfully read 20423 bytes from /DSDT.aml.
[  885.444823] ACPI: Table DSDT replaced by host OS

Now you are shure, your new DSDT was loaded.

Ubuntu Gutsy

Kernel boot parameter

There are some problems running this laptop with a modern 2.6.x linux kernels. Do not set the IRQs in the bios's PCI section manually or your xserver will fail with DRI.

The problems resulting in misbehaviour of your ethernet or usb are all related to a wrong ACPI table of your bios. This is a known bug for many bios's.

Please see

for additional informations about ACPI and the linux kernel.

i386 Version of ubuntu kernel

I am using the actual ubuntu 386 kernel 2.6.14-2-386.

apt-get install linux-image-386 linux-restricted-modules-386

But the generic version seams to run also with the applied changes in this section. (20:08, 25 December 2007 (CET))

Trackpoint

The trackpoint does erratic mouse movements out of the sudden

Solution:

  • add i8042.nomux=1 as kernel parameter

See

Failure on IRQ - unusable USB/Ethernet

An IRQ problem leaves the usb and ethernet bus unusable . The dmesg message is

dmesg | grep nobody
# irq 11: nobody cared (try booting with the "irqpoll" option)

Solution:

  • add irqpoll as kernel parameter (this works for my thinkpad submodel - it might not work for you)
  • adding noirqdebug will remove the debug messages

This leads into the following /boot/grub/menu.lst additions

## ## Start Default Options ##
## default kernel options
# [...]
# kopt= [...] ro irqpoll i8042.nomux=1

If you are using an pcmcia usb 2.0 card doing the following might restore the ethernet or usb port in case of a failure

modprobe -r ehci-hcd && modprobe ehci-hcd

Unfortunately the problems appeared for all linux 2.6 kernels by now. It also affects a lot of other thinkpad users. See Bug 8853 irq NN: nobody cared on ThinkPad X61T,T61.

Usplash

Direct rendering might be (!) broken, if you use usplash.

  • Uninstall usplash
apt-get remove usplash && update-initramfs -c -k `uname -r`

Thinkpad buttons

Don't seem to work with actual 2.6.22 kernels due to "new and fixed" thinkpad-acpi (former ibm-acpi) modules. The problem is, that these "fixes" seam to make the buttons unusable - not just on this kind of older thinkpad model.

/etc/network/interfaces

With support for tuntap, used by virtualbox. Change a_username with the user that uses the tapX device with virtualbox or other emulator software.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

# The primary network interface
auto tap0
iface tap0 inet manual
 tunctl_user a_username
 uml_proxy_arp ibmr31
 uml_proxy_ether eth0

# - install more if necessary
# - don't forget to add them to br0
# auto tap1
# iface tap1 inet manual
#  tunctl_user a_username
#  uml_proxy_arp this_server
#  uml_proxy_ether eth0
   
# bridge
auto br0
iface br0 inet dhcp
 address 192.168.0.11
 netmask 255.255.255.0
 gateway 192.168.0.254
 bridge_ports eth0 tap0
 bridge_maxwait 0

Xorg / Video

GLX and DRI works, but it is a little buggy and not very performant. I don't recommend using compiz (desktop effects). Also compiz uses a few percent (~2 %) of additional cpu power and causes some artifacts in some OpenGL applications, like e.g. celestia or stellarium.

Troubleshooting

I had some real trouble getting X11 with direct rendering to work after a system upgrade of the xserver occured. X11 hung and the whole system froze. I assume that the main reason for this is the buggy ACPI implementation found in this - and many other - machines. But it also might be a bug in the xserver-xorg drivers from intel.

With a fresh gutsy install everything is fine. After the online update, things are going worse.

If (!) this happens boot in safe mode and temporarily use the following option in your xorg.conf

Section "Device"
     Option    "noaccel"   "true"

for starting the xserver.

Heres what I did to things fixed permanently

Prerequesites: Use the fixed ACPI table from the Bios section above !!!

1. I removed usplash and run update-initramfs for ALL (!) kernel flavours on the machine. You can try to leave this step, probably your system works with usplash.

apt-get remove usplash usplash-theme-ubuntu
update-initramfs -c -k `uname -r`

2. I reinstalled the xserver-xorg-video-intel driver package and xorg-video-core from the gutsy installation CD.

cd /where/the/xserver-xorg-video-*-files-are-on-Install-CD
dpkg -i xserver-xorg-core* xserver-xorg-video-*

It might be additionally necessary to uninstall the xserver-xorg-video-intel and only use the xserver-xorg-video-i810 driver

apt-get remove xserver-xorg-video-intel

You then have to use the i810 driver in the xorg.conf instead of the intel driver.

3. Take care, that the xserver-xorg files are not updated. Therefore edit the 50unattended-upgrades file from the package manager.

nano /etc/apt/apt.conf.d/50unattended-upgrades
// never update the packages in this list
Unattended-Upgrade::Package-Blacklist {
//      "vim";
        "xserver-xorg-video-intel";
        "xserver-xorg-video-i810";
        "xserver-xorg-video-all";
        "xserver-xorg-core";
        "xserver-xorg";
}

4. I rebooted the machine

Now the Xserver should work with direct rendering.

X11

Trackpoint

The trackpoint can be configured specially for scrolling in conjunction with the middle mouse button. See the xorg.conf in one of the following sections.

Section "InputDevice"
[...]
      Option          "ZAxisMapping"          "4 5"
      Option          "YAxisMapping"          "4 5"
      Option          "XAxisMapping"          "6 7"
      Option          "EmulateWheel"          "true"
      Option          "EmulateWheelButton"    "2"

Please read the following article for more informations about using the trackpoint: Thinkwiki - Configure the TrackPoint

xorg.conf

# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf(5) manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
       FontPath        "/usr/share/fonts/X11/misc"
       # FontPath        "/usr/share/fonts/X11/cyrillic"
       FontPath        "/usr/share/fonts/X11/100dpi/:unscaled"
       FontPath        "/usr/share/fonts/X11/75dpi/:unscaled"
       FontPath        "/usr/share/fonts/X11/Type1"
       FontPath        "/usr/share/fonts/X11/100dpi"
       FontPath        "/usr/share/fonts/X11/75dpi"
       FontPath        "/usr/share/fonts/X11/encodings"
       # path to defoma fonts
       FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
       Load    "i2c"
       Load    "bitmap"
       Load    "ddc"
       Load    "extmod"
       Load    "freetype"
       Load    "glx"
       Load    "int10"
       Load    "vbe"
       Load    "dri"
EndSection

Section "InputDevice"
       Identifier      "Generic Keyboard"
       Driver          "kbd"
       Option          "CoreKeyboard"
       Option          "XkbRules"      "xorg"
       Option          "XkbModel"      "pc105"
       Option          "XkbLayout"     "de"
       Option          "XkbOptions"    "lv3:ralt_switch"
EndSection

Section "InputDevice"
       Identifier      "Configured Mouse"
       Driver          "mouse"
       Option          "CorePointer"
       Option          "Device"                "/dev/input/mice"
       Option          "Protocol"              "ImPS/2"
       Option          "ZAxisMapping"          "4 5"
       Option          "YAxisMapping"          "4 5"
       Option          "XAxisMapping"          "6 7"
       Option          "EmulateWheel"          "true"
       Option          "EmulateWheelButton"    "2"
EndSection

Section "Device"
       Identifier      "Intel Corporation 82830 CGC [Chipset Graphics Controller]"
       Driver          "intel"
       BusID           "PCI:0:2:0"
       Option          "XVideo" 
       Option          "DRI" "true"
       #  
       # Enable the next, if X hangs and the system freezes
       # Option         "noaccel"   "true" 
       #
       # Often seen in howto's but
       # automatically used by driver
       # VideoRam       65536
EndSection

Section "Monitor"
       Identifier      "Standardbildschirm"
       Option          "DPMS"
EndSection

Section "Screen"
       Identifier      "Default Screen"
       Device          "Intel Corporation 82830 CGC [Chipset Graphics Controller]"
       Monitor         "Standardbildschirm"
       # Use 16 as default depth because of performance issues
       DefaultDepth    16
       SubSection "Display"
               Depth           1
               Modes           "1024x768" "1024x600" "800x600" "768x576" "640x480"
       EndSubSection
       SubSection "Display"
               Depth           4
               Modes           "1024x768" "1024x600" "800x600" "768x576" "640x480"
       EndSubSection
       SubSection "Display"
               Depth           8
               Modes           "1024x768" "1024x600" "800x600" "768x576" "640x480"
       EndSubSection
       SubSection "Display"
               Depth           15
               Modes           "1024x768" "1024x600" "800x600" "768x576" "640x480"
       EndSubSection
       SubSection "Display"
               Depth           16
               Modes           "1024x768" "1024x600" "800x600" "768x576" "640x480"
       EndSubSection
       SubSection "Display"
               Depth           24
               Modes           "1024x768""1024x600" "800x600" "768x576" "640x480"
       EndSubSection
EndSection

Section "ServerLayout"
       Identifier      "Default Layout"
       Screen          "Default Screen"
       InputDevice     "Generic Keyboard"
       InputDevice     "Configured Mouse"
EndSection

Section "DRI"
       Mode    0666
EndSection

Additional informations for ACPI issues

As I mentioned above see

for additional informations about ACPI and the linux kernel.

These are ACPI related boot parameters and how they behave in conjunction with ubuntu gutsy and the R31:

acpi=off       (leaves the system unbootable)
acpi=ht        (leaves the system unbootable)  
acpi=noirq     (leaves the system unbootable)
pci=routeirq   (no positive effect)
pnpacpi=off    (no positive effect)
pci=noacpi     (no positive effect)
noapic         (not tested)
nolapic        (not tested)
irqpoll        WORKS

If you change one of them you have to run update-grub AND update-initramfs -c -k `uname -r`. Remember to always keep a kernel that will boot, either the generic or the 386 flavor. Never (!) run with update-initramfs -c -k all on all installed kernels .

A special page for ACPI issues with Thinpads you'll find here:

Here is what happens to the bus even when booting with irqpoll (but the system keeps working):

cat /var/lib/acpi-support/*-*
 1FETF1WW (3.110)
 IBM
 265665G
 Not Available

acpi_listen

acpi_listen
 button/power PWRF 00000080 00000001

is not responding to the Volume Keys, only the power button.

The IRQ problems might look as followed:

dmesg | grep  0000:00:1f.1
 [   15.932137] ata_piix 0000:00:1f.1: version 2.11
 [   15.932166] ACPI: Unable to derive IRQ for device 0000:00:1f.1
 [   15.932170] ACPI: PCI Interrupt 0000:00:1f.1[A]: no GSI
 [   15.932233] PCI: Setting latency timer of \
                            device 0000:00:1f.1 to 64
dmesg | grep ACPI
 [   15.932166] ACPI: Unable to derive IRQ for device 0000:00:1f.1
 [   18.446255]  [<c0106597>] do_IRQ+0x37/0x70
 [   18.446289]  [<c010659c>] do_IRQ+0x3c/0x70
 [   18.446855] Disabling IRQ #11
dmesg | grep irq
 [    0.000000] Kernel command line: \
                root=UUID=e0342b0c-ee00-4205-919b-6d93a3c35532 \
                ro irqpoll i8042.nomux=1 quiet splash
 [   12.842728] PCI: If a device doesn't work, try "pci=routeirq". \
                If it helps, post a report
 [   18.446145] irq 11: nobody cared (try booting with the \
                "irqpoll" option)
 [   18.446222] [<c0148594>] __report_bad_irq+0x24/0x80
 [   18.446247] [<c01491f1>] handle_level_irq+0x81/0xb0
 [   18.446273] [<c0120d5c>] __do_softirq+0x2c/0xa0
 [   18.446283] [<c0120e15>] do_softirq+0x45/0x50
 [   18.446426] [<f8878590>] (usb_hcd_irq+0x0/0x60 [usbcore])
 [   18.446578] [<f8878590>] (usb_hcd_irq+0x0/0x60 [usbcore])
 [   18.446723] [<f8878590>] (usb_hcd_irq+0x0/0x60 [usbcore])

In the next you can see that IRQ 11 ist running at a much too high level, causing the system to crash. This is probably a not fiixed bios problem.

cat /proc/interrupts 
           CPU0       
   0:    7847230    XT-PIC-XT        timer
   1:       3624    XT-PIC-XT        i8042
   2:          0    XT-PIC-XT        cascade
   5:          0    XT-PIC-XT        parport0
   8:          2    XT-PIC-XT        rtc
   9:         39    XT-PIC-XT        acpi
>>11:     100000    XT-PIC-XT        uhci_hcd:usb1, uhci_hcd:usb2,\
                    uhci_hcd:usb3, eth0, yenta, Intel 82801CA-ICH3,\        
                    i915@pci:0000:00:02.0
  12:      19366    XT-PIC-XT        i8042
  14:      31253    XT-PIC-XT        libata
  15:      45580    XT-PIC-XT        libata

External Hardware

Webcam

I use an Logitech Quickcam DeLuxe using the gscpa driver

cd /usr/src
apt-get install gscpa-source
tar xjvf gspca.tar.bz2
module-assistent a-i gscpa

Unfortunatly this cam uses to crash with the NEC pcmcia USB 2.0 card.