Debian Linux on a Pink Luxury Sony Vaio VGN-CR21E

This report is listed at TuxMobil - Linux on laptops, notebooks, PDAs and mobile phones

Pink is the new cool.  Sony, however, with their BMG screw-up, is not.
I cannot believe that i am letting "cool" override principles, but for
the sake of "Hot Pink" my god, my god, thou must forgive me just this once.
The Pink Sony Vaio VGN-CR21E is a well cool machine.  SATA drives and DVD-RAM;
IPW3945 Wireless, Ricoh Webcam, Texas Instruments 5-in-1 Cardreader:
the even better thing is - it all works!

The processor is a 64-bit Pentium T2330, 1.6Ghz.  And yes: the amd64
version of Debian works like a charm, which was a real surprise to me!
So, just remember when picking a Debian CD, to use the amd64 version.

Debian / Testing.  Again

One fly in the ointment: you must, you must use Debian/Testing for startup
because of the SATA hard drives and SATA DVD-RAM.  I installed from the
netboot mini.iso as of 21st Nov 2007 and it worked like a charm.  This
left me with a small requirement to do "tasksel install kde-desktop"
followed by the usual "apt-get --purge remove libgnome*" and
"apt-get --purge remove .*gnome*" and then apt-get autoclean as i cannot
STAND gnome and will not expose innocent users to it.

The only glitch I encountered is that, as with large number of laptops,
the X server doesn't do console mode after having gone into x-windows
and so I recommend that you do NOT do a desktop install (uncheck the
option from the task selection - leave laptop and standard system though)
then "apt-get install ssh", then ssh in from another machine and THEN
do "tasksel install kde-desktop".

This will allow you to find out what the hell is going on with the
configuration of xserver-xorg, which screwed up, then left me with
a dpkg question that I could neither see nor answer.  By pressing
random buttons (Enter a few times, I think) I might have been able
to successfully answer whatever dpkg question it was that I couldn't
see, and then Ctrl-Alt-Delete to reset the machine and it was ok.
So - do make your life easier by ssh'ing in to the box so you can
find out what's going on, on a shell prompt that doesn't get taken
away from you!

If it makes your life any easier, and you want to try e.g. creating
an xorg.conf file before-hand or something, here's what ended up
being created: xorg.conf.


Also I have a preference for cpufreqd to run the ondemand module,
not the performance module, even and especially on AC.  I don't
care if it takes a while to kick in: the silence of the fan and
the reduced temperature far outweighs the benefit of having the CPU
run at "convenient" speeds.

cpufreqd and cpufrequtils seem to have improved quite a lot over
the past year: autodetection of the cpu module actually works,
and so I didn't have to add cpufreq_ondemand or p4_clockmod or
any rubbish like that to /etc/modules, which I've always had to
do for previous systems.  If you're interested, this is the
/etc/cpufreqd.conf used.

random useability configuration...

I made my usual edits to make the system useable.  /etc/default/rcS
I changed fsckfix="no" to "yes"; I added export KDE_IS_PRELINKED="1"
and KDE_EXEC_SLAVES="1" to /etc/profile, and I ran
"prelink -q -v -a --random --conserve-memory".  These are important
changes for two reasons: one, KDE runs a lot faster when you switch
off the stupidity that was added for coping with when Pentium II
500mhz systems were All The Rage. two: having fsck fix a filesystem
that you're only going to do by running fsck -a and then holding your
finger down on the "y" key - I mean, the only sensible thing is to
let it be done automatically.

Also, I have to admit: I am a fan of
for libdvdcss2 and w32codecs (which don't exist for amd64.  damn.) 
And, also, of adding nonfree and contrib to /etc/apt/sources.list
(included here for convenience).  Then you can add flash and mozplugger
"apt-get install libflash-mozplugin flashplugin-nonfree mozplugger"
and, on Debian/Testing on amd64, the wrapper install script is run
automatically!  Ubuntu it's a pain - you have to run it by hand.
You will find mozplugger to be very useful: pdfs for example will appear
in a firefox window rather than having to be downloaded and run by a
separate program.


The webcam at the moment, a Ricoh, needs the module from here:
r5u870 discussion.  You will need to register and log in.  Remember to
"apt-get install build-essential gcc-4.1 linux-headers-2.6.22-2-amd64"
or whatever kernel is current of debian/testing; remember also to
do "make; make install; cp *.fw /lib/firmware" because the daft make install
doesn't copy the required firmware (r5u870_1938.fw) although it copies
everything other bit of damn firmware supplied.


Sound was a pain - the snd-hda-intel module, everywhere it's used, is
listed as "experimental".  A little searching, especially for
"Sony Vaio snd-hda-intel", showed weirdness about module options
such as position_fix=2 and advising to experiment by incrementing
this option until things work.

Trying to get it to work whilst running KDE most certainly made things
very unhappy - it was only after a reboot did, to my great surprise
and delight, sound actually work.  The nice thing is that it was sound
that I was struggling with (all the other exotic hardware worked fine).
Here is the /etc/modprobe.d/sound file I ended up with.

card reader

The Texas Instruments card reader just works fine - insert an SD card
and hotplug reacts accordingly: KDE responded by asking to show the
contents of the SD card somewhere in media:/

Modules to load are tifm_7xx1 and tifm_sd.


The ipw3945 requires that you add contrib non-free to /etc/apt/sources.list
and "apt-get install firmware-ipw3945 ipw3945d ipw3945-modules-2.6-amd64".
I did just have a blip in the ipw3945 after a couple of hours, which
disconnected the wireless: I don't know why...

Also, I have found that wlassistant is incredibly useful: it works,
it detects networks, it allows you to configure them, including WEP
and passwords - just run it, and get on with it. remember to install
with "apt-get install wlassistant", and remember to run it with
"sudo wlassistant" rather than run it as an ordinary user.
for convenience.

which reminds me... kdesu...


One of the most useful desktop-based configuration tips I've ever
found, for ordinary users, is to set up kdesu.  This avoids the need
to give users a root password, especially when you set up sudo for
them with no password.  Just... bear in mind that doing that makes
for a thoroughly-compromisable system!  (So, whatever you do, don't
roll that out en-masse across hundreds of systems if you're an OEM
reading this!)  I do it for a few dozen users, for their convenience,
because I don't want them ringing up asking for the root password.
If you do sudo in the standard way (i.e. not adding NOPASSWD) then
they only need to know their own password.

Search on google for "kdesu sudo" gives these:

mkdir -p ~/.kde/share/config
cat < ~/.kde/share/config/kdesurc >> EOF

finishing up - conclusion

After all those dodgy modules, which aren't entirely supported by hotplug
detection yet, these are the additions to /etc/modules which are required:


But - damn, this Linux stuff is getting good :)  Overall - this is the
first machine with really cool hardware that all just... works.  The
days of proprietary hardware with stuff that you have to wait for a
couple of years for it to be supported are coming to an end.

The cpuinfo can be found here.
The meminfo can be found here.
The lspci info can be found here.
The lspci -v info can be found here.
The dpkg -l list of packages: here.

p.s. - welcome, sony style support!

a final word, to all the sony style support team who read the case
where i swore deliberately and excessively at the total lack of interest
from the web form that made it extremely difficult to tell you that i use
linux, exclusively.

many thanks for telling me that you have absolutely no interest in
helping with the difficulties i experienced getting sound to work.
perhaps the fact that this report is top of the search results for
"sony vaio cr21e", fourth (*1) for "sony vaio debian" and ninth (*2) for
"sony vaio linux" will help knock some sense into sony, with a view
to preinstallation of linux as a viable option on the excellent
hardware that they produce.

with a view, of course, to helping customers keep free of viruses,
spyware, and, of course, helping sony's bottom line by eliminating
unnecessary support calls and the cost of paying for a proprietary
operating system up-front.

(*1) Update Jan 6th 2007: first.
(*2) Update Jan 6th 2007: fifth.  and 15th for "sony vaio".  good
grief, what's going on???