INSTALLING LINUX ON A SONY VAIO V505BX (PCG-V505BX)
Output From lspci -tv
I did a little bit of reading up before I tried to install linux on this machine. The references are:
I started with a Red Hat 7.3 installation and updated the kernel to 2.4.23. As far as I could tell, I was able to get pretty much everything EXCEPT OpenGL to work. The problem wasn't with the kernel, but the older version of XFree86 (Red Hat 7.3 uses 4.2, which apparently did not have good DRI support for the Radeons). So, rather than recompiling from source to update my system (as I can recall, XFree86 took a long time to compile), I went ahead and used Red Hat 9.0 for my base (re)install. (Incendentally, Red Hat 9.0 did not give me the option of creating a user account during the setup process. I also do not like their new way of grouping packages and forcing a 1.5GB+ install -- their minimal installation option was found wanting.)
Just in case you were wondering, I formatted the the entire drive without making the restoration CDs Sony allows you to make. I am pretty sure that I won't be regretting that decision.
Linux Kernel 2.4.23 Options
I'm still trying to tweak my kernel config file. Once I find a config I can be happy with, I'll post it here. I definitely recommend using the graphical interface (use: make xconfig) if you're not too familiar with setting up the kernel options. Before you start compiling, you should make sure to patch the orinoco_pci driver with this patch
The patch above IS NOT in the latest kernel (2.4.23 as of this writing) so you WILL need it in order to get your wireless networking card to be recognized.
ACPI, spicctrl, sonypi
ACPI was compiled into the kernel. If you use the module, I recommend compiling all the (relevant) ACPI into the module (use Y and not M) so that you have ONE SINGLE module to load. Otherwise you'll end up having to load several different modules to get complete ACPI support. You DO NOT need to patch kernel 2.4.23 with any of the patches referred to by the links above -- they're already in there. Anyway, you should definitely download the ACPI daemon (acpid) and install it.
Once you have acpid installed, (this should create the directory /etc/acpi along with some subdirectories (namely actions and events). As complicated as it may seem, the way you use acpid is quite simple. Create event handlers in your /etc/acpi/actions directory and they will be called by the event handler. In order for the event handler to know what action to take, you'll need to create "config" files in the /etc/acpi/events directory. Each file in the events directory should contain two lines:
The first line is the event (in this case, we're trapping all events relating to ac_adapter). The second line tells the acpid event handler where to find the file to execute upon any ac_adapter event.
This is a fairly robust script (configurable as well) which I wrote to handle any change in the power source. Bascially, it changes the cpu performance and throttling options. To find out more about how many different performance and throttling states there are, refer to the /proc/acpi/ directory and http://acpi.sf.net. You may want to install sonypi and spicctrl if you wish to be able to use the Fn key combos as well as to adjust the LCD lighting. Below are the rest of my scripts... I'm still working on something for the thermal zone.
If you want more specific event handling, you will need to know more about the ACPI events. While no one has really documented any of the events, they are listed in include/acpi/acpi_drivers.h I will try to write some documentation on this once I have finished playing around with the event handling system. You might also want to get radeontool if you have Radeon-based video card to turn off the back light.
Ethernet And Wireless Ethernet
My ethernet drivers are set up via /etc/modules.conf with the lines:
Neither card is set up during boot (to speed up the booting process since dhcp is currently set to use a long timeout and since I'm picky about when to use which ethernet interface). That is, the modules are loaded, but I set up the init scripts to stop just short of calling ifup. When I want to use, say, wireless ethernet, I just manually run ifup eth1. For the other interface, I would use ifup eth0. Both ethernet interfaces work without problems.
I also compiled the e100 module for the internal ethernet card. You can use the e100 module (Intel driver) in place of the eepro100 module. I have encountered no problems with the eepro100 module, and don't plan to test out the e100 module until I do encounter problems with the eepro100 driver. (Oh yeah... I did load this module for the 2.4.23 kernel during the Red Hat 7.3 trial and it worked without problems.)
The built-in audio works without needing a kernel update. I just had to make sure that I didn't forget to add support for it in the kernel I intended to compile. You might run into problems with audio playback -- sounds may play back smoothly but slowly, or even in "chunks" with tiny pauses in between. This is because the i810_audio driver may sometimes have problems computing the clocking. (Check your /var/log/messages after loading the i810_audio module) You can easily fix this problem (for good) by adding the option clocking=48000 when loading i810_audio. Alternatively, have the following lines in your /etc/modules.conf file:
UPDATE: (12-DEC-2003) I was tinkering around with xmms today. After installing an updated version of xmms (1.2.8), which includes the mp3 playback plugin removed by Red Hat, I had trouble getting audio CDs to play. This was quickly fixed by editing the options for the audio CD plugin -- use digital mode (instead of the default analog).
PCMCIA And Firewire
The Ricoh cardbus is loaded using the ohci1394 module (which also requires the ieee1394 module). The modules load fine; sadly I do not own any firewire products to test whether or not the port even works. Until I do, this module will not be loaded on boot. The PCMCIA cardbus module loads fine using the yenta_socket module. Red Hat users should read on... The 2.4.23 kernel module creates /lib/modules/2.4.23/kernel/pcmcia which contains only symlinks to the actual PCMCIA modules. The problem is that the PCMCIA init script assumes that the existence of such a directory implies the system is running Slackware. As a result, the script modprobes with the .o extension rather than leaving off the .o extension as done in Red Hat systems. So either delete that directory or modify your init script so that it loads at the time you would like them to load using the correct modprobe syntax.
The NEC USB controller uses the usb-ohci driver. You will need the ehci-hcd driver for the NEC USB 2.0 controller (which also needs usb-ohci -- one more reason to make sure to include usb-ohci). My USB MS Intellimouse works fine. In X, I can use both the USB mouse as well as the touchpad mouse. (You just need to configure them both using "CorePointer" and "AlwaysCore" options -- the first for the touchpad and the latter for the USB mouse.) The drivers for the memory stick seem to work fine (but like firewire, I have no hardware to test the driver). If you're wondering, the Sony memory stick requires USB SCSI support. There is just one small issue -- nothing which seems to affect operation of USB hardware, however. When using lsusb I get a number of "Unknown line at line XXXX" messages followed by a correct listing of all the USB hardware attached to the various buses. I'm still trying to figure this out, so more to come later... I hope.
CD-RW/DVD-ROM And CD Creating
The CD-RW/DVD-ROM drive appears to work without any problems (with the help of kudzu). I have not yet tested out any DVD roms or watched any DVD videos. I have not yet created any CDs either. Once I get the chance to do any of these things, I will update here.
UPDATE: (09-DEC-2003) I just burned the first ISO image of Fedora Core 1 using xcdroast. The writing session went well and no problems were found. They CDROM is mountable under linux, and is also readable under Windows. DVD reading/testing still to come...
UPDATE: (12-DEC-2003) I compiled ogle and tested out the DVD-ROM drive with a bit of Trek. The first attempt produced some errors about root priviledges -- but it in fact was erroneous error message. It turns out you need to have /dev/dvd symlinked to /dev/scd0 (aka the CDRW drive). Once that was done, I played an episode of Star Trek Deep Space 9 (season 7) without any problems. The framerate could have been a bit better -- it kept steady at around 30 fps. Perhaps the color depth of X could have something to do with it? I know it does for OpenGL programs... in any case, it worked.
Everything seems to working without problems. There are some details I woud like to eventually work out: