Debian Linux on Sony Vaio CR-190.
Date: 10 September 2007.
Caveat: This is true as of this date. A month from now everything might change.
This will outline one possible route to getting Debian 4.0 Testing onto a Sony Vaio CR-190.
Basic specs:
|
Item |
Type |
Status |
|
CPU |
Intel Core Duo 2 T7100 |
Works |
|
RAM |
1G default, 2G on mine |
Works |
|
GPU |
Intel X3100 |
Works, OpenGL 890 FPS |
|
Sound |
Intel HDA ICH8 Audio |
Works |
|
Wireless |
Intel 4965 ABGN |
Works mostly; when set to autostart in static IP mode, works on startup. When set to autostart in DHCP mode, it does not work until you (as root) do a network restart (“sudo /etc/init.d/networking restart”). |
|
Ethernet |
RealTek 8101E |
Works |
|
Webcam |
Internal, unknown type |
No Go |
|
Memory card reader |
Texas Instruments 5-in-1 Multimedia Card Reader |
Not out of box but I didn't really try. |
|
Flash |
Adobe |
Working |
The Distro:
I wound up going with a straight Debian Testing (64-bit) for the end product for the following reasons:
I stuck with a Debian-based distribution because I know it the best and Ubuntu is based on Debian Testing anyways.
The key difference between Ubuntu, MEPIS and other Debian derivatives is that they have tweaked the systems to be automatic with a large cross-section of the hardware available whereas Debian is more of a vanilla “blank slate” with very few if any assumptions made on the target hardware. This is largely why Ubuntu et al run on maybe 3 architectures (32, 64 bit Intel and PPC) where Debian runs on 30. Consequently, when you hit some new bleeding-edge hardware like what is present in the CR-190, you need the blank slate to work with and Debian, traditionally the “harder” distribution, can actually be the easiest to get to work.
MEPIS 6.95 B3 was KDE-based, had video (to an extent) and audio working out of the box. Wireless and full video acceleration were MIA after several hours of effort.
Ubuntu Gutsy Tribe 5 (latest beta of version due out in October 2007) had audio, video and with a little work wireless working. The reason this was discarded was that A. It was an Alpha release, susceptible to breakage and B. while I got all of the key stuff working, something was wonky with the C runtimes because anything compiled on that machine, even the simplest apps, crashed with a core-dump.
Ubuntu Feisty needed a hack which basically back-ported the Intel video drivers out of Gutsy back to Feisty to get anything better than a rather hideous 800x600. Additionally, wireless refused to work consistently.
Now the Debian installation procedure may seem convoluted to the uninitiated but it wasn't that bad if you knew what you were doing.
The Installation:
I used a Debian netinst image, which installs a tiny portion of Debian and installs the rest from the Internet. Specifically I downloaded and installed this:
The thing to know about the difference between Debian Testing and “test” versions of other distributions is that Debian has a historically long test period for packages and that for something to land in the “testing” zone, it has to be nearly defect-free for a long period of time. Testing for other distros is usually beta or even alpha-quality releases, often a LOT more buggy.
Anyhow, I initially used a regular ethernet connection to do the installation but even with that, even though Debian found the network card, for some reason it refused to move data. Thus, I rebooted, pressed F6 when given the chance for a custom install, and entered:
install vga=771 noapic nolapic
From here the text-based installer worked like normal; you set up the usual suspects (time zone, language, etc). When it got to the hard drive portion, I told it to use the whole hard disc and used the default partitioning. When asked about the package selection, accept the defaults (desktop, laptop and base system).
The installation will proceed to reformat the drive, install the base system, connect to the internet and pull the rest of the needed packages. Near the end of installation you will be asked to set the root password, the default user and set up the grub boot loader. Fill in the obvious information, accept the defaults for the bootloader and soon you should have to reboot. When you get finished with the reboot you will have a very plain GNOME-based installation.
Audio will work out of the box but not for long but that is OK. Wireless will not and video will only work with no acceleration. Not to worry.
Wireless and more:
What we need to do first is to enable mac80211 wireless support in the kernel so we will download a fresh batch of kernel source, configure and compile the kernel and install it. For those who care, this will be the “Debian way” of kernel compile/install in that we will create a compiled kernel in a .deb package that can then be simply installed. If anything goes wrong it can then just as easily be uninstalled but more importantly, if you have several laptops like this, the deb package can be copied to the new box and installed by-passing the kernel configure and build stage entirely. So lets get started. Open a term window and as root pull down the module-assistant and a few friends:
apt-get install module-assistant build-essential libncurses5-dev gettext fakeroot debhelper kernel-package.
Still as root:
cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.22.tar.gz
tar -zxf ./linux-2.6.22.tar.gz
cd linux-2.6.22
make menuconfig
This will start the curses-based kernel configuration tool. Configuration can be daunting if you have never done it before but there is a safe-ish way of doing this. Understand that Debian does a good job of setting sane defaults and leaves the config file for this in /boot/. So near the bottom of the screen (you should make your term fullscreen if you have not already done so) you will find a Load Alternate Config option; select this and enter the path of the config file for the pre-existing kernel here. On my system it was config-2.6.21-2-amd64. Then from here, go into networking->wireless and activate mac80211 wireless support. Set any other options you feel safe doing; when done, select Save Alternate Config, accept the default of “.config” and then exit.
When ready, at the same menu prompt enter:
fakeroot
make-kpkg --initrd --revision=custom.1.0 kernel_image
Where
custom.1.0 can be any descriptive alpha-numeric combination. I did
custom-vaio.1.0. This will compile the kernel and build a Debian
package (.deb) file for it. This will take a little while.
When
done, cd to the directory with the resulting deb file and enter:
dpkg
-i <your deb file>.
When
done, reboot; you will see your new kernel as the default option in
the bootload menu and if all goes well, you will be back to your
graphical login screen in short order.
Now,
the reason you did all of this was to get the wireless stuff to
compile since the Intel 4965 ABGN is so new. Download the latest
driver and firmware from the Intel site. Untar the firmware and move
it to /lib/firmware. Untar the iwlwifi driver, cd into the directory,
make and make install (as root). Reboot.
Go
to your System->Administration->Networking menu and configure
the wireless card for your network. Now this is the odd part; I was
only able to get it to autostart on bootup if I set to to static;
DHCP would time out on bootup. However if I manually started it after
bootup with a /etc/init.d/networking restart it worked every time.
YMMV.
Now that you have a new kernel, the audio will be gone but not to worry. Go to alsa-project.org and download the development versions of alsa-driver, alsa-lib and alsa-utils to the /usr/src folder, untar them. Switch to the alsa-driver folder, and enter:
./configure –with-cards=hda-intel
make
make install
cd into the alsa-lib folder and:
./configure
make
make install
cd into the alsa-utils folder and:
./configure
make
make install
Reboot and you will have audio once again.
Video acceleration:
As root:
apt-get install xlibmesa-dri
apt-get install xlibmesa-gl
apt-get install xlibmesa-glu
apt-get install mesa-utils
apt-get install libgl1-mesa-dri
apt-get install libgl1-mesa-glx
Restart X and you will have as much video acceleration as the Intel 3100 will provide. Not great but better than software rendering.
Flash:
Edit your /etc/apt/sources.list file to look like this:
#
# deb cdrom:[Debian GNU/Linux testing _Lenny_ - Official Snapshot amd64 NETINST Binary-1 20070908-20:55]/ lenny contrib main
# deb cdrom:[Debian GNU/Linux testing _Lenny_ - Official Snapshot amd64 NETINST Binary-1 20070908-20:55]/ lenny contrib main
deb http://ftp.debian.org/debian/ lenny main non-free contrib
deb-src http://ftp.debian.org/debian/ lenny main non-free contrib
deb http://security.debian.org/ lenny/updates main contrib
deb-src http://security.debian.org/ lenny/updates main contrib
deb http://ftp.debian-unofficial.org/debian testing main contrib non-free restricted
deb http://getswiftfox.com/builds/debian unstable non-free
Save it, do an apt-get update. It will whine about some missing PGP keys; this is expected and fixable by downloading and installing the proper keys from the above sites. Then:
apt-get install flashplugin-nonfree
And you will have flash.
This is as much as I have going but it is enough to have a very capable system. Note that strictly speaking all of the reboots were not necessary; I did them to make sure that the right drivers would load on the next reboot. Modprobe and friends would have simply loaded the drivers if need be so the only truly essential reboot was the one after the kernel upgrade.
Jeff