TechieMoe.com

Linux on the Dell Inspiron 1520

(The Birth of Rig 4)

Introduction:

Before I get too heavily into this article I'd like to point out that the entire first section of it is simply background to bring you up to speed on why I chose to do this. If you're just interested in the details of getting a Linux distribution set up on a Dell Inspiron 1520, feel free to skip directly to the "Which Linux?" section below. Please note that this article is not meant to be an exhaustive How-To, just a report of my personal experiences.

  1. The Backstory
  2. Shopping for a replacement
  3. Which Linux?
  4. Partitions
  5. Install and Post-Install
  6. Conclusion
  7. References

The Backstory

No doubt some of you reading this article are aware that for the last few years I've owned and enjoyed an Apple MacBook Pro notebook computer. That's the original MacBook Pro, Core Duo (not Core 2). Take note of that; it comes up later. My family is mostly an Apple family much like some folks in the US are Coke families and others are Pepsi families. I grew up around a good number of Apple computers, mostly of the Macintosh line.

In college I wanted to be compatible with everyone else's computers so I bought an off-the-shelf Compaq Presario at my local Best Buy. Before you pull out the torches, I was 17 and I didn't know any better. Once I got the thing home and it hard froze on me any time I changed the volume, I realized the error in my ways.

A refund later, I had a Micron desktop PC running Windows 98SE (guessed my age yet?). It had a Pentium 3 733mHz and it served me quite well throughout my first 2 years in college. About this time I started getting pretty heavy into C and C++ programming and I also was becoming less and less impressed with Microsoft's compiler suite (Visual Studio).

I heard about this odd little hobby OS called "Linux" that had a built-in compiler. Better yet, it was free! The rest was history, and from that point on for anything other than playing commercial games, Linux was my OS of choice on PC desktops.

Fast forward to two years ago when a healthy tax refund saw me purchasing the first Mac laptop based on an Intel chip, the MacBook Pro. At the time I justified this by saying, "I like Macs, and if Apple's OS X ever becomes too bloated for it I can just install Linux on it. Afterall, it's just a regular Intel notebook underneath." That one turned out to be not quite true.

As I mentioned in the MacBook Pro Ubuntu article above, Apple hasn't impressed me lately with their handling of Java. Now I'm out of college and I write Java software for a living. I also write Java for fun at home. Both of these tasks requires that I be up on the latest and greatest developments. Sun has added some completely new and pretty neat features in Java 1.6 that did not exist in 1.5 and below. Thus was my problem.

The latest official version of Java for OS X is Java 1.5, and the only way to get Java on a Mac is through Apple. This is what initially pushed me to try installing Linux on the MacBook Pro, with less than impressive results. To add insult to injury, Apple recently released a beta version of Java 6 that is 64-bit, meaning it works on the Core 2 Duo MacBook Pros only, not mine. These dismal circumstances planted a seed which eventually resulted in my ordering a Dell Inspiron 1520, upon which I chose to install Linux.

Shopping for a replacement

I'll be the first to admit I haven't been keeping up on PC hardware since I bought the MacBook Pro. Thus, when I went out to start shopping for a replacement I had to pare down my options in the beginning or get lost in the sea of PC-compatibles. I'm not a fan of Sony due to their recent mismanagement and declining hardware quality. Compaq (and HP) left a bad taste in my mouth from my first PC experience. That left Dell and Toshiba.

I'm perfectly happy with other Toshiba products I've purchased, and my significant other has a Toshiba Satellite. On the other hand my workplace is an all-Dell shop, and because of that we have a deal with Dell that offers employees discounts on new hardware.

I configured two similar laptops from Toshiba and Dell and compared them side by side. Dell came out cheaper, and honestly I was just a bit more comfortable dealing with them. The Member Purchase Program discount saved me around $200, which is nothing to sneeze at. Here is what I chose to order:

Dell Inspiron 1520 - Black

Processor Intel Core 2 Duo T7250 (2.0gHz)
System RAM
2GB DDR2 667mHz
Wireless Chipset
Intel 3945
Harddrive Capacity/Type
120GB 7200rpm SATA
Display Card
Nvidia 128MB Geforce 8400M GS
Monitor/Interface
Dell Non-Glossy 15.4" TFT
Media Drive
8X Dual-layer DVD+/-RW
Sound
Sigmatel STAC 9205 HD Audio

Some of you might wonder why if I'm going to install Linux on the machine I didn't choose one of Dell's N-series laptops that come with Ubuntu 7.10 pre-installed. There were several reasons for this. As much as I'd like to support a company that offers Linux out of the box by purchasing one of their Linux offerings, the hardware selection on the N-series laptops isn't as robust, nor are some of the other options that shouldn't matter (the color of the laptop for instance).

I'm not sure if this was a glitch on Dell's site or an intentional limitation, but for whatever reason I was not able to configure an Inspiron 1520N that was black. I could choose any other color, just not that one. I could have lived with a "Cappuccino Brown" laptop, however. That wasn't what killed it for me.

The deciding factor was video hardware. I don't play 3D games every day, but I'd still like to have the ability to do so if the mood arises. In order to use my Member Purchase discount I would have no choice but to use an Intel integrated video chipset. If you configure a 1520N with Ubuntu on the regular Dell site you can now choose the Nvidia card I picked above, but it would have cost me an extra $200 because I'd have no discount.

When configuring the laptop I was careful to choose hardware which I knew would work well in Linux. I chose the Nvidia card and Intel 3945 wireless even though there were other options available. I also did searches to see if anyone else had attempted to put Linux on a 1520. All reports I found were positive, with no major "gotchas." I hoped that once I tried it out myself that these reports would be the same for me.

A week after I placed my order (5 business days) the laptop shipped. Two days later it arrived via DHL. That's not bad considering in the middle of that was both Christmas and New Year's Day. It's also worth noting that I paid for 3-5 day shipping and it came in two. I've read stories of people who have to wait months for their computers to come in. Looks like I lucked out and they had all the parts handy.

I must also compliment Dell on their thoroughness. I received no less than six confirmation emails (four with tracking numbers, two of which came after I'd already received the computer) and a phone call assuring me my package had shipped the night before it arrived. DHL also email notified me every step of the way so I knew the second it was scanned in at my city's DHL facility.

Which Linux?

Of all people, after having installed and used 40+ Linux distributions, I should know which distribution I want to put on my new computer. I didn't. I knew the general direction I wanted to go, I just wasn't sure exactly which path. Ubuntu is fairly popular and well-supported on Dell hardware (otherwise they wouldn't sell it). However one of my main uses for my laptop aside from Java programming is to kill time, which means games.

Thanks to some helpful folks at LinuxForums and some searching on my own, I've found quite a few free and not free games I can play on the new Linux system. The question I had at this point was this: do I want to install the base system and then install the games manually, or use a distribution that has these games out of the box? Sabayon in particular has impressed me with their game selection. However it is based on Gentoo, which is not as popular with packagers.

Also, since the new laptop was a Core 2, I also had to contend with whether or not I wanted a 64-bit version of Linux. There were lots of things to consider. I ended up trying out Ubuntu 7.10 (32 and 64-bit) and Sabayon 3.4f (32-bit).

Partitions

First up was Sabayon 3.4f. I had to configure the BIOS on the laptop to boot from the CD drive first. It was a simple matter of hitting F12 and changing the boot order in the BIOS. Sabayon took forever and a day to load, but I seem to remember that being the case on my desktop machine (Rig 2) as well.

I was greeted by a rather ugly default login screen and when I tried to enter a username, it seemed as though the N key was stuck and kept typing and typing on its own. Not a good sign for Sabayon. I was strapped for time so I decided to dump it for now and look at Ubuntu 64-bit next.

Booting into the regular Install option (not "Safe Graphics Mode") gave me a blank screen, but I heard the CD working so I let it keep going for a bit. Eventually Ubuntu caught on, but it told me I would have to run in "low graphics mode". I imagine this has to do with the fact that Ubuntu couldn't automatically set up 3D effects with my Nvidia card. I rebooted and chose "Safe Graphics Mode" instead.

Again I got a blank screen while the LiveCD loaded. This time, however, the LiveCD desktop popped up after it finished loading. I noticed that the LiveCD had properly detected and configured my onboard wireless. Apparently my choice of Intel 3945 was a wise one.

I ran the installer. When I got to the partitioning step, I opened up GParted to see what Dell had done to the harddrive out of the box. It was divided up into 4 partitions, as follows:

  • /dev/sda1 - fat16, 78MB
  • /dev/sda2 - ntfs, 106GB (XP partition)
  • /dev/sda3 - fat32, 2.5 GB (something to do with Media Direct feature)
  • /dev/sda4 - fat32, 3.0 GB (recovery partition I assume)

First, let me say that for reasons entirely my own I wanted to keep the existing XP install. Thankfully, Ubuntu was smart enough to realize I wanted to shrink the XP partition (sda2) and use it for Ubuntu. I let it do its thing. It's also worth noting that when I first booted this laptop I tried to view the partition scheme in XP and was told I didn't have permissions. Sassy little thing isn't it?

The installer gave me an error on the resize saying it couldn't write changes to the disk. Odd, I thought. I tried resizing the partition manually with GParted. It also gave me errors. I had a bit of a quandary on my hands. I decided to try booting the 32-bit Ubuntu. I also decided for grins to use the "Alternate" install CD this time. Once again, the partition refused to resize.

Undaunted, I decided to see what exactly XP's issue with me was and see if I could resize the partition there. For some reason, upon reboot I was allowed to use the Computer Management control panel. I'm not entirely sure what caused the original problem, but it might have been the fact that I was busy uninstalling the dozen or so worthless pieces of software Dell installed by default.

My next tactic was to download the GParted Live CD and boot from that. Bingo! GParted shrank my partition from 100 GB down to 50 and left another 50 for Ubuntu. I rebooted again with Ubuntu 64-bit.

Install and Post Install

This time I chose to use the largest contiguous amount of free space (an option that didn't show up last time). Interestingly, I was then given the option to migrate the contents of my user folder on the XP partition. Things like wallpaper, my documents, music, and pictures were offered as options to check. I didn't have anything to import, so I just skipped this.

This time the installer happily skipped on and did its thing like a normal install. I'm still curious why it is that the GParted LiveCD had no trouble with my drive but the version of GParted on Ubuntu couldn't touch it. I'm accepting theories if you have any.

As it was installing I played around with a few things. I noticed that although my wireless was configured properly, my sound apparently wasn't. I made note of that as something to fix upon reboot. Something a bit more disturbing happened when I rebooted. My harddrive started clicking once about every minute or so. I looked this up and found a fix that seemed to work.

The culprit seems to be some overzealous power management settings that cause the harddrive to "park" itself more often than is strictly necessary. I've noticed that under normal operation I only hear the parking click when I turn the computer off. The command that fixed it was sudo hdparm -B254 /dev/sda. I also tried adding this line to my /etc/hdparm.conf file in order for it to persist after I rebooted. Didn't work. I then tried this solution, which seemed to stick after reboot. I would like to say that contrary to some articles I've read this harddrive problem happened to me even though "enable_laptop_mode" was set to the default of false. I did not enable or tweak anything to make this happen.

::UPDATE:: The issue with the harddrive has turned into its own little ordeal. I've posted a log of the whole affair here. Enjoy... or don't. I guess it depends on whether or not you enjoy watching someone else's pain.

I went to work getting my splash screen back. I read through several tutorials but none of them quite worked. I added vga=792 to the end of my grub boot line and it at least gave me a splash, but the splash wasn't centered. It was too far down and to the right. I played with a couple of different numbers but they just made it more off.

I did some looking around and downloaded a program called "startupmanager". Not only does it give you lots of options for resolution and color depth on startup, it lets you set a lot of other options as well like background colors and other tweaks. My monitor's native resolution (1280x800) wasn't supported unfortunately, but 1024x768 16-bit looked pretty good, and it was properly centered.

My sound didn't work out of the box. I tried a number of different possible fixes, and honestly I can't remember which one did it. However I do know that it was one of the three options presented here. I know one of them worked, and trying all three won't hurt anything. I also took some time to try and get the webcam working, although I doubt I'll ever use it.

The webcam in the Inspiron 1520 worked out of the box with Ekiga (a video-phone/VOIP program) but not with another program I tried called Camorama. I did some research and apparently this webcam only works with Video4Linux version 2 (v4l2) and not the original Video4Linux driver (v4l). Therefore you need a capture program that works with v4l2. I chose a small one called luvcview.

Conclusion

I have Ubuntu 7.10 64-bit running in a dual boot with MS Windows XP on my Inspiron 1520. Was it as easy as I hoped? No. However it wasn't nearly as painful as trying to install it on my Macbook Pro. I also get the impression that if I were to choose one day in the future to run Linux by itself, my partitioning issues would disappear. I just hope that in future releases, the Ubuntu team fix that harddrive bug. Hopefully this article has been helpful to some of you. I'm open to revisiting any of the above issues in the future if you have any more elegant solutions.

Six Months Later (June 2008)

A lot has happened in the Linux world since I first posted this, so I thought I'd give you all an update. I'm now running Ubuntu 8.04 LTS (64-bit) on the Inspiron and it works quite well. My sound card was not an issue with this release, nor did I run into the splash screen problem. A new webcam program has shown up called Cheese, which works well with my webcam and offers an experience similar to Apple's Photo Booth application.

I have to do very little configuration out of the box with Ubuntu 8.04, which is good. The only hardware issue I'm still having is the occasional parking issue with the harddrive, which is remedied by modifying my /etc/rc.local file to launch "hdparm -B254 /dev/sda" on boot. I'm convinced this is not a Linux issue, since the parking problem shows up in Windows XP as well; I just think the harddrive controller on the laptop is overzealous. At any rate, all the harddrive diagnostics I've tried report no problems, so I'm not all that worried about it.

References

Ubuntu Forums - Inspiron 1520

Ubuntu Forums - Hard Drive Click

Ubuntu Forums - Inspiron with 7.04

Ubuntu 64-bit splash screen fix