Installing RedHat 8.0 on Sony Vaio PCG-R505DL Journal

Contents:

My modifications to the i830-16bit utility.

03/22/03   <--- Newest Entry

12/07/02
11/23/02
11/22/02

11/21/02
11/20/02

11/17/02
11/11/02
11/10/02
11/09/02
11/08/02
11/07/02
11/04/02
11/03/02
11/02/02
11/01/02
10/31/02
10/30/02


Wednesday, 10/30/02:

So, I finally decided I could justify a laptop.  They'd always seemed like a bit of an extravagence, but the human mind is a wonder of justification!  My reasoning?  Well, lets face it.  I'm a geek.  I'm practically attached to my computers.  I program them at work, I play with them at home.  I take them apart and rebuild them for fun.  The problem with all this geekery?  It's hell on the social life.  I mean, how do you find time to get out when there's a second video card to configure to bring my system up to triple head?  Where does the time to go out and meet chicks come from when there's a water cooling system to install?  When do I get a chance to see new places and meet new people when I've got an AI library to tinker with?

The answer?  Take a computer with me!  That's right.  Sure... I can socialize whilst hard(ly) at work on a library.  Ok, so I probably won't be ripping it apart any time soon (Though if what my friend Thilo says about the RAM situation is true, I may be doing some surgery), but hey, at least I can get out of the house for the software part!

So, time to buy a laptop!


Day 1:  Looking for the right deal!

Having never spent much time with laptops, I had a lot to learn.  From what I can tell, there are approximately a zillion different models and about a hundred million different manufacturers.  Ok... so maybe I exaggerated a bit.  But you get the point, no?  There's a LOT to choose from out there!  So, lets set a few ground rules:

1) What do I want it for?
      As with any tool, find the right one for the job!  Computers are just very sophisticated tools, capable of solving many problems.  So, let's list out what I wanted:

  1. Portability - I need to be able to easily take it with me. (Biggest factor)
  2. Multi-media: a big perk is ability to play DVDs on plane trips (Family is back in Ohio, I'm in Vegas... 3 hour flight goes so much faster with a film).
  3. OS familiarity: I'm a *nix junkie.  I've been only half-jokingly called a crumudgeon.  I need a laptop that can take a proper OS.
  4. addendum to C - MS Tax!  Since I want to put Linux on it, if possible, I'd like to avoid the MS Tax for an OS I don't plan to use.
  5. Price: At this point in my life, I decided I could handle no more than $1500 after everything was said and done.  After S&H of about $30, and the possibility of sales tax, that puts the primo-price range in the mid-high $1300's.

So, with all that in mind, I started searching.  Very quickly, I came across a couple of interesting facts:

   1) P4 Northwood vs P4 Mobility!  Much to Intel's chagrin, many laptop manufacturers are using P4 Northwood (IE: Desktop class) proccessors in laptops!  What's the big deal you ask?  Well, traditionally, Desktop class CPUs suck down a lot more power and spew out a lot more heat.  That means 2 things in laptops - sucky battery life & heat issues/crashing.  However, the claim of the manufacturers is that the P4 Northwood CPU is really a different beast.  It uses a 0.13 Micron manufacturering process, which, long story short, means a smaller, cooler, less power-hungry CPU.  Is it sexy enough for Laptops?  That's still up in the air.  Intel says "no", manufacturer's say "yes!"  We'll find out for sure ohh... probably 2 years from now.  In the mean time, I think I still lean towards the Mobility processors.  Until I see a reputable site (Tom's or Anand-Tech, etc) take on the challenge, I'll trust Intel.

   2) Not many people sell Laptops sans OS!  After all my dilligent searching, I found that none of the major manufacturers... let me say that again ... NONE of the major manufacturers ... will sell you a laptop w/o Windows.  Discounting Mac of course.  They charge an arm and a leg and put themselves out of the running based on point E).  Now, I did find places that would sell off-brand laptops w/o an OS, and that was mighty tempting, but I'm getting ahead of myself.  Suffice it to say, things look grim if you want a good, name-brand laptop w/o a name-brand OS pre-installed and included in the price.

Now, with all that in mind, here's what I came up with.  First, I was mighty tempted by this site: www.powernotebooks.com.  They have a nice wide selection of laptops w/o OSes!  Some have good price points - specifically the Sagers.  But... All the really cheap ones have P4 Northwood's in them.  Bah.  Granted, this particular site is a strong proponent of the Northwood-is-as-good-as-Mobility camp, but, well, let's just say they're biased.  Besides, the Sager's also fail on point A - Portability.  Good god, look at the size of them!  Some weigh in at almost 8 lbs!  So, on with the search.

After some more searching, I finanly called it a night, with the intent of sleeping on it and going back the next day.  Fortun
ately, that day was a Monday and I had to go to work.  Why is that a good thing?  Well, 'cause I went to chat with my buddy Thilo!  Thilo of much knowledge.  Thilo pointed me towards the Sony and Fujitsu ultra-slim, super-sexy laptops.  He also turned me on to the thought of a Refurbished system.  Oh thank you, Thilo of many talents! ;)

So, on with the search!  I spent some time poking around sites (neglecting work, I might add :P), and finnaly found what I think I was looking for!  A Refurbished, Sony PCG-R505DL.  It's got a 1Ghz PIII-Mobility, 256MB RAM, 30GB drive, and best of all, "built in" DVD player!  Why the quotes?  Because Sony was clever... very very clever.  Clever Like A Fox!  They built the DVD player (and the oh-so-usefull FDD) into a docking "station".  The clever bit is that the docking unit (I can't call it a "station" with a straight face any more) is almost as portable as the laptop itself!  Read the specs and weep: 9.4" x 11" x 1.33", 4.3lbs.  That's for the laptop.  The docking unit adds about another inch to the width and about 2 lbs to the weight.  So all in all, it's 2.3", and about 6.35 lbs.  And, I can leave the DVD drive / extra bits at home most of the time!

And the great bit?  Since it's slightly older (the 1.2 PIII is out in the R505GS), and a refurb, I found it for $1399, + S&H (
$24.50, 2nd Day Fed Ex), from www.overstock.com.  So, sacrificing a little bit of speed (still pretty bloody fast at 1Ghz, mind you), and a little bit of the shiny newness, I found my self what looks like a winner!

The only potential problem is with the seller.  www.resellerratings.com has a very mixed view of www.overstock.com.  It looks like some people got a raw deal, while others got exactly what they wanted.  So, after a little wrangling, I decided to go for it.  While I had the cash available, I decided to play it safe and put this on the credit card.  That way, if www.overstock.com starts dicking me around, I can maybe get the credit card company to weigh in on my side.  But then, bizrate has a much better picture.  Over all, they get a mid-high %80's score, much better than the rather mixed view on resellerratings.com.  So, I figured I'd go for it.

So... the order!  *da dah dum*

Time to put my money where my mouth was.  Time to lay it on the line.  Time to pay up.  Time to... aw hell, just click the damn "Finalize Order" button already!

-=*click*=-

aahhh... the satisfaction of just having spent a large sum of money.  No debt, no monthly payments... no interest!  Just straight up cash, and I won't even have to see the bill for a month!  Wheeee... I do love credit some times.

Anyway, there.  It's done.  Currently, my "order status" page shows that the order has been shipped to Fed Ex, and right this instant, it's somewhere in Utah.  Pretty prompt response from them... ordered it Monday evening and it's off to FedEx by Wed afternoon.  Things are looking good for a Thursday or Friday delivery.  All in all, at this time it looks like Bizrate had the better picture.  If all goes well, I'll definitely have to weigh in on resellerratings.com and let people know that Overstock.com ain't all bad.  IF all goes well.

So, stay tuned for more!

What's to come?


Resolution!  Did Overstock and FedEx come through?  Will it have dead pixels from Sony's Refurb plant?  Will I have to get pissy?  Find out next time!

The Day After (shipping)...  So, now what?  Well, first up, time to remove the MS product!  None of that stuff for me, thanks much!  Time to put a proper OS on this puppy.  I'll be referring to the work others have done on similar models, posted over at linux-laptops.net, and most likely linking my results (posted here) to their site.

So, was it worth it?  A few weeks after I get my new toy up and running, I'll post some thoughts on how it all worked out.  Will I get out more?  Will I get to meet new people?  Find out!

Stay tuned for these and many more updates!

Later,

-Greg


Thursday, 10/31/02 - Halloween

Still waiting.  Anxiously.  Fed Ex says they have the laptop and that it's in Oakland.  Why it has to go to Oakland from Utah, when it's on it's way to Vegas boggles me, but yeah for the wonders of modern volume shipping.  I seem to recall hearing something about how FedEx's business model was put together by an undergrad while in college.  His prof laughed - nation-wide shipping that routes all traffice through a couple of hubs?  It'll never work!  :P  So much for the benefit of years to help your wisdom.

So, wait I did.  Besides, I had a party to go to - going away for Alan, one of my former co-workers.  He packed up and was moving back to Cali, to crash with his parents until he sorted out the job thing.  A game designer, gets laid off and goes back to crash in his parent's basement.  yeah yeah... the humor's not lost on me either.  But hey, he REALLY does have some interviews lined up.  At least, so he says...


Friday, 11/01/02 - HAPPY DAY!

It's here it's here it's here it's here it's here!!!!

But, I gotta go to work.  So I did.  One of the longest days of my life, puttering around work, trying to help QA get started on my project (more on that when it's out - hopefully not too much longer!).  Come evening, well, I got to play with it a bit!  Besides, one of the Sysadmin's at work was so kind as to burn off a copy of RH8.0 for me.  I'd not had much luck getting a good FTP connectiong going and still haven't DL'd my own copy.  Turn about's fair play, since I gave him copies of RH7.1 when it came out.  Same deal, reversed roles. ;)

So, come 6ish, time to head home!

The Low Down:

Well, I have to say, I'm impressed with Sony's refurb job.  Very slick.  Everything is really like new.  No dead pixels, everything on the web page matches exactly with the stuff I got in the box.  On the whole, I'm 100% satisfied.  So, to try and help overstock.com's rep on resellerratings, I went ahead and posted a good review.  Also sent them a nice letter, since I know how infrequently they get such things (you wouldn't believe the junk we get at work - barely anyone takes the time to write when they're happy).

The specs:

Sony PCG-R505DL
1 GHz PIII Mobility CPU
256 MB RAM
30GB HDD - 6.53 GB primary partition, 21.4 GB secondary *
Ports per spec - 2 USB, 1 S400 firewire, 10/100eth, 56k Modem (untested), memory stick, audio out and in, vga for alternate monitor, PCMCIA card slot, docking station w/ passthroughs for the USB, video, eth & firewire, plus a serial and parallel port, and a FDD and DVD-ROM, CD-RW combo drive.

Wonderful.  Except, well, I want to put Linux on it, and the partitioning of the drives leaves a little to be desired.  So, I decided to borrow my friend Chris's copy of Partition Magic.  I figure I'm using it once, it won't be at the same time as he's using it, and it's $70 software you use a couple times, maybe.  Might as well give it a go.  But no luck!  The CD was MIA at his place.  All we could find was the sleeve with the reg code.  Bummer.

After I got back from his place, I poked around a little on the web and found a nice site: http://www.zeleps.com.  Looked like a nice tool, so I DL'd it and played around a little.  The docs are a little scary though, and after a while, I realized it was quite a time comitment to get what I wanted from it.  I mean, fer cryin out loud, they want you to start messing with permissions on system files, and reset them later!  That's a bit more than I wanted to do.  At that point, it'd be faster and easier for me to just blast all partitions and repartition it from scratch.  I had no data I wanted to keep on the WinXP partition, and the package came with all the CDs necessary to restore the system.

So, I decided to sleep on it.


Saturday, 11/02/02

BestBuy, here I come!  Goals today - pick up Partition Magic, and a BackPack / laptop case combo.  I figure I could use the software again later... I've wanted it occasionally, and having it will be nice.  Besides, it's nice to have a working OS on a system you're trying to set up as dual boot.  That way you can check if things are hardware issues or just software.

So, I got to BestBuy and started looking around.  Found their nice selection of Laptop cases, and picked up one of these.  I liked the padding on it, as well as the size and number of pockets, combined with the price.  I'd have liked a little more variety in pocket internal width - they all run the entire width of the pack.  But, for the padding and price, it was the best.  I also grabbed a copy of Partition Magic 8.0, and a CD of a band I saw on MuchMusic's LOUD show (ahh... a music TV channel that, like, plays music.  Crazy Kanucks).

So, back home, and time for an install!


Or not...

Turns out, there's some fun issues with the R505 line.  For starters, the DVD/CD-RW combo drive in the base station?  That's firewire.  What does that mean?  Well, it means the system can boot off it, but when RH loads the kernel to try and start the install, it doesn't have drivers for the disc any more, and looses the drive!  Gack!  So, CD install isn't an option.  Guess it was a waste to rush getting that copy of RH8.0 on Friday, but hey.  So, I spent a couple hours dorking around before I gave up and started surfing the web.  Who knew getting Linux onto a laptop would be such a pain?

Well, for one, these guys.  But I didn't find them for a while... in fact, until after I'd gotten the install done.  So, what did I do?  Well, for starters, an FTP install!  Never done one before, but Chris has!  So, I called him up and pumped him for the info.  Turns out, the best DL site to get RH stuff to Vegas is actually out in Florida!  Yeah for internet topology, eh?  I'm guessing they're connected to a Trunk that runs this way faster than my connection from here to UCLA.  *shrug*  So, I did a net install from there, and 4 hours and some minutes later (IE: Godzilla vs. Hedora, and a quick trip up to Kmart, as well as some dinner later), I had my Linux installed.  Huzzah!  In the mean time, I did find these guys though.  I'll have to drop them a line once I get things running.  Might be nice to know some more linux geeks in town. :)

Now for the REAL fun.  Getting it to work.

Yup... things was broke.  First boot, it hung while trying to bring up the loopback network connection.  What does that mean?  Well, the loopback is a short-cut connection that some network programs use to chat with the system they're running on.  Rather than go through the full network setup, they use loopback, which shortcuts a lot of the overhead of a full network connection.  Why do it that way?  I mean, why not just talk to the host system directly?  Well, that way they can treat the host system exactly like any other.  It makes the code a lot cleaner... you don't have to have 2 sections, one for talking to other systems and one for talking to the host.

Anyway, so loopback (lo) was broken.  What's the deal?  Well, for starters, it did let me Ctrl-Alt-Del out.  That started the shutdown sequence and I could reboot.  When it came back up, I went into interactive boot, and told it to skip the networking layer.  About that time, I got frustrated and started searching the web (via the WinXP install - didn't I say it might be nice to have that on there?  You'd think I'd installed an OS or two in my day... ;).  That's when I discovered the Linux Sony web page.  Ah, what a godsend!  Lots of email in the archive about the various issues with the R505 line, specifically the later ones like mine.  Unfortunately, most of them were dated from May-June, prior to RH8.0.  So, no real help there!

However, it was getting late, and we had ANOTHER going away party for Alan... turns out he hadn't hit the road yet after all.  He was crashing over at Chris's place still.  So, another get together was had, with much merryment all around.

After that, it was time for bed, and the Laptop struggles could wait.


Sunday, 11/03/02

Boot-sequence HELL.

Ok, so things didn't go well on Sunday.  I dug into the scripts some and discovered many interesting things.  Eventually, I got fed up and sent mail to the Linux Sony list... but more on that in Tomorrow's post.

What did I discover?

Well, it turns out that the boot sequence was snafu'd.  Loopback and Eth0 both hung, as did the PCMCIA boot.  Skipping all of those let me get to the login prompt, but then I wouldn't have network support, or the ability to add a PCMCIA card!  So, I spent some time playing around with disabling different parts, and trying to manually start networking - kinda of mish-mashed together.  Not very rigorous, but hey.  Granted, that lack of rigor did bite me.  I did get networking up manually once, but I forgot to write down which things I had disabled when I did, and couldn't recreate it later.  If I'd been paying attention, I might not have had to send out mail to the Linux Sony list... or maybe could only have sent something along the lines of "hey... anyone notice...".  :P

But anyway, the long and short of Sunday's adventures were in trying to get Networking to boot.  Failure.

I did get one thing working tho - full screen, VGA mode raw console.  A quick addition to the grub.conf file, per a message in the Sony Linux archive:

title Red Hat Linux (2.4.18-14)
    root (hd0,1)
    kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/
    initrd /boot/initrd-2.4.18-14.img

just add ' vga=0x305' to the end of the kernel line and restart:

...
    kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/ vga=0x305
...

Aw-Yeah!  All set.  It does show some odd, graphical goop at the top of the screen for a while, during boot, but before too long it clears off, and it's smooth sailing from there.  Ch-ching.


Monday, 11/04/02

Back to Work.

Gah... more work.  Oh well.  QA keeps on trucking with my project at work, and I did get the distro README files put together.  Tomorrow, time to test how well I did that, and grab the other coder (also called Greg, and he was off today) and dig into the two problems QA found for us on Friday.

Anyway, so in the AM, prior to work, I did check my mail and got two responses to my query on RH8.0 networking hanging on boot.  Once, not so usefull, suggested I save myself pain and just go with Mandrake.  *shrug* A thought, but I don't want to have to do another 4.5 hr FTP install!  The other, however, was MOST usefull.  Basically, it told me what I would have deduced, had I been writing down config details during yesterday's trial-and-error session.  KUDZU was the problem.  No, not the vine taking over the US south.  KUDZU is RH's hardware detection tool, similar to MS's new hardware wizzard.  A very useful piece of software, if it's not fscking up the rest of the boot sequence.  So, I permanently disabled Kudzu with a quick line in the /etc/init.d/kudzu script (exit 0 as the 1st non-comment line... ;).  Ta-Da!  Boots nicely with networking and everything!

I also tweaked gpm's settings a little and made the text console mode mouse a little more responsive.  The start command used to be:

gpm -t ps/2 -m /dev/mouse

I set the -r responsiveness value to 40, like so:

gpm -t ps/2 -m /dev/mouse -r 40

To get it to stick after rebooting, I added a line to the /etc/sysconfig/mouse file:

OPTIONS="-r 40"

And I'm much happier now.

So, now it's time to start fiddling with X... muahahaah!

Things left to do:

Get X working
Get DVD/CD-RW Combo working
Get Jogdial working

As I recall, I've seen message threads on all of these, so I'm not too concerned.  But, for now, it's getting late and time for a walk before  I push this live and head to bed.  Gotta get my beauty sleep (gods know I need it!).


Thursday, 11/07/02

Ok, so it's been a few days, and I've not had time to work on the laptop.  But, now I do!

So, I decided to try and get X working.  I fired X up on the command line, and it loaded in 640x480 mode, and wouldn't let me Ctrl-Alt-+/- my way around the different modes.  No big surprise there, as I was aware that the i830 chipset on board was wonky that way.

So, time to find out how to do it!

Went to here:

Installing Linux on Sony R505EL

and here

Ultraportable Linux

Both very helpful.  The former more so than the later, as it gives more of a blow-by blow.  So, I start following the instructions.  I DL'd a copy of the 2.4.18 kernel source code, the megapatch from the Ultraportable site, and the agpgart patch.  No biggie, I've done a kernel recompile before, but it's been a while.  For the uninitiated out there, I dumped all the code into /usr/src/2.4.18 which I believe is where RedHat puts the kernel source (minus the 2.4.18, of course).  Then I put the patches in that dir and applied them with the commands on the R505EL page.  Again, standard stuff.  So, I started the make sequence he lays out.  When I get to make install, it complains that it can't find a /usr/lib/modules -2.4.18 or something... I don't recall the exact message.  So, I did a make modules_install and then make install again, and it doesn't complain any more.

So, then I go to reboot.  Duh... reboot failed - vmlinux-2.4.18 isn't in /boot yet.   So, I go back to the 2.4.18-14 build and move the file over, then reboot again.  This time I get:

Kernel panic: I have no root and I want to scream!

GACK!  WTF?!

I do some reasearch on the web and find out this is because the kernel doesn't know where the root file system is.  Oddly, the grub.conf line looks like so:

kernel /boot/vmlinuz-2.4.18 ro root=LABEL=/ vga=0x305

This looks right to me, but I try changing it to:

kernel /boot/vmlinuz-2.4.18 ro roo=/dev/hda2 vga=0x305

This time it works.  However, while booting, it's failing to mount some file system.  When I do a df -k, it doesn't show  the /dev/shm filesystem any more... odd, eh?  It's also failing to find some of the USB modules.  I recompiled a couple times, no love.  Time to fire some mail off to the mailing list, I think.

Oh, hey.  Remember day 1, where I talked about the P4 Mobility vs. P4 Northwood debate?  Looks like Toms HAS addressed it now.  Check it out.



Friday, 11/08/02

So, it's time to fix this bloody thing.  I've got all weekend, so let's do it!

First up, I did some research on the web, and discovered what the problem was with the /dev/shm thing.  See, /dev/shm is the shared memory for POSIX shm() calls.  A usefull, but little used bit of unix coding.  /dev/shm is where the shared memory actually resides.  It's not a true filesystem... it's one of those virtual ones, like /proc.  It's mounted into the filesystem though, for convenience and uniformity of interface.  However, it looks like Sam's megapatch turns off the filesystem support necessary to get it to mount under 2.4.18!  

To turn it back on, under make menuconfig, go to Filesystems, and hit 'y' on the Virtual memory file system support (former shm fs).

If you're the down-n-dirty type, edit the .config by hand and change:

# CONFIG_TMPFS is not set

to

CONFIG_TMPFS=y

I also added Module level read-only support to NTFS... write support for NTFS is marked dangerous and I don't think I want it just yet.  Maybe I'll do some research into that later.  For now, I'll live with only being able to read files from the XP partition.

For now, another recompile!  I believe I'm up to 3 total kernel compiles.  You know, it's interesting how may warnings go by... you'd think those kernel h4x0r types might fix 'em...

:P  Just kidding, guys.  You do a bang up job.  Where would we be without you? :)

Gack... recompile ends up clobbering the root=/dev/hda2 setting I had to tweak in grub.conf.  Gack.  Reboot, tweak, reboot... :P

And it's up!  /dev/shm is mounted and happy.  Now, to fix the USB stuff...

Found these options:

CONFIG_INPUT_KEYBDEV       <---- both in Input core
CONFIG_INPUT_MOUSEDEV

CONFIG_USB_HID  <--- in USB... duh

set to 'y', where RH8.0's init sequence expects modules.  So, changed them to 'm', and I'm off!  Recompile #4!

Oh yeah, I also DL'd, compiled and inserted a call into rc.local for the i830-16bit program.  Straight forward stuff... we'll see if it works in a bit! :)


So... on to X!  Last night, I DL'd the XFree86 4.2.0 source files from here.  As well as the 1mb-stolen-fix.diff patch.  I put both into /usr/src/XFree86/4.2.0.  I then ungzipped and untar'd the XFree86 source, and moved the patch file into the xc directory.  Then I used this command to apply it:

patch -p1 < 1mb-stolen-fix.diff

This differs slightly from the plan layed out here, but I think works better than renaming your source dir.

Then I did a:

make World

I saw something about "I hope you checked config in <somedir>".  Oh well.  I'm guessing default config is ok, or that the patch took care of it... (*keeping fingers crossed at least*).  They weren't kidding when they said that would take a while... clocked in at almost an hour.

Once it finished, I did:

make install

That took some time too.  But once that finished, I fired up X again.  This time, it loaded, and nothing was garbled (previous attempts resulted in it loading, but all kinds of stuff was grabled).  However, it still wouldn't switch to 1024x768x<anything>.  I got an X error or two, about not finding i830.o, and something about RENDER lib extension not being available.  However, when I restarted X to get exact copies of those errors, it worked!  Full screen!  16 bit graphics!  GNome loaded fine!  YES!

Now... how to get rid of GNOME.... ;)  Or at least install KDE and maybe Blackbox or Widowmaker.  I want something sleek and sexy.  :)

But, not tonight.  That's enough.

What's Left To Do:

Get more window manager options
install jogdial rpm
get suspend modes to work (research required here)
get battery monitor working
get utility to dim and brighten screen working
get sound working
get DVD/CD-RW working.

All in all, not a bad list!


Saturday, 11/09/02

So, today I want to work on the CD player, jogdial and Audio.

First, I grabbed jogdial from here, compiled and installed it.  It seems to work nicely, after adding the last couple of module load commands detailed at the bottom of Ultraportable Linux to my /etc/modules.conf file.  No big deal.  I'm having some trouble getting it to auto load though.  So far, it just seems to not want to auto load.  I put an entry in the session startup script... nada.  I tried all the .X and .x files I know of, nada.  It's just not behaving.  So, oh well.  Maybe later.

I did get the CD to mount just fine.  All the IEEE stuff is already set to load from the megapatch, and all I had to do was mount the drive.

I also downloaded the xtoolwait package - dunno why RH dropped that from the default lineup.

And I got mpg123, a command-line mp3 player, to try and test audio.  It loaded the sound file and tried to play it, but came back with something like "no supproted bitrates found".  I recall hearing something about the i810 audio chipset being a little wonky, so I'll dig into the list archives and see what I can find.

After digging around a bit, it seems like the best option for the i810 chipset is to install the ALSA drivers, so  I DL'd the source for my card and started to try and compile it, following the Quick Install directions here.  Immediately, I ran into a couple problems.  For one, I had my kernel source in an odd location.  Easy enough to fix with a command line option to the configure script.  Second, it was having trouble detecting the kernel version... dunno why, but it did.  So I had to hack the configure script and manually set the kaversion, kversion, kpatchlevel, ksublevel and kextraversion to reflect my kernel settings (2.4.18, 2, 4, 18, (nothing) - respectively).  After that, the drivers compiled nicely.

Next came the alsa-lib compile, which seemed much easier... until it crashed the xterm it was running in!  Gah!  So, I dropped out of X, and tried again.  It went much better from the raw command line.  After that, time to do the utils.  They went smoothly from raw command line as well.

However, after following all the instructions, including modprobe-ing the drivers in and everything, I still couldn't get XMMS to work.  Or any other OSS based system.  However, I did get mpg123 to play an mp3!  YEAH!  So, some progress there.  Later/tomorow I'll try looking into the ALSA plugins for XMMS.

TODO:

Get more window manager options
Finish getting Audio to work - OSS support, stop auto-load of i810_audio driver.
Get suspend modes working (research here)
Get DVD playback working



Sunday, 11/10/02

Ok, so now I'm frustrated.  I've been downloading and compiling and installing all day, and STILL no luck with the audio.  The only thing I've gotten to work is the MPG123 command-line mp3 player I DL'd.  I did figure out what was up with the i810_audio drivers - turns out it wasn't autoloading them... I was just misinformed about what modprobe -c and modinfo meant. :P

To recap todays events:

Compiled and installed ALSA 0.9.0rc5 drivers - no love from within X.
DL'd, compiled and installed XINE - no love.

That took most of the evening.  After that, I decided to see if audio was comming off the CD player - so I ripped a .wav file and then encoded it with Lame (which I had to DL and compile and install).  That played fine off MPG123, so audio data is coming off the CD player.  It's just the output layer that's having trouble.  GAH!

So, I'm just about to give up on it and completely rip out audio support.  Hell, I'm almost ready to just rip out Gnome & KDE too, and go for blockbox.  If I can't do multi-media, about all I want the thing for is to tinker with a compiler while on the road, and maybe write a paper or two.  If OpenOffice will work with Blackbox, I'm good to go.  I don't need any of those other more complicated, bloated pieces of software.

I'll have to think about that some more.


LATE NIGHT UPDATE!

A pointer from one of the guys on the Linux Sony mailing list got me here.  Unfortunately, that file is broken.  But I dug up a mirror of it here.  Thank goodness for the kindess of others!  After DLing that, along with the requisit predicate packages (gtk+-devel and glib-devel), and some quick compiling and installing, it WORKED!  I'm listening to a CD play right now!

Huzzah!  I can keep my multi-media setup!  Apparently, the problem comes from the specialized CD-audio cable that most desktop systems have.  Most CD player softwares try to read data off that.  Not all Laptops implement that connection, and this Sony is one of those freaky laptops.  So, the xmms-cdread plugin reads off the digital data line directly.  Very nice for more crisp audio, though really, on these cruddy speakers, who'll notice? ;)

I also got the alsa output driver to compile.

A quick subjective test later, and it seems like there's more crackling on the alsa driver than the OSS one.  I'll play with it some more and let ya'll know.

Now... what's left:

More Window Manager options.
Suspend Modes - as much ACPI support as I can dig up (dunno if I have to enable that speed-step stuff, etc)
DVD playback - I have XINE now, but it doesn't do DVD decoding out the door - gotta get the package for that.  Damn DMCA. :P


Monday, 11/11/02

So, today some more configuration!  First up, I downloaded, compiled and installed this.  I was really annoyed and confused by the tap-twice-means-select functionality built into the touchpad, and someone on the sony list was so kind as to point this little app out.  Very nice.  I did have to tweak the default init script he provided - the installer put the executible in /usr/local/bin, the script expected /usr/bin.  Not a big deal, but it did cause me to reboot once more than I might have had to. :P

Next up, I downloaded the autospeedstep daemon, to try and extend battery life.  What it does is throttle the CPU back when its not under full load, reducing heat output and power consumption.  I'm going to run some tests on it and see how much good it really does.  Here's my plan:

Drain battery
Recharge battery fully
Run system w/o speedstep and see how long it lasts until the battery dies.
Recharge battery
Drain battery
Recharge battery fully
Run system w/ speedstep and see how long it lasts until the battery dies.
Recharge battery.

I want to do a full drain-recharge cycle between tests, to make sure there's no charge memory in there.  I'll try to be doing the same thing both times when I go for the time tests.  I'm thinking watching a nice long movie - like Braveheart or Lord of the Rings.  I think I'll also try it with and without speedstep running under less vigorous use - like editing whilest reading tech books, etc.  Though for that I may want to just get one or two suspend modes working.

Speaking of which - I also downloaded (but haven't installed yet) the latest ACPI back-patch for 2.4.18.  The one in Sam's Megapatch is from 04/04/02.  The most recent version is from 09/18/02.  I'm not sure what all the changes are, but I gather they fixed some bugs, etc.  However, that requires a kernel recompile, and if speedstep works fine with the 04/04 version, I'm probably going to leave it that way for now.  Granted, I may need to go to the 2.4.19 kernel to get the i830.o kernel module for my video card.  The i810.o is working ok, but I'm still seeing some oddness under X - it still spouts an error and still has to load once in 640x480 before going full screen.  We'll see how adventerous I'm feeling over the next week.
In the mean time, I did a little poking around with KUDZU.  Another person on the mailing list ran into the boot problems I had early on, and that got me thinking it was time to see what was up.  So, I dug around the docs and noticed that Kudzu could boot "Safely".  So I tried it (edited /etc/sysconfig/kudzu, changed SAFE=no to SAFE=yes), and it got through the boot sequence fine.  However, it wanted to configure my firewire and USB, as well as drop the PS/2 mouse.  I was hesitant, as I don't know what files it might mess with.  Besides, what would it do when I undocked and rebooted?  Would it then detect the firewire CD drive was gone and configure it that way?  And when I redocked and rebooted?  It just seemed like an un-good idea, especially since things seem to be working fine w/o it.  So I went back and re-disabled it.  An interesting adventure.  I also fired off an email to the maintainer of the project.  Maybe he'll have some wisdom.

On to DVDs!  So, I have Xine installed from before.  Now it's time to enable DVD playback.  My first thought was the LiViD libcss was what I needed.  And being foolhardy, I ran off, DL'd, compiled and Installed it.  Then I thought, wait... maybe Xine has instructions on enabling DVD.  *duh*  So, finding the Xine DVD instructions, I read them and they made no mention of that project.  :P  So, oh well.  Nice to have it, but on to the real way to do it!  Off to this site to get the official DVD plugin!

Forgive me for a moment while I wax political.  Now, I understand entirely what the movie industry is trying to do with their laws... the DMCA, etc.  They want to protect their interests, and their cash flow.  Quite frankly, that's quite understandable of them.  But there comes a point where it borders on the ridiculus.  For example - right now, I'm having a serious debate on whether or not to post the details of how I got DVD playback to work.  Why am I worried about it?  Because of the DMCA.  Under it, I could be charged and thrown in jail for DISCUSSING how to get playback working.  Why?  Because the DMCA forbids copy protection circumvention.  Technically, getting DVD decoding (key word) to work without buying a license to get the keys necessary to do it, is a circumvention of copy protection.  See, the encryption that requires decoding is what the movie industry calls copy protection.  I won't go into the details - there are lots of people better suited to do that, but basically the protection is laughable.  30 seconds with a 1Ghz processor seems to be enough to get around it (so I hear).

Now, why is all that bad?  Well, because all of this infringes on my free speech.  The DMCA is right now, right here, having what legal-types call a "chilling-effect", or "self censorship".  Basically, I'm censoring myself out of feer of violation of some vauge, over reaching, probably soon to be proven unconstitutional law.  Generally, in the past, this kind of chilling-effect is considered anathma to the idea of Free Speach.  As such, I feel fairly confident that when it is finally challenged in court, it will likely be overturned.  The problem is, I'm a little guy (legally speaking), and I can't afford to be the person to try and challenge it.  So, my reluctance to post any details on how these things work.

Suffice it to say, a little poking around in the instructions and the pages it references (think also the README file in the DL) should get you set up, should you wish it.


So, enough for tonight.

What's left?

Power-step
Suspend
Alternate Window Managers.

(damn that's getting to be a short list!)




Sunday,  11/17/02

Ok, so it's been a while.  Things got busy at work there for a few days, but seem to have settled down a little.  Anyway, I tried a couple things tonight to see if I couldn't fix the quirk with X where it loads in 640x480 the first time, but after that it loads in full screen, 1024x768.  So far, I've tried:

removing 640x480 line from devices section.  This resulted in X failing to start at all!
cleaned up DRI config - added lines in modules.conf to load all the modules:

alias char-major-10-175 agpgart
alias char-major-226 i810
below i810 agpgart

Again, no luck, though this seems to have cleared up some of the errors XFree86 was giving on load.  It still seems like the DRI isn't loading properly, but that's 3D acceleration, and I don't care too much about that right now.

I found another page here that talks about installing Debian on a Dell x200.  The x200 has the same chipset.  He seemed to be happier with it, though DRI was still not working.  No mention of loading in 640x480 then proper load.  I'm guessing it's because he started with the 2.4.19-rc3 kernel, so probably my next step is to get a more recent kernel and see if that doesn't help any.  I have the source for the 2.4.19 stock kernel... though I'll do more research before going with it.  I want to find the one with the best support for the i830MP chipset.

Oh well.  'tis late, and that's enough tinkering for tonight.  I'm burned out from work - put in about 50 hours in the past 4 days.  Later.


Wednesday, 11/20/02 (Really Wed night, Thursday AM)

So, I've been reading a bit and poking around, and I think I need to upgrade the kernel.  The 2.4.19 kernel fixes a lot of i830 issues, and I think that'll be best.  I am a little concerned that it may snafu the virtual terminals... it's nice to have full-screen text when I want it, but I guess I can tinker with the console windows and get something close enough.

Unfortunately, I'm heading home for Turkey-day on Sunday, so no tinkering whilst I'm on vacation.

Fortunately, after I get back, I'm going on leave from work for the month of December.  So, a week and a half from now, it'll be time to get REALLY serious with the laptop!  Oh yeah.  :)

On another note, I decided I was gonna tinker with the hdparm settings, and see if I couldn't speed things up on the laptop.  Turns out, it's probably already going as fast as it can.  *shrug*  Go figure.  Hdparm /dev/hda reveals:

multcount     = 16 (on)
IO_support    = 0 (default 16-bit)
unmaskirq     = 0 (off)
using_dma     = 1 (on)
keepsettings  = 0 (off)
readonly      = 0 (off)
readahead     = 8 (on)
geometry      = 3648/255/63, sectors = 58605120, start = 0

It seems that the only thing I might get a little more performance from is by setting unmaskirq, and bumping up to 32bit IO.   I hear there can be complications with those, but I'll go ahead and risk it.  I'm not doing anything terribly critical on the 'top, and if it breaks, I'll just rebuild it and uncheck those settings.

Applying those settings (-u1 -c1) didn't have an effect on the number returned by hdparm -t /dev/hda, but that's ok.  I figure at the very least, they'll do no harm.  And who knows, maybe they'll bump up some kind of Xfer rate that -t doesn't test. :)

Time for bed.  Later.



Thursday, 11/21/02

Huzzah!  I got X fixed!  Turns out my i830-16bit compile was out of synch with my memory map.  Recompiled the kernel once to many times.  Anyway, so I decided to tweak the script and have it pull the base memory offset at run time instead of compile time.  Here's the new file and the shell script that does the pulling (new util only takes the offset as a parameter, script figures out what to pass in):

i830-16bit.C
i830

Instead of including a call to i830-16bit in the /etc/rc.local, you'll want to call the i830 script.  That will call the program, and feed it the appropriate offset, determined from the lspci call.

Much kudos to Jon for compiling the utility that others wrote.  And as always, thanks to the Sony Linux list for helping me figure these things out.  I hope this can stand as one small contribution from me, to help offset the many I've taken from the list!


Friday, 11/22/02

So, today I set out to fix the speedstep issue.  It looks like the problem may be that Sam's MegaPatch uses a pretty old version of the ACPI drivers.  So, in order to upgrade, basically I need to create a new, Greg's MegaPatch, or as I call it, GregaPatch.  I can't just upgrade the ACPI part of Sam's patch, as his MegaPatch has all the stuff smeared in together.  It's easier to DL it's seperate consititutants, getting the new and improved versions of things as I go, and apply them all individually.  Then, I can build a GregaPatch file from the new version and distribute that.  At least, that's the plan. ;)

Anyway, so here's what I got:


You'll note I left out support for SWSusp.  I'm not familiar enough with that utility to know if the SWSusp Beta12 2.4.18 patch is compatible with the acpi-20020918-2.4.18 patch.  There is a SWSusp Beta11 2.4.18 patch that is compatible with the acpi-20020726-2.4.18 patch, but I want the latest and greatest ACPI.  There's also a SWSusp compatible with the acpi-20020918-2.4.19 kernel, but I'm not compiling a 2.4.19 kernel.  So, for now, no SWSusp support.  If you want to add it, I don't see why you couldn't just sub in the older acpi patch and add the SWSusp Beta12 patch as well.  I may got back and do that later.

So, I applied the patches.  Had to do a little trickery:

And finally, time to build!  Off to read a book.  :P

GACK!  It failed!

Apparently the reason the usb patch failed is that it inserts code that depends on the swsup patch... which I didn't include.

Ok.  I guess that means I roll back to the acpi-20020726-2.4.18 patch.  So be it.  Here's the new list: Freaking hell.  More patching fun.  Same instructions as above, but add in one for swsusp after the acpi patch:

mv'd swsusp patch to linux, patch -p1, etc.

Also, the khubd patch STILL wouldn't apply.  Again, did it by hand, since it's only a few lines.

And finally, recompile from scratch.  Gah.

Oy.  Now the ieee1394 video stuff is breaking when I get to make modules.  Gah.  So, I disabled ieee1394 video support in my config file.  Don't think I need that anyway.  Another rebuild.  :P

Oy again.  depmod returned errors on ieee1394.  Looks like the latest and greatest build is set for the 2.4.19 kernel.  Reading their page, makes sense.  So, now I need to back up and find the last 2.4.18 version of ieee1394 updates.  However, right this instant, the web page appears to be down.  So, I'll do a quick check around the 'net, and see if I can find the files.  If not, I guess I'll just wait until tomorrow.  Bloody single point of failure network... :P

And that search pretty quickly turned up nothing.  So, I guess I'll give it a rest for a while, and try again later/tomorrow.  Gah.


Saturday, 11/23/02

So, I got fed up last night and called it quits.  After sleeping on it, I think I know how to get a good version of the ieee1394 drivers update.  Since the update is just the latest copies of the source dir, all I have to do is copy the one from a mega-patched kernel tree!  Shazam.  Got it.  Now, after applying all the patches:

acpi-20020726
swsusp beta 11 for acpi-20020726 patched kernels
memorystick patch
khubd patch (again, by hand... gonna have to put together a working patch for this one)
agpgart fix

And copying over the ieee1394 files from a mega-patched kernel, it's off to the recompile races we go!

And hey, what do you know, it compiled!

However, on restarting, I STILL can't get autospeedstep to work.  And cat'ing  /proc/acpi/processor/CPU0/performance is still showing no power stats for the processor states.  Gah!

So, now what?  Hmmm...

Well, I'll try the latest and greatest ACPI for 2.4.18.  The patch files this time are:

acpi-20020918
memorystick
agpgart fix

All SWSusp patches are dropped for now, including the USB fix for resuming after a suspend (not suspending... ;).

And that doesn't work either!  Gah!

So, I dug around a little, and it looks like autospeedstep is just broken.  At least for newer Vaios.  So, off to try a different way of accessing the speedstep functionality.  Target this time is aKpi, a nice little KDE/QT app that will hopefully let me tinker with it.

So far, though, no luck there either.  I can compile it for QT, since I'm not running KDE (install is fubrd somehow), but when I run it, it doesn't seem to do anything.  It just sits there.  *shrug*  I give up.  No battery savings for me, I guess.


Saturday, 12/07/02

Ok, so it's been a while.  I've been busy relaxing, what can I say?

So, quick updates:

I took the Laptop home with me over the Turkey-day break.  I watched movies on both legs of the flight (there and back).  Turns out I get about 2 hours of battery life from it, while watching movies.  Unfortunately, I took Blade Runner and The Fifth Element with me, which are both uncomfortably close the the battery's limits.  Next time, I guess I'll try to pick shorter movies, or maybe I'll have the speedstep stuff working by then.  Oh well.

Also, I thought of another use for the laptop!  I've been lacking a good camera for some time now, so I've been doing a little research.  After some thinking, I decided I could spend about $300-$400 on a camera, which put me firmly into the low-end of 3-4 Megapixels.  After some more research, I narrowed my choices to two - the Fuji FinePix 3800 and the Canon Powershot Digital Elph S230.  Ultimately, I went with the Canon, as it uses Compact Flash, which I can (and did) buy a PCMCIA adapter for.  That was ultimately a good decision, as the USB plugin doesn't seem to work with any of the gphoto software.  A couple of quick bits of web surfing turned up the goods on how to determine where the PCMCIA card was putting the CF card as an IDE device - turns out it's /dev/hde1.  A quick addition to the fstabs file allows me to mount the device as vfat (default for CF-as-IDE), and I was off to the races.  A couple quick sample pics showed up nicely.

So, I'm quite pleased with using the laptop as additional storage/editing for digital pics on the road.  A weak reason, but that gives me another reason to have it.  Yeah for justification!  Besides, I'm heading out to the Grand Canyon on Sunday, then up to Zion.  Expect me to have some nice pics, taken with my lovely new camera up on either this page, or the JAJ photo galleries.  That would'na be possible w/o such toys, so deal.  :P

I also picked up an 802.11b wireless card (the Linksys one), for when I go visit my cousins in San Diego.  He "wired" up his house with 802.11b, and I figured it'd be good to have something to join in the fun with.  That's my excuse and I'm sticking to it.  ;)  I haven't tried using it yet, as I don't have a base-station, but I figure I'll just take a regular cable with me and sort it out when I get there.  I'm sure he still has some wired-network stuff, and I can tap that if I need to DL anything.


Saturday,  03/22/03

So it's been a while.  The laptop has been happy for some time.  No  suspend working, but that's not a big deal.  No speedstep, but again, not a big deal.  I've not used the laptop much so I've not missed it.  However, I've been looking at that Linksys 802.11b card I bought and just itching to get it going.  So I went out and bought a WAP, specifically the D-Link  DWL-900AP+.  A nice little deal at Fry's, $99, minus a $20 MIR.  So, after futzing a little with that and getting it configured, I decided it was time to get wireless going on the laptop!

So, first things first, I plugged in the Linksys card... and got nada.  A quick scan of /var/log/messages shows:

cardmgr[460]: unsupported card in socket 0
kernel : cs: memory probe 0xa00000000-0xa0ffffff: clean.
cardmgr[460]:   product  info: "The Linksys Group, Inc.", "Instant Wireless Network PC Car", "ISL37300P", "RevA"
cardmgr[460]:   manfid: 0x0274, 0x1613,  function: 6 (network)

A quick check of the linux-wlan page shows that the WPC11 is supported, so something else must be going on.  Some research on the Sony Linux archives dug up this message:

Wed, 24 Apr 2002 01:14:59 -0700

which links to his page here where he describes how he got it working (scroll down a bit).  However, the key steps he describes - no PCMCIA in the kernel, compile it as module with pcmcia-cs v. 3.1 or so, seems wonky.  Does the linux-wlan-ng driver NEED to have pcmcia turned off in the kernel?  I have other PCMCIA cards I want to use, and they work fine the way they are right now, which is compiled as modules with the default kernel-pcmcia_cs package that comes with RH8.0 - v 3.1.39 I think.

So... after a bit of research and fiddling, the answer is no.  It worked for me to just DL the linux-wlan-ng drivers (v 0.2.0), compile with default settings (except for I had to tweak the linux source dir, as I have mine in a different location), and install.  I also snagged the Wireless Tools for Linux from here, version 25.  Since I didn't enable WEP encryption on my WAP, the default configuration and ESSID worked out of the box.  I just needed to copy the /etc/sysconfig/network-scripts/ifcfg-eth0 to ifcfg-wlan0 and edit.  Since both can be up and on the same network (my WAP is on the same network as my wired one... maybe I should change that?), it seems bad to have them both in at once.  I'll just have to try it and see what happens if I use both at once... I think the wlan0 configs clobber the eth0 ones, but we'll see.
 

This page copyright Greg Underwood, 2003.