Extra info on running GNU/Linux on IBM Thinkpad T23
USB
to list all you PCI devices, use
$ lspci -v
kernel config
There are too many USB options in kernel to list them all here. Below are those that I built in, and some of those compiled as modules. Your choice my be quite different.
# USB support
CONFIG_USB=m
CONFIG_USB_DEVICEFS=y
CONFIG_USB_UHCI=m
CONFIG_USB_UHCI_ALT=m
CONFIG_USB_STORAGE=m
CONFIG_USB_PRINTER=m
CONFIG_USB_HID=m
CONFIG_USB_HIDDEV=y
CONFIG_USB_SCANNER=m
Since you need scsi support to use USB storage, make sure you include that too.
# SCSI support
CONFIG_SCSI=m
# SCSI support type (disk, tape, CD-ROM)
CONFIG_BLK_DEV_SD=m
CONFIG_SD_EXTRA_DEVS=40
CONFIG_BLK_DEV_SR=m
CONFIG_SR_EXTRA_DEVS=2
CONFIG_CHR_DEV_SG=m
External USB Hard Drive
The mass storage device driver can potentially be used with a wide a wide range of USB devices, not all of which would normally be considered to be mass storage. This is because the driver is really an interface between the USB stack and the SCSI layer. (
more)
Those USB devices that that aren't automaticaly recognized need to be explicetly defined in /usr/src/linux/drivers/usb/storage/unusual_devs.h
Here's my entry for USB 2.5" HD enclosure
UNUSUAL_DEV( 0x05e3, 0x0702, 0x0000, 0xffff,
"EagleTec",
"External Hard Disk",
US_SC_SCSI, US_PR_BULK, NULL,
US_FL_FIX_INQUIRY |
US_FL_START_STOP |
US_FL_MODE_XLATE ),
switching screen resolution
Pay attention:
below apps will only change the video mode (actually, the screen resolution). They cannot change the size of the virtual desktop, or the color depth, as changing either of those requires restarting X. Furthermore, any and all modes you want to appear must be defined in your XF86Config. If you've only configured one mode, that's all that will show as option when attempting to switch.
Here's my Screen section from XF86Config-4
Section "Screen"
Identifier "Screen0"
Device "My Video Card"
Monitor "Generic Laptop Display Panel 1400x1050"
DefaultDepth 24
SubSection "Display"
Depth 8
Modes "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768"
Modes "800x600"
EndSubSection
SubSection "Display"
Depth 24
Modes "1400x1050"
Modes "1024x768"
Modes "800x600"
Modes "640x480"
EndSubSection
EndSection
gvidm
gvidm is a gtk app to quickly and easily change video resolutions in X. Running it will pop up a
list of available modes, upon choosing a mode or cancelling, it exits. This makes it perfect for
running from an application menu or a hotkey, so you don't have to use ram for an applet constantly
running. If you are running dual or multi-head displays, it will give you a list of screens so you
can select the appropriate one.
$ apt-get install gvidm
If you're going to use this command often, you can map a key to it. See attached gvidm file, which use
Pause as shortcut to gvidm. Run update-menus.
wmrec
see author's
webpage with info on this app
To compile it,
$ gcc -o wmres wmres.c -L/usr/X11/lib -lXxf86vm -lXmu -lX11
Note that your libraries may be in a directory other than /usr/X11/lib (on many systems, they are in /usr/X11R6/lib). Just be sure to set the -L option correctly. After compiling, put the resulting binary anywhere in your path and configure it for use from the menu. Way of doing that author of wmres suggests breaks automatic Debian menu rebuilding, which i didn't want to loose and revert to manul. So i decided to add it to database (directory with files) of Debian menus. First, have a look at
man update-menus. Create an entry for menu Resolutions in /usr/lib/menu/ following the syntax from existing menu entries in there. Run
update-menus and your new Resolutions sub-menu should appear in Debian menu (see my /usr/lib/menu/resolutions file attached).
I was so happy with this feature (because it allows you to watch movies without resizing them, instead drop you screen res!) that i went all the way and took a screen shoot:
In the case you have problems with update-menus, which i had for a while, here's manual adding of resolution switching to Debian menu (warning: this will be overwritten with the next
update-menus)
- make sure your
~/GNUstep/Defaults/WMRootMenu has "menu.hook" inside
- then, edit
~/GNUstep/Library/WindowMaker and add Resolution menu
- you can get the menu by running
wmres, which prints (so handy!) the exact Resolution menu, ready to be included in menu.hook.
$ wmres
"Resolutions" MENU
"1400x1050 74Hz" EXEC wmres 1400 1050 155800
"1024x768 75Hz" EXEC wmres 1024 768 78800
"800x600 75Hz" EXEC wmres 800 600 49500
"640x480 75Hz" EXEC wmres 640 480 31500
"Resolutions" END
include that in menu.hook and you're done. F12 should give you acces to it.
Modem
It works well, and it's very easy to install.
again, do
lspci -vv to check what modem you got. Mine is Lucent, so are most Thinkpad internal modems. I got
02:02.0 Communication controller: Lucent Microelectronics WinModem? 56k (rev 01)
visit
homepage for linux lucent drivers.
here's a
manual that drivers author recomeds.
i used
the latest sources, you might need a different version, depending on your kernel.
Readme file in the source was useful and straight forward. First you run
scanmodem script that check wheater your modem is support. If it is, there are few ways you can proceede. There's a script provided to build a debian package from this source, so i did that and installed it. You end up with
lt_modem.o and lt_serial.o= in you /lib/modules/2.4.20/ltmodem. After installing debian package, try load them with:
insmod lt_modem
insmod lt_serial
That will be automated in future by installed file
/etc/modutils/ltmodem-2.4.20-1-686, which contains right options for autoloading of those modules.
Bear in mind one important point that the device pointer for the LT Modem is not
/dev/ttyS0, but
/dev/ttyLT0. This means that all references to ttyS0 should be replaced with ttyLT0.
When i reboot and try to dial for the first time, system log shows sucesuful loading:
kernel: Loading Lucent Modem Controller driver version 8.26
kernel: Detected Parameters Irq=11 BaseAddress=0x6000 ComAddress=0x6440
kernel: Lucent Modem Interface driver version 8.26 (2002-11-04) with SHARE_IRQ enabled
ttyLT00 at 0x6000 (irq = 11) is a Lucent Modem
Last thing, if you recompile same kernel version with some new options, and you move your old directory with working modules (so that new install doesn't overwrite them), make sure that after the install of new modules you copy
ltmodem directory from old modules to new (i forgot to do this first time i rebuilt the kernel).
Second HD Ultrabay
I bought a
HD Ultrabay Adapter from IBM, which is briliantly designed bay for additional HD. So far, i used external USB HD for backup, but this is much better solution. IDE drivers are far more stable then USB ones. With external USB HD, i had to stop X windows when copying large files (divX movies, >500Mb), otherwise i risked X crash, and extremely fragile performance of the whole system. This could been due to the bad quality of IDE/USB bridge in external HD enclosure.
Hot swapping
works!!! thanks to the
hotswap application, available in Debian testing/unstable. I downloaded source and latest diff, patched it/compiled/installed, and it works fine. It is interactive, you get asked what do you want to do. One thing, Thinkpad light that signals Ultrabay often doesn't recongnize that IDE deregister/register went fine, so it continues to beep, which is real pain. The only solution i found so far is to put machine to sleep. After the wakeup beeping stops and light flashing both stop.
additional resources
very detailed email on debian-latop email list with more on windowmaker/debian menu issues.
and some
keyboard hacks
to top