# IBM Thinkpad issues

## sonicbhoc

This is my first time installing gentoo, and what an experience it has been! it's my new favorite distro, although time spent compiling things is not my favorite thing, I'm a really impatient person. But I sat through it, and I'm satisfied. I enjoy using this OS, but I'm having a few problems emerging "thinkpad" and any tools related to it. I also don't know how to get suspend, hibernate and the other FN keys or the volume control to work properly, although I have gotten my video card drivers working. I haven't tested sound yet. Do I have to emerge a package for that too? Other than these issues, I'm ok with my gentoo installation. So, a recap if you don't want to read all that crap:

emerge thinkpad gives me an error: 

FN keys don't work

volume keys don't work

after emerging samba, I don't know how to get to my windows shares, which has the drivers for my wireless card

Everything else works, or I can fix them myself

So, if anyone here has the answers, I'd be overjoyed if they'd help me. Thanks a bunch!

----------

## davascript

does your networking work?  what does 

```
ifconfig
```

yield

what kiind of network card?  pcmcia or onboard

----------

## sonicbhoc

It doesn't recognise the wlan card I've got, and the new version of linux-wlan-tools or something like that is masked, so I'm not going to deal with that. it recognises my eth0 card, i set that up myself. there is someone else having the same issue, but the answer that was given was too hard for me to understand. let me go get on my computer and copy and paste the terminal output.

```
Calculating dependencies ...done!

>>> emerge (1 of 1) app-laptop/thinkpad-4.8 to /

>>> md5 files   ;-) thinkpad-4.3-r1.ebuild

>>> md5 files   ;-) thinkpad-5.7.ebuild

>>> md5 files   ;-) thinkpad-4.1.ebuild

>>> md5 files   ;-) thinkpad-4.8.ebuild

>>> md5 files   ;-) thinkpad-4.3.ebuild

>>> md5 files   ;-) thinkpad-3.2.ebuild

>>> md5 files   ;-) thinkpad-5.8.ebuild

>>> md5 files   ;-) files/digest-thinkpad-3.2

>>> md5 files   ;-) files/digest-thinkpad-4.1

>>> md5 files   ;-) files/digest-thinkpad-4.3

>>> md5 files   ;-) files/digest-thinkpad-4.8

>>> md5 files   ;-) files/digest-thinkpad-5.7

>>> md5 files   ;-) files/digest-thinkpad-5.8

>>> md5 files   ;-) files/thinkpad-5.8-cpu_ptr.patch

>>> md5 files   ;-) files/thinkpad

>>> md5 files   ;-) files/digest-thinkpad-4.3-r1

>>> md5 src_uri ;-) thinkpad_4.8.tar.gz

>>> Unpacking source...

>>> Unpacking thinkpad_4.8.tar.gz to /var/tmp/portage/thinkpad-4.8/work

mv: cannot stat `drivers': No such file or directory

mv: cannot stat `include': No such file or directory

>>> Source unpacked.

make -C drivers

make[1]: Entering directory `/var/tmp/portage/thinkpad-4.8/work/thinkpad-4.8/2.6/drivers'

make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.

cc -Wall -Wcast-align -Wstrict-prototypes -O2 -I/lib/modules/2.6.13-gentoo-r3/build/include -I. -I../include -DLINUX -o thinkpad.o -c thinkpad.c

In file included from thinkpad.c:38:

../include/thinkpad_driver.h:45:31: linux/modversions.h: No such file or directory

In file included from /lib/modules/2.6.13-gentoo-r3/build/include/asm/processor.h:18,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/asm/thread_info.h:17,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/thread_info.h:21,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/spinlock.h:12,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/capability.h:45,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/sched.h:7,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/module.h:10,

                 from thinkpad.c:42:

/lib/modules/2.6.13-gentoo-r3/build/include/asm/system.h: In function `__set_64bit_var':

/lib/modules/2.6.13-gentoo-r3/build/include/asm/system.h:193: warning: dereferencing type-punned pointer will break strict-aliasing rules

/lib/modules/2.6.13-gentoo-r3/build/include/asm/system.h:193: warning: dereferencing type-punned pointer will break strict-aliasing rules

In file included from /lib/modules/2.6.13-gentoo-r3/build/include/asm/smp.h:18,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/smp.h:19,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/sched.h:26,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/module.h:10,

                 from thinkpad.c:42:

/lib/modules/2.6.13-gentoo-r3/build/include/asm/mpspec.h:6:25: mach_mpspec.h: No such file or directory

In file included from /lib/modules/2.6.13-gentoo-r3/build/include/asm/smp.h:18,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/smp.h:19,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/sched.h:26,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/module.h:10,

                 from thinkpad.c:42:

/lib/modules/2.6.13-gentoo-r3/build/include/asm/mpspec.h: At top level:

/lib/modules/2.6.13-gentoo-r3/build/include/asm/mpspec.h:8: error: `MAX_MP_BUSSES' undeclared here (not in a function)

/lib/modules/2.6.13-gentoo-r3/build/include/asm/mpspec.h:9: error: `MAX_MP_BUSSES' undeclared here (not in a function)

/lib/modules/2.6.13-gentoo-r3/build/include/asm/mpspec.h:10: error: `MAX_MP_BUSSES' undeclared here (not in a function)

/lib/modules/2.6.13-gentoo-r3/build/include/asm/mpspec.h:12: error: `MAX_MP_BUSSES' undeclared here (not in a function)

/lib/modules/2.6.13-gentoo-r3/build/include/asm/mpspec.h:20: error: `MAX_MP_BUSSES' undeclared here (not in a function)

/lib/modules/2.6.13-gentoo-r3/build/include/asm/mpspec.h:20: error: conflicting types for `mp_bus_id_to_type'

/lib/modules/2.6.13-gentoo-r3/build/include/asm/mpspec.h:8: error: previous declaration of `mp_bus_id_to_type'

/lib/modules/2.6.13-gentoo-r3/build/include/asm/mpspec.h:22: error: `MAX_IRQ_SOURCES' undeclared here (not in a function)

/lib/modules/2.6.13-gentoo-r3/build/include/asm/mpspec.h:24: error: `MAX_MP_BUSSES' undeclared here (not in a function)

/lib/modules/2.6.13-gentoo-r3/build/include/asm/mpspec.h:24: error: conflicting types for `mp_bus_id_to_pci_bus'

/lib/modules/2.6.13-gentoo-r3/build/include/asm/mpspec.h:12: error: previous declaration of `mp_bus_id_to_pci_bus'

In file included from /lib/modules/2.6.13-gentoo-r3/build/include/asm/smp.h:20,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/smp.h:19,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/sched.h:26,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/module.h:10,

                 from thinkpad.c:42:

/lib/modules/2.6.13-gentoo-r3/build/include/asm/io_apic.h:158: error: `MAX_IRQ_SOURCES' undeclared here (not in a function)

/lib/modules/2.6.13-gentoo-r3/build/include/asm/io_apic.h:158: error: conflicting types for `mp_irqs'

/lib/modules/2.6.13-gentoo-r3/build/include/asm/mpspec.h:22: error: previous declaration of `mp_irqs'

In file included from /lib/modules/2.6.13-gentoo-r3/build/include/linux/smp.h:19,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/sched.h:26,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/module.h:10,

                 from thinkpad.c:42:

/lib/modules/2.6.13-gentoo-r3/build/include/asm/smp.h:75:26: mach_apicdef.h: No such file or directory

In file included from /lib/modules/2.6.13-gentoo-r3/build/include/linux/smp.h:19,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/sched.h:26,

                 from /lib/modules/2.6.13-gentoo-r3/build/include/linux/module.h:10,

                 from thinkpad.c:42:

/lib/modules/2.6.13-gentoo-r3/build/include/asm/smp.h: In function `hard_smp_processor_id':

/lib/modules/2.6.13-gentoo-r3/build/include/asm/smp.h:79: warning: implicit declaration of function `GET_APIC_ID'

thinkpad.c:50:27: linux/wrapper.h: No such file or directory

thinkpad.c:105:41: missing binary operator before token "("

thinkpad.c: In function `thinkpad_ioctl':

thinkpad.c:245: warning: `inter_module_put' is deprecated (declared at /lib/modules/2.6.13-gentoo-r3/build/include/linux/module.h:573)

thinkpad.c:260: warning: `inter_module_put' is deprecated (declared at /lib/modules/2.6.13-gentoo-r3/build/include/linux/module.h:573)

thinkpad.c:275: warning: `inter_module_put' is deprecated (declared at /lib/modules/2.6.13-gentoo-r3/build/include/linux/module.h:573)

thinkpad.c:290: warning: `inter_module_put' is deprecated (declared at /lib/modules/2.6.13-gentoo-r3/build/include/linux/module.h:573)

make[1]: *** [thinkpad.o] Error 1

make[1]: Leaving directory `/var/tmp/portage/thinkpad-4.8/work/thinkpad-4.8/2.6/drivers'

make: *** [all] Error 2

!!! ERROR: app-laptop/thinkpad-4.8 failed.

!!! Function src_compile, Line 44, Exitcode 2

!!! Make failed

!!! If you need support, post the topmost build error, NOT this status message
```

so, what to do now?

----------

## yakapiece

You didn't mention what Thinkpad series you own but this link was very helpful in me getting the most of my thinkpad in gentoo

http://dev.gentoo.org/~brix/

You'll find everything you need other than maybe a hardware specific kernel config to your thinkpad series.

----------

## nixnut

Moved from Installing Gentoo to Kernel & Hardware.

Most of it problems getting the hardware working so moved here

----------

## tlippy01

it took me a while to get my thinkpad (R52) running to my satisfaction, but its pretty much all good now: you probably want the ipw2200 drivers in portage rather than linux-wlan-ng, and as for graphics, if you have an i915 integrated/shared memory deal like I do, you'll most likely need to unmask xorg-6.99-r3 (-r4 hasn't worked for me yet).  And i wouldn't waste too much time trying to get dma on the piix cdrom, the kernel isn't really ready to deal with the thinkpad's setup yet.

----------

## sonicbhoc

I thought it was in the title... Oh yeah, I removed it. Dang, I need to pay more attention. Anyway, I have an IBM Thinkpad T21, and the only external hardware is the Ultrabay that I have (it's in my mom's T22 as of now) and my Linksys WPC11v4 which I installed with NDISWRAPPER but I'm recompiling the kernel so that it works better (I disabled the 4MB stacks thing.) After I get ndiswrapper back up and running, i'll see if I can get wireless running too (it was much easier to set up in suse but my suse disks got screwed, and I'm really liking Gentoo as of now). Sound also doesn't work, although I compiled it. I chose what I was pretty sure it used (I can't remember exactly) in the kernel with ALSA,  and I might compile the OSS drivers if this doesn't work. It's a Crystal Sound Fusion (I think). The FN Keys and volume buttons don't work, and I haven't tried hotplugging the ultrabays yet. Everything else checks out OK aside from the mouse, which I can fix with tpctl which won't emerge because the thinkpad package needs a kernel patch that I don't have. Well, at least I think so. Everything works defautly aside from that. I'm not going to bother with the winmodem, I don't use it. I have some extra software compiling, and the world is great, I'm going to download Java now. Bye all.

----------

## sonicbhoc

LARGE UPDATE: I got all the software installed. Unfortunately, none of it works because there's no "/dev/thinkpad" or "/dev/thinkpad/thinkpad" installed on my system. How do i get those? and if anyone has solutions to my previous post I'd be happy. I'm going to restart my computer now, I've recomplied the Kernel for the 4th time today. On second thought, i'm going to bed. School is going to be killer tomorrow.

----------

## NilOGrav

Dude,

You might want to check: http://www.thinkwiki.org/wiki/ThinkWiki => It contains a whole bunch of linux on thinkpad stuff ranging from hard- to software configuration. Especially this one for your model: http://www.thinkwiki.org/wiki/Category:T21

emerge tpb => This is to get your buttons working, altough not for all models everything works but most of it does. Nifty stuff with OSD to generate a lot of messages like volume and thinklight etc.

emerge ibm-acpi => This will enable you to use the Fn key combinations, same story here not for every model all combos work. Check out the table on  http://ibm-acpi.sourceforge.net/ (it looks quite promising). Be sure to emerge the package with the USE flag doc, then you will get the example scripts for /etc/acpi (quite useful for me).

As for sound you probably have one of the two Cirrus Logic Audio controllers. Check which one with lspci (youĺl get a list of hardware)

Good luck.

----------

## NilOGrav

For the thinkpad modules put the following in /etc/portage/package.keywords:

```

app-laptop/thinkpad ~x86

app-laptop/tpctl ~x86

app-laptop/configure-thinkpad ~x86

```

And then in /etc/modules.d/thinkpad

```

# modules.d configuration file for THINKPAD

# For more information please read:

#    README

options thinkpad enable_smapi=1 enable_superio=0 enable_rtcmosram=0 enable_thinkpadpm=0

# Configurable module parameters

# ------------------------------

# enable_smapi: Enable/disable (1/0) use of the smapi module

# enable_superio:       Enable/disable (1/0) use of the superio module

# enable_rtcmosram:     Enable/disable (1/0) use of the rtcmosram module

# enable_thinkpadpm:    Enable/disable (1/0) use of the thinkpadpm module

```

Be sure to run modules-update after altering the file. Same for /etc/modules.d/ibm_acpi

```
# modules.d configuration file for IBM_ACPI

# For more information please read:

#    README

options ibm_acpi hotkey=enable,0xffff experimental=1

```

And as stated earlier you can only make use of the ibm-acpi module by using acpi events and actions defined in /etc/acpi.

If you are a really brave man you can also emerge supend2-sources (gentoo+swsuspend2) and you can use the hibernate (Fn+F12) functionality. But do some reading before going that way...

----------

## sonicbhoc

thanks for the info and sorry for the late reply, I stopped using gentoo on my laptop for a while, and used suse. But with this information and the availability of the GTK Installer I am pretty much ready to put gentoo on again! (too bad the installer is still in alpha, though, it fails constantly)

----------

