Here’s a collection of all the things I had to configure to run Gentoo Linux onto my IBM R50 (Model 1836-3SU).
/etc/make.conf
#/etc/make.conf
#Created By: Jason V. Mock
#System: IBM R50 1836-3SU
#Last Update: 05-12-21
CFLAGS="-O3 -march=pentium4 -fomit-frame-pointer"
CHOST=i686-pc-linux-gnu
CXXFLAGS=${CFLAGS}
PORTDIR_OVERLAY=/usr/local/portage
USE="aac acl acpi aim apache2 artswrappersuid avantgo bash-completion
cdinstall cdparanoia cdrom chroot clamav codecs css divx4linux doc
dts dv dvb dvd dvdr dvdread eds emoticon fame ffmpeg fftw ftp gcj
gimp gimpprint hal icq ieee1394 imap ipv6 irda jabber jp2 jpeg2k
kerberos md5sum mime ming mmx mmx2 mng mp3 mplayer msn mysqli network
ntlm nvidia nviz oscar pcap pcmcia pda pdf pdfkit php pnp pthreads
real rrdtool rtc sasl smime sqlite3 sse sse2 threads tidy transcode
uml usb v4l v4l2 vim virus-scan vnc vorbis wifi winbind wmf xine
xinerama xosd xscreensaver yahoo -libg"
FEATURES="ccache distcc"
CCACHE_SIZE=2GB
DISTCC_HOSTS="localhost 192.168.1.2"
MAKEOPTS="-j2"
LINGUAS=de
ALSA_CARDS="intel8x0 intel8x0m"lspci
0000:00:00.0 Host bridge: Intel Corp. 82855PM Processor to I/O Controller (rev 03) 0000:00:01.0 PCI bridge: Intel Corp. 82855PM Processor to AGP Controller (rev 03) 0000:00:1d.0 USB Controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01) 0000:00:1d.1 USB Controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01) 0000:00:1d.2 USB Controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01) 0000:00:1d.7 USB Controller: Intel Corp. 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01) 0000:00:1e.0 PCI bridge: Intel Corp. 82801 Mobile PCI Bridge (rev 81) 0000:00:1f.0 ISA bridge: Intel Corp. 82801DBM (ICH4-M) LPC Interface Bridge (rev 01) 0000:00:1f.1 IDE interface: Intel Corp. 82801DBM (ICH4-M) IDE Controller (rev 01) 0000:00:1f.3 SMBus: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 01) 0000:00:1f.5 Multimedia audio controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01) 0000:00:1f.6 Modem: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 01) 0000:01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R250 Lf [FireGL 9000] (rev 02) 0000:02:00.0 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01) 0000:02:00.2 FireWire (IEEE 1394): Texas Instruments: Unknown device 802a (rev 01) 0000:02:01.0 Ethernet controller: Intel Corp. 82540EP Gigabit Ethernet Controller (Mobile) (rev 03) 0000:02:02.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
Video
Device: ATI Radeon Mobility 9000
Kernel Module: fglrx
Module Provider: ati-driver (http://www.ati.com)
$ ACCEPT_KEYWORDS="~x86" emerge ati-driver /opt/ati/bin/fglrxconfig opengl-update ati
$ esearch ati-driver [ Results for search key : ati-driver ] [ Applications found : 2 ] * media-video/ati-drivers-extra Latest version available: 3.14.6 Latest version installed: 8.8.25 Size of downloaded files: 4,124 kB Homepage: http://www.ati.com Description: Ati precompiled drivers extra application License: ATI GPL-2 QPL-1.0 * media-video/ati-drivers Latest version available: 3.14.6 Latest version installed: 8.8.25 Size of downloaded files: 4,124 kB Homepage: http://www.ati.com Description: Ati precompiled drivers for r350, r300, r250 and r200 chipsets License: ATI
/etc/X11/xorg.conf
#/etc/X11/xorg.conf
#Created By: Jason V. Mock
#System: IBM R50 1836-3SU
#Last Update: 05-12-21
Section "dri"
Mode 0666
EndSection
Section "Module"
Load "dbe" # Double buffer extension
SubSection "extmod"
#Option "omit xfree86-dga"
EndSubSection
Load "type1"
Load "freetype"
Load "glx" # libglx.a
Load "dri" # libdri.a
EndSection
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "/usr/X11R6/lib/X11/fonts/local/"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
# FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
# ModulePath "/usr/X11R6/lib/modules"
EndSection
Section "ServerFlags"
# Option "NoTrapSignals"
# Option "DontZap"
# Option "Dont Zoom"
# Option "DisableVidModeExtension"
# Option "AllowNonLocalXvidtune"
# Option "DisableModInDev"
# Option "AllowNonLocalModInDev"
EndSection
Section "InputDevice"
Identifier "Keyboard1"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Device" "/dev/input/mice"
Option "Emulate3Buttons"
EndSection
Section "Monitor"
Identifier "Monitor0"
HorizSync 31.5 - 60
VertRefresh 50-70
Option "DPMS"
EndSection
Section "Device"
Identifier "ATI Graphics Adapter"
Driver "fglrx"
# ### generic DRI settings ###
# === disable PnP Monitor ===
#Option "NoDDC"
# === disable/enable XAA/DRI ===
Option "no_accel" "no"
Option "no_dri" "no"
# === misc DRI settings ===
Option "mtrr" "off" # disable DRI mtrr mapper, driver has its own code for mtrr
# ### FireGL DDX driver module specific settings ###
# === Screen Management ===
Option "DesktopSetup" "0x00000000"
Option "MonitorLayout" "AUTO,NONE"
Option "IgnoreEDID" "off"
Option "HSync2" "31.5-60"
Option "VRefresh2" "50-70"
Option "ScreenOverlap" "0"
# === TV-out Management ===
Option "NoTV" "yes"
Option "TVStandard" "NTSC-M"
Option "TVHSizeAdj" "0"
Option "TVVSizeAdj" "0"
Option "TVHPosAdj" "0"
Option "TVVPosAdj" "0"
Option "TVHStartAdj" "0"
Option "TVColorAdj" "0"
Option "GammaCorrectionI" "0x06419064"
Option "GammaCorrectionII" "0x00000000"
# === OpenGL specific profiles/settings ===
Option "Capabilities" "0x00000000"
# === Video Overlay for the Xv extension ===
Option "VideoOverlay" "on"
# === OpenGL Overlay ===
# Note: When OpenGL Overlay is enabled, Video Overlay
# will be disabled automatically
Option "OpenGLOverlay" "off"
# === Center Mode (Laptops only) ===
Option "CenterMode" "off"
# === Pseudo Color Visuals (8-bit visuals) ===
Option "PseudoColorVisuals" "off"
# === QBS Management ===
Option "Stereo" "off"
Option "StereoSyncEnable" "1"
# === FSAA Management ===
Option "FSAAEnable" "no"
Option "FSAAScale" "1"
Option "FSAADisableGamma" "no"
Option "FSAACustomizeMSPos" "no"
Option "FSAAMSPosX0" "0.000000"
Option "FSAAMSPosY0" "0.000000"
Option "FSAAMSPosX1" "0.000000"
Option "FSAAMSPosY1" "0.000000"
Option "FSAAMSPosX2" "0.000000"
Option "FSAAMSPosY2" "0.000000"
Option "FSAAMSPosX3" "0.000000"
Option "FSAAMSPosY3" "0.000000"
Option "FSAAMSPosX4" "0.000000"
Option "FSAAMSPosY4" "0.000000"
Option "FSAAMSPosX5" "0.000000"
Option "FSAAMSPosY5" "0.000000"
# === Misc Options ===
Option "UseFastTLS" "0"
Option "BlockSignalsOnLock" "on"
Option "UseInternalAGPGART" "no"
Option "ForceGenericCPU" "no"
Option "backingstore" "true"
BusID "PCI:1:0:0" # vendor=1002, device=4c66
Screen 0
EndSection
Section "Screen"
Identifier "Screen0"
Device "ATI Graphics Adapter"
Monitor "Monitor0"
DefaultDepth 24
#Option "backingstore"
Subsection "Display"
Depth 24
Modes "1400x1050"
#Modes "1024x768"
ViewPort 0 0 # initial origin if mode is smaller than desktop
# Virtual 1280 1024
EndSubsection
EndSection
Section "ServerLayout"
Identifier "Server Layout"
Screen "Screen0"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
#Section "Extensions"
# Option "Composite" "Enable"
#EndSectionNetworking
Device: Intel 82540EP Gigabit Ethernet Controller
Kernel Module: e1000
Module Provider: Linux Kernel or Intel : http://support.intel.com/support/network/adapter/1000/index.htm
Device Drivers --->
Networking support --->
Ethernet (1000 Mbit) --->
<M> Intel(R) PRO/1000 Gigabit Ethernet supportDevice: Atheros AR5212 802.11abg NIC
Kernel Modules: ath_hal, ath_rate_onoe, wlan, wlan_acl, wlan_ccmp, wlan_tkip, wlan_wep, wlan_xauth, ath_pci
Module Provider: madwifi : http://madwifi.sourceforge.net/
$ ACCEPT_KEYWORDS="~x86" emerge madwifi-driver madwifi-tools
Currently the wireless components in Gentoo are going through a major overhaul, so I went ahead and made the plunge into the unstable baselayout. This includes a /etc/conf.d/wireless file where you can enter the information required for any wireless network you may connect to, and whether you want it to talk to open networks or only the ones you designate (which I actually like alot since I’m always seeing the fading signals of open wifi networks at home and at work), and it will use that file to attempt to connect to those networks upon /etc/init.d/net.wlanX start. That, inconjunction with the ifplugd package have made my connection to lan and wlans almost seemless.
Network Auto-sensing and Wireless “The Gentoo Way”
NOTE: THIS CURRENTLY EXPERIMENTAL VERSIONS OF BASELAYOUT AND IFPLUGD – KNOW WHAT YOU ARE DOING!!!
$ ACCEPT_KEYWORDS="~x86" emerge =baselayout-1.11.8 =ifplugd-0.26 $ rc-update del net.ethX # Repeat for all network devices
/etc/conf.d/ifplugd
INTERFACES="eth0 ath0" AUTO="yes" BEEP="yes" IGNORE_FAIL="yes" IGNORE_FAIL_POSITIVE="no" IGNORE_RETVAL="yes" POLL_TIME="1" DELAY_UP="0" DELAY_DOWN="0" API_MODE="auto" SHUTDOWN="yes" WAIT_ON_FORK="no" MONITOR="no" ARGS="" DELAY_UP_ath0="5" DELAY_DOWN_ath0="5"
Remove the net.ethX scripts from the default init level, and add ifplugd:
$> /etc/init.d/net.ethX stop ##repeat for each network interface started $> /etc/init.d/ifplugd start
Do remember, you still need to have /etc/conf.d/net and the correct /etc/init.d/net.ethX scripts configured as ifplugd uses these to enable settings entered in /etc/conf.d/net, /etc/conf.d/wireless, and etc…
Test to make sure ifplug is functioning correctly:
Here is ifconfig with the cable to eth0 unplugged…
$> ifconfig ath0 Link encap:Ethernet HWaddr 00:05:4E:43:3E:F1 inet6 addr: fe80::205:4eff:fe43:3ef1/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:10798 dropped:0 overruns:0 frame:10798 TX packets:193 errors:7 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:199 RX bytes:0 (0.0 b) TX bytes:16984 (16.5 Kb) Interrupt:11 Memory:f16a0000-f16b0000 eth0 Link encap:Ethernet HWaddr 00:0D:60:D0:EE:E2 inet6 addr: fe80::20d:60ff:fed0:eee2/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:64732 errors:0 dropped:0 overruns:0 frame:0 TX packets:40618 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:53286612 (50.8 Mb) TX bytes:4226373 (4.0 Mb) Base address:0x8000 Memory:c0240000-c0260000
Here is ifconfig after after plugging in the cable to eth0…
$> ifconfig ath0 Link encap:Ethernet HWaddr 00:05:4E:43:3E:F1 inet6 addr: fe80::205:4eff:fe43:3ef1/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:10636 dropped:0 overruns:0 frame:10636 TX packets:189 errors:7 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:199 RX bytes:0 (0.0 b) TX bytes:16632 (16.2 Kb) Interrupt:11 Memory:f16a0000-f16b0000 eth0 Link encap:Ethernet HWaddr 00:0D:60:D0:EE:E2 inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::20d:60ff:fed0:eee2/64 Scope:Link UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1 RX packets:64578 errors:0 dropped:0 overruns:0 frame:0 TX packets:40612 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:53275470 (50.8 Mb) TX bytes:4225903 (4.0 Mb) Base address:0x8000 Memory:c0240000-c0260000
If you follow the instructions in the Gentoo: Power Management Guide then you need to also add ifplugd to your battery init level, otherwise all your network connections will malfunction the second you unplug the laptop (for some reason, even if you start ifplugd up again).
$ rc-update add ifplugd battery
Also note that since we brought up baselayout-1.11.8, this brings with it the new wireless networking init scripts. These are very impressivly written scripts that will take configurations placed in your /etc/conf.d/wireless file and attempt to connect to available wireless networks based on your settings.
preferred_aps=( "MyESSID1", "MyESSID2" ) key_MyESSID1="s:key" key_MyESSID2="s:key" associate_order_ath0="forcepreferred"
This configuration will then tell /etc/init.d/net.ath0 to do the following
- Configure your device to the settings for MyESSID1
- Then connect to MyESSID1 and attempt a dhcp (that is how I have my
/etc/conf.d/net.ath0configured) - IF MyESSID1 fails, it will then configure the device for MyESSID2
- Then connect to MyESSID2 and attempt a dhcp
- And last but not least, if both failed, net.ath0 fails to start.
Just remember that this is simply an example, as I don’t want my wireless to connect to any random open network unless I force it (hence the associate_order_ath0="forcepreferred" line). In my case I simply have it double check for the two wireless networks I deal with, and fail if it doesn’t find them.
Sound
Device: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC’97 Audio Controller
Kernel Module: snd-intel8x0
Module Provider: Linux Kernel 2.6+ or The Alsa Project
With this system, as with many others, I have opted to use the alsa-driver packages as opposed to the alsa drivers built into the kernel. The major advantage is simply having the latest revision of the drivers, while also controlling which modules get compiled by the ALSA_CARDS line in the make.conf (give or take, either speed up kernel compile and add another package to build, or slow down the kernel compile and remove the extra package). Either way configuring the card for alsa was pretty simple:
/etc/modules.d/alsa
#/etc/modules.d/alsasound for IBM R50 18363SU #By: Jason V. Mock - jason at mock dot ws #Last Updated: 05/02/03 alias char-major-116 snd alias char-major-14 soundcore alias snd-card-0 snd-intel8x0 alias sound-slot-0 snd-card-0 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss options snd cards_limit=1 #options snd-intel8x0 mpu_port=0x330 ac97_quirk=3
Unfortunately the on-board soundcard in this laptop does not support hardware mixing (the manufacturer assumes your using a OS like windows that has automatic software mixing in the event that hardware mixing doesn’t exist). So at this point you have the following options:
- Arts
- ESD
- Dmix
Of course these options stir a lot of opinion as to the best option. Arts may work fine for you if you specifically run just KDE based apps (or ones that have arts support built in) and esd conversely for gnome apps. In my honest opinion the best option is the DMix, which is simply a software mixer plugin for ALSA. It then simplifies the issue of whether the program supports alsa, oss, arts, or esd since almost all media apps support either alsa or oss (which alsa can emulate). To setup dmix I simply used the example /etc/asound.conf files from the Gentoo Wiki: HowTo – Alsa Sound Mixer AKA Dmix article.
/etc/asound.conf
pcm.ossmix {
type dmix
ipc_key 1027 # must be unique!
slave {
pcm "hw:0,0" # you cannot use a "plug" device here, darn.
period_time 0
period_size 1024
buffer_size 4096
#format "S32_LE"
#periods 128 # dito.
rate 44100 # with rate 8000 you *will* hear,
# if ossmix is used :)
}
bindings {
0 0 # from 0 => to 0
1 1 # from 1 => to 1
}
}
pcm.!default {
type plug
slave.pcm "ossmix"
}
# mixer0 like above
ctl.mixer0 {
type hw
card 0
}[Update February 3rd, 2005] – Added sound section
References
Gentoo: Power Management Guide
Gentoo Forums: HOWTO: Linux on the IBM ThinkPad R51 (and compatible models)
I’m now running into an issue where the laptop locks up for what appears to be no reason what so ever. Unfortunately nothing in the
/var/log/messagesgiving any indication as to why the lock up. The odd part is the fact that mouse activity is still up (even usb), and I can log into the laptop via SSH, so it does appear to be video in nature. For a while I was able to log in and/etc/init.d/xdm restart, but that has stopped working as that now locks even ssh access. Haven’t really had the chance and or time to research this further…Pingback: Jason Mock’s Place » Blog Archive » Finally Broke It
FYI: I’m no longer a semi-happy owner of an IBM R50, so I probably won’t be updating this any more. I will definitely leave this up however, because I’ve found the traffic to this page to be pretty high (must be useful to someone).