Installing Debian on an Angel 3000C / Clevo M350C
My wife and I recently bought an Angel
3000C laptop. The store claimed that they'd pre-install Linux on
it, but they had some trouble. Once they told us the machine was
actually a relabelled Clevo
M350C, we were able to get things done.
If you want to use RedHat on this machine, there's another site by someone
else, though it's sometimes down.
You can contact us at linux at paip dot net if you've got
questions or comments. Please include the word "Clevo" in your subject
line, or we're likely to miss it. :-p
Specs
Here's what the machine's got installed:
00:00.0 Host bridge: Intel Corp. 82852/855GM Host Bridge (rev 02)
00:00.1 System peripheral: Intel Corp.: Unknown device 3584 (rev 02)
00:00.3 System peripheral: Intel Corp.: Unknown device 3585 (rev 02)
00:02.0 VGA compatible controller: Intel Corp. 82852/855GM Integrated Graphics Device (rev 02)
00:02.1 Display controller: Intel Corp. 82852/855GM Integrated Graphics Device (rev 02)
00:1d.0 USB Controller: Intel Corp. 82801DB USB (Hub #1) (rev 03)
00:1d.1 USB Controller: Intel Corp. 82801DB USB (Hub #2) (rev 03)
00:1d.2 USB Controller: Intel Corp. 82801DB USB (Hub #3) (rev 03)
00:1d.7 USB Controller: Intel Corp. 82801DB USB2 (rev 03)
00:1e.0 PCI bridge: Intel Corp. 82801BAM/CAM PCI Bridge (rev 83)
00:1f.0 ISA bridge: Intel Corp. 82801DBM LPC Interface Controller (rev 03)
00:1f.1 IDE interface: Intel Corp. 82801DBM Ultra ATA Storage Controller (rev 03)
00:1f.5 Multimedia audio controller: Intel Corp. 82801DB AC'97 Audio Controller (rev 03)
00:1f.6 Modem: Intel Corp. 82801DB AC'97 Modem Controller (rev 03)
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
01:02.0 FireWire (IEEE 1394): Texas Instruments TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link)
01:09.0 CardBus bridge: ENE Technology Inc CB1410 Cardbus Controller
Note: we don't have the model with the built-in wireless; we use an
Orinoco PCMCIA card for that. We've got 512MB of RAM in the machine,
and a DVD-ROM drive (not a writer).
Get yourself a Debian 3.0 install CD. You only need disk 1. We used
an ethernet connection to install the packages not on the CD.
Basic Debian Installation
- Go into the System Configuration Utility by using Ctrl-Alt-S
when prompted on boot (be quick; you've only got around 1 second).
- enable booting from CD:
- Startup -> Boot Device ->
- 1st Device: CD-ROM Drive
- 2nd Device: Hard Disk C
- Set Video RAM to 32MB:
- Memory -> VGA Shared Memory ->
- 32MB
- Save and Exit:
- Boot the Debian 3.0 disk
- Partition your disk. Make your swap partition at least 1.3 to
2 times as large as the amount of memory you have. This will be
important for suspend-to-disk to work.
- I use:
hda1 32MB /boot partition [Bootable, beginning of disk]
hda2 large / partition
hda3 1GB swap partition [end of disk]
- Activate hda3 as your swap partition
- Initialize hda2 as / with ext3
- Initialize hda1 as /boot with ext3
- Install kernel and driver modules
- Use the CDROM for installation
- Configure Device Driver Modules
- Configure the Network
- Install the Base System
- Make System Bootable
- Reboot the System
- Be sure to eject the CDROM before rebooting
- Set hardware clock to GMT
- Set local timezone
- Enable MD5 passwords and shadow passwords
- Select a root password
- Create a user account
- If it asks you to remove the PCMCIA packages, you may as well;
you'll install a newer version later.
- Reinsert your Debian CDROM and select cdrom installation
- Select other apt sources near you
- Run tasksel
- Select only the C/C++ development tools for installation
- Don't bother installing X yet; we'll get the right version
for your video card later. (The version Debian would install
for you doesn't support your video card.)
- Don't run dselect
- Let the rest of the installation happen
Building and Installing a new kernel
Building a custom kernel will get a bunch of things working,
including audio, ethernet and USB. We'll also add some patches (see below).
- Log in as root
- apt-get install libncurses5-dev wget bzip2
- cd /usr/src
- Download a copy of linux-2.4.23.tar.bz2:
- Get the ACPI patch for 2.4.23:
- Get the SWSUSP patches for 2.4.23:
- Get my config file for the kernel:
- Unpack and patch the kernel:
- tar xjvvf linux-2.4.23.tar.bz2
- chown -R root.root linux-2.4.23
- ln -s linux-2.4.23 linux
- cd linux-2.4.23
- bzcat ../acpi-20031203-2.4.23.diff.bz2 | patch -p1
- bzcat ../software-suspend-2.0-linux-2.4.23.bz2 | patch -p1
- bzcat ../software-suspend-2.0-core-rc3A.bz2 | patch -p1
- Configure the kernel:
- make menuconfig
- Scroll to the bottom, and choose "Load an Alternate Configuration File"
- Use /usr/src/config-clevo-m350c
- Now you can customize your configuration, if you wish.
- When you're done, Choose Exit, and save your new kernel configuration.
- Build your new kernel:
- make dep && make bzImage && make modules && make modules_install
- Install your new kernel:
- cp System.map /boot/System.map-2.4.23
- cp arch/i386/boot/bzImage /boot/bzImage-2.4.23
- Edit /etc/lilo.conf:
- Under "image=/vmlinuz", change
"label=Linux" to "label=linux-orig".
- Add the following between "default=Linux" and
"image=/vmlinuz". Note that hda3 should be your
(large) swap partition:
image=/boot/bzImage-2.4.23
label=Linux
append="resume2=swap:/dev/hda3"
read-only
image=/boot/bzImage-2.4.23
label=noresume
append="resume2=swap:/dev/hda3 noresume2"
read-only
- Run lilo to install the new kernel:
- From now on, when you boot, you'll have three choices at the
lilo prompt. [Press "Shift" when you see "LILO 22.2" to get the
prompt.] "Linux" is the default, and should be what you'll use
most of the time. "linux-orig" is the kernel that came with
Debian. You can use this to boot if something went wrong with
building the new kernel. "noresume" is for booting after
suspend-to-disk, if you just want a clean boot, and not to
resume from the saved state.
- Reboot into the new kernel (be sure to eject the CDROM):
Building and Installing PCMCIA
- Log in as root
- cd /usr/src
- Download a copy of pcmcia-cs-3.2.7.tar.gz:
- Unpack and build it:
- tar xzvvf pcmcia-cs-3.2.7.tar.gz
- cd pcmcia-cs-3.2.7
- make config (all the defaults should be correct)
- make all
- make install
- ln -s ../init.d/pcmcia /etc/rc0.d/K89pcmcia
- ln -s ../init.d/pcmcia /etc/rc1.d/K89pcmcia
- ln -s ../init.d/pcmcia /etc/rc2.d/S11pcmcia
- ln -s ../init.d/pcmcia /etc/rc3.d/S11pcmcia
- ln -s ../init.d/pcmcia /etc/rc4.d/S11pcmcia
- ln -s ../init.d/pcmcia /etc/rc5.d/S11pcmcia
- ln -s ../init.d/pcmcia /etc/rc6.d/K89pcmcia
- Start PCMCIA:
X Windows
This is going to be a little tricky. Support for the video card in
this laptop was only added to XFree86 version 4.3.x, which isn't even in
Debian unstable (at time of writing), but it is in experimental.
- Edit your /etc/apt/sources.list:
- Remove the reference to the CDROM
- For everything except the security.debian.org line, change
"stable" to "unstable".
- Add the following line:
- deb http://mirrors.kernel.org/debian/ ../project/experimental main
- apt-get update
- Fetch the list of packages in experimental:
- Examine that Packages file, and for each of the following, note
the version of the package listed. (That's the version that's
currently in experimental, and it's the version you'll need to
explicitly specify.). In parentheses, I've also listed the version
that was there at the time of writing, but it changes rapidly, so
it'll likely be wrong for you. It's likely they will all be the same
version, but not for sure.
- lbxproxy (4.3.0-0pre1v5)
- libice6 (4.3.0-0pre1v5)
- libsm6 (4.3.0-0pre1v5)
- libx11-6 (4.3.0-0pre1v5)
- libx11-dev (4.3.0-0pre1v5)
- libxaw7 (4.3.0-0pre1v5)
- libxext-dev (4.3.0-0pre1v5)
- libxext6 (4.3.0-0pre1v5)
- libxft1 (4.3.0-0pre1v5)
- libxi6 (4.3.0-0pre1v5)
- libxmu6 (4.3.0-0pre1v5)
- libxmuu1 (4.3.0-0pre1v5)
- libxp6 (4.3.0-0pre1v5)
- libxpm4 (4.3.0-0pre1v5)
- libxrandr2 (4.3.0-0pre1v5)
- libxt6 (4.3.0-0pre1v5)
- libxtrap6 (4.3.0-0pre1v5)
- libxtst6 (4.3.0-0pre1v5)
- proxymngr (4.3.0-0pre1v5)
- twm (4.3.0-0pre1v5)
- x-dev (4.3.0-0pre1v5)
- x-window-system (4.3.0-0pre1v5)
- x-window-system-core (4.3.0-0pre1v5)
- xbase-clients (4.3.0-0pre1v5)
- xdm (4.3.0-0pre1v5)
- xfonts-100dpi (4.3.0-0pre1v5)
- xfonts-75dpi (4.3.0-0pre1v5)
- xfonts-base (4.3.0-0pre1v5)
- xfonts-scalable (4.3.0-0pre1v5)
- xfree86-common (4.3.0-0pre1v5)
- xfs (4.3.0-0pre1v5)
- xfwp (4.3.0-0pre1v5)
- xlibmesa-dri (4.3.0-0pre1v5)
- xlibmesa-gl (4.3.0-0pre1v5)
- xlibmesa-gl-dev (4.3.0-0pre1v5)
- xlibmesa-glu (4.3.0-0pre1v5)
- xlibmesa-glu-dev (4.3.0-0pre1v5)
- xlibs (4.3.0-0pre1v5)
- xlibs-data (4.3.0-0pre1v5)
- xnest (4.3.0-0pre1v5)
- xprt (4.3.0-0pre1v5)
- xserver-common (4.3.0-0pre1v5)
- xserver-xfree86 (4.3.0-0pre1v5)
- xterm (4.3.0-0pre1v5)
- xutils (4.3.0-0pre1v5)
- xvfb (4.3.0-0pre1v5)
- Use the version numbers you found to construct an apt-get
install command (this is all one single command on one line):
- apt-get install lbxproxy=4.3.0-0pre1v5
libice6=4.3.0-0pre1v5 libsm6=4.3.0-0pre1v5
libx11-6=4.3.0-0pre1v5 libx11-dev=4.3.0-0pre1v5
libxaw7=4.3.0-0pre1v5 libxext-dev=4.3.0-0pre1v5
libxext6=4.3.0-0pre1v5 libxft1=4.3.0-0pre1v5
libxi6=4.3.0-0pre1v5 libxmu6=4.3.0-0pre1v5
libxmuu1=4.3.0-0pre1v5 libxp6=4.3.0-0pre1v5
libxpm4=4.3.0-0pre1v5 libxrandr2=4.3.0-0pre1v5
libxt6=4.3.0-0pre1v5 libxtrap6=4.3.0-0pre1v5
libxtst6=4.3.0-0pre1v5 proxymngr=4.3.0-0pre1v5
twm=4.3.0-0pre1v5 x-dev=4.3.0-0pre1v5
x-window-system=4.3.0-0pre1v5
x-window-system-core=4.3.0-0pre1v5 xbase-clients=4.3.0-0pre1v5
xdm=4.3.0-0pre1v5 xfonts-100dpi=4.3.0-0pre1v5
xfonts-75dpi=4.3.0-0pre1v5 xfonts-base=4.3.0-0pre1v5
xfonts-scalable=4.3.0-0pre1v5 xfree86-common=4.3.0-0pre1v5
xfs=4.3.0-0pre1v5 xfwp=4.3.0-0pre1v5
xlibmesa-dri=4.3.0-0pre1v5 xlibmesa-gl=4.3.0-0pre1v5
xlibmesa-gl-dev=4.3.0-0pre1v5 xlibmesa-glu=4.3.0-0pre1v5
xlibmesa-glu-dev=4.3.0-0pre1v5 xlibs=4.3.0-0pre1v5
xlibs-data=4.3.0-0pre1v5 xnest=4.3.0-0pre1v5
xprt=4.3.0-0pre1v5 xserver-common=4.3.0-0pre1v5
xserver-xfree86=4.3.0-0pre1v5 xterm=4.3.0-0pre1v5
xutils=4.3.0-0pre1v5 xvfb=4.3.0-0pre1v5
- Select the "i810" X server driver when asked
- "/dev/psaux" for the mouse port
- "PS/2" protocol
- Yes, your monitor is LCD. Choose Advanced settings. The
horizontal sync range is "31-60", and the vertical refresh range is
"56-75". Choose "1024x768", "800x600", and "640x480" for your video
modes. Choose 24 default colour depth.
- Answer Y to all questions about replacing configuration files.
- Now go back and remove the "experimental" line from your
/etc/apt/sources.list files. Leave the "unstable" lines alone.
- apt-get update
- Now install Gnome (this will install a whole lot of packages):
- apt-get install gnome
- If it gives you an error about gnome-games, do "mkdir
/var/games" and try again. Don't worry, you won't have to
download anything a second time.
- Install gdm:
- apt-get install gdm
- Select it as your default display manager
- Answer Y to all questions about replacing configuration files.
- Edit /etc/X11/XF86Config-4 to reflect the amount of video RAM
you configured way above (minus a little for overhead). Find the
line that says "VideoRam", and change the value to 32626. (Assuming
you chose 32MB video RAM.)
- Try it out!
- /etc/init.d/xfs start
- /etc/init.d/gdm start
- You should see the gdm screen come up, and the mouse should
work. Switch back to the text console with Ctrl-Alt-F1.
Trackpad scroll buttons
If you want the up/down scroll button on the trackpad to work, you need
to install a special driver.
- Download and install the driver:
- Configure XFree86 to use the driver. Edit /etc/X11/XF86Config-4:
- At the end of the "Module" section, add:
- Remove the line Option "CorePointer" from the
"InputDevice" section called "Configured
Mouse".
- Add an additional "InputDevice" section just before the
"Device" section:
Section "InputDevice"
Driver "synaptics"
Identifier "Mouse[1]"
Option "Device" "/dev/psaux"
Option "CorePointer"
Option "Protocol" "auto-dev"
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.18"
Option "AccelFactor" "0.0010"
# Option "SHMConfig" "on"
# Option "Repeater" "/dev/ps2mouse"
EndSection
- In the "ServerLayout" section, remove the
lines InputDevice "Configured Mouse" and
InputDevice "Generic Mouse". Replace them with the
line InputDevice "Mouse[1]" "CorePointer".
- Here's a
copy of what the XFConfig86-4 file looks like at the
end.
- Restart gdm to activate the new driver:
Power management
This laptop uses ACPI instead of APM to do power management. We've
already compiled the important pieces into the kernel, but we still need
the user-lever daemons.
- apt-get install acpi acpid
- cd /tmp
- wget http://aleron.dl.sourceforge.net/sourceforge/swsusp/suspend.sh
- bash suspend.sh --install
- cd /etc/acpi/events
- cp powerbtn sleepbtn
- Edit sleepbtn:
- Change every occurrence of "power" to "sleep".
- In vi, that's: :%s/power/sleep/g
- cd ..
- Make the file sleepbtn.sh containing:
#!/bin/sh
/usr/local/sbin/hibernate
- chmod 755 sleepbtn.sh
- /etc/init.d/acpid restart
- Now you should be able to hibernate the machine by hitting
Fn-Esc. (It takes a bit of time sometimes.) When you turn it back
on, it will boot Linux, and then restore the saved state from disk.
- If you push the power button, it will do a clean shutdown.
Winmodem
You need special drivers to get the Winmodem to work under Linux.
- Build and install the drivers:
- cd /usr/src
- wget http://linmodems.technion.ac.il/packages/smartlink/slmdm-2.7.10.tar.gz
- tar xzvvf slmdm-2.7.10.tar.gz
- chown -R root.root slmdm-2.7.10
- cd slmdm-2.7.10
- Now there's a weird bit, as mentioned at http://www.vgcomputing.com.au/lrtecras1.html#Modem:
edit amrmo_init.c, and change the number in line 75 from
0x2486 to 0x24C6 (just like the line below
it).
- make
- make install-amr
- Edit /etc/modutils/aliases, and add the following at the
bottom:
alias char-major-212 slmodem
alias slmodem slamrmo
options slmdm country=USA
- (Set your own country, of course. You can use /usr/src/slmdm-2.7.10/slver -c to get a list of countries.)
- update-modules
- Test it:
- apt-get install minicom
- minicom
- You should see lines like "AT S7=45 S0=0"... and "OK". If
you see the "OK", the modem is responding properly.
- Type Ctrl-A followed by X to exit Minicom.
Leftovers
Using Fn-F6 to switch CRT/LCD output works fine at the LILO prompt,
but not once the machine is booted, for some reason. (The machine seems
to crash hard.) I don't know why that is. But if you just leave the
machine in the state where it outputs to both the LCD and the CRT, it
seems to happily stay there, even across reboots. So then just plugging
in something to the VGA port will work.
I haven't tested the S-Video Out, but I doubt it'd work; I've never
seen that work under Linux.
I think Firewire is the only thing left. Unfortunately, we don't have
any Firewire devices to test with. The kernel build, above, compiled
Firewire support as modules, so it may very well work, or it may need
some more hacking.
Last update: 20040102