Gentoo on the Sager 4750: An Install Odessy.
The Sager 4750 is a medium-high-end desktop replacement laptop. With a 17" LCD screen, an AMD Athlon64 3400+, and up to two gigs of RAM, the 4750 is less about portability, and more about power. This article chronicals my attempts to install Gentoo on the machine, in the hopes that my experiences will help others enduring the same quest
Several years ago, when I was flush with cash, I purchased a couple of refurbished Dell laptops for my (then) girlfriend and myself, set us up with 802.11b, and discovered the joys of mobility. My desktop system fell into disuse (well, became a print server and internet connection hub), and when we moved across country, I simply never got around to reconnecting it.
A few years later, when the laptops began feeling old and worn out (not to mention one having been knocked off a table by cats), I treated myself and, a few months later, my (then) girlfriend to more powerful laptops. The first, for myself, I purchased from QLI Linux PCs. No, don't bother looking for it; they've since gone out of business. That machine was a 1.8GHz Intel P4, with 512MB RAM, a 14" LCD driven at 1400x1050 by a Radeon Mobility M7, and a bunch of features that simply never worked under Linux. My girlfriend's was a 2.8GHz of similar specs, purchased from Los Alamos Computers -- they're still in business.
Fast forward two years; I've finally gotten ACPI S3-suspend working on my laptop, and it is a finely tuned machine. I've set up the desktop machine; it is connected to our three printers, and I can print to all three from either laptop, and can scan remotely from the OfficeJet from mine. My (now) wife's laptop is running
My machine arrived as follows:
AMD Athlon64 3400+ @ 2.2GHz 1GB RAM, in two DIMMs 17" WXGA+ LCD, 1650x1050 ATI Radeon 9600 w/ 128MB RAM Built-in bluetooth Built-in 802.11g/b Built-in 4-in-1 card reader Surround sound (5 speakers, incl. subwoofer) Built-in camera
There's also a modem in there, but I haven't used a modem in six years.
Table 1. Compatability Matrix
|DVD Dual Layer writing||Unknown|
Here are some links to various config files:
This thing was a nightmare to install. This is why, in the Links section, I'm providing a link to a vendor who sells the machines with Linux pre-installed. If you want to run Gentoo, you'll have to install it yourself, but if you just want Linux (and don't care about Gentoo), I'd recommend trying one that is pre-configured.
I won't go into details about how much skin I lost to this beast, and I'll try to keep this in guideline format.
Make sure you download the correct install ISO. Resist the temptation to just use an older ISO.
This may not make sense to people who haven't used Gentoo before, but in most cases, once you download an install ISO, you just keep using it. There's no real need to download and burn new CDs all the time, because Portage is fricken' awesome, and upgrading from an old version of the OS is, unlike RPM-based distributions, really easy. So, you generally do a basic install from an old CD, configure your USE flags, start it compiling, and go away and do something else for eight hours (sleep, for example). When you come back, you've got a shiny, up-to-date system.
Well, don't do it on this machine. Get the ISO specifically for x86_64, or else you'll be in a world of pain. You may get it to install, eventually, but you're much better off getting the right ISO. Personally, I had a heck of a time just connecting to the network when I tried 2004.0 (for x86).
Oh, and just to wet your appetite: it used to take over 24 hours for my old laptop (1.8GHz Intel) to compile KDE. This baby compiled it in 4 hours. Yow.
When you first boot the machine, go into the BIOS setup (F2) and scroll to the screen where you can select the operating system. Set this to "Other". If you don't, you'll get lost DMA interrupts on your hard drive, and your life will suck.
I'm not absolutely certain of this, because I had several false starts, but you should try the 'noapic' when you boot the install CD. I had trouble getting the ethernet card to work, and this helped. It helped so much, in fact, that I set it as a permanent option in grub, which (as you'll see below, turned out to be a mistake).
The ethernet module is r8169.
For everything else, just follow the instructions in /mnt/cdrom/docs/handbook/html.
ufed and eix are your friends. Emerge them soon.
Actually, I'm a recent convert of ufed. I still don't entirely trust it, but I do like the convenience of being able to select from a list of options. The only thing you have to be careful of is that ufed is exclusive. That is, if you don't select a use flag, it is disabled by default. This can be a problem if -- like me -- you're used to disabling flags in USE.
eix is an optimized 'emerge search' utility. Searches are nearly instantanious, rather than taking minutes, like 'emerge search'.
Use the recommended gentoo-dev-sources, and resist the temptation to emerge the masked version, until you get the entire thing installed and running.
This problem with 2.6.10 appears to be related to the APIC issue that I talk about below. I'm now running 2.6.10 and it appears to be stable -- as long as APIC is enabled.
Make sure you build the cpufreq_xxx modules in the kernel APCI section. You will want them for powernowd, which does a spectacular job of adjusting the clockspeed of your CPU based on load.
I've heard rumors that if you compile the cpufreq_xxx code into the kernel, rather than compiling them as modules as I did, you get different, and maybe better, behavior. I haven't tried this yet, but I will, and will report back.
Emerge coldplug! coldplug does a great job of detecting your devices. If you enable radeonfb, coldplug enable the framebuffer, turning your console from the ugly, default 80x40 display into something like 240x100!
coldplug also automatically detected the sound card. You'll want to enable ALSA for the via82xx chipset, which is what this laptop has.
Do not, I repeat, not set noapic in grub. You do want apic support enabled; if you don't heed this warning, you'll experience slow ethernet, dropped name lookups, and occasional, untraceable system lockups. You may want to boot with noapic until you get the system installed, but don't expect to use it long-term. Try booting without noapic first, and only use it if you have trouble connecting to the network.
I need to test this further to make sure that it is sound advice, but if you have any trouble with CPU temperature, or IO problems (including network), but turn off the anticipatory scheduler. Do this by passing 'elevator=deadline' to the boot process.
The problem appears when APIC is disabled. With APIC enabled, you can use the anticipatory scheduler. If, for some reason, you need to turn off APIC, then use the deadline scheduler.
As an aside, when the computer is idling and powernowd is running, I get temperatures as low as 35° running at 800MHz. Under load, it rarely gets over 65° running at 2200MHz.
Incidentally, the fan doesn't spin up until about 40°, and it has variable speed. This is so sweet; it is the first laptop I've had that was totally silent when idle. (Actually, for some reason, the fan is running constantly now, although at a low speed. The only thing I think I've changed is compiling the cpufreq_* modules into the kernel).
When you're emerging kernel modules, make sure that you change what /usr/src/linux points to the right thing. For example, if you're running 2.6.9, make sure that /usr/src/linux -> /usr/src/linux/2.6.9-gentoo. You need to check this before you emerge the ipw220, ati-drivers, spca50x, and submount packages.
Emerge ipw2200. You may have to unmask it.
Update, 2005/156: ipw2200 locks up the computer. Hard. Sometimes it runs for days, sometimes it locks up within an hour -- but it will lock up the computer eventually. I claim it is the ipw2200 driver because the laptop is perfectly stable if the ipw2200 module isn't loaded (eg, if I'm networking through the ethernet card). I do not know if this is 64-bit related, but be warned.
The module is r8169, and it is recognized, configured, and started with no problems. I'm using dhcpd, so all I had to do was change /etc/config.d/net and set iface_eth0='dhcp'.
Emerge spca5xx. It works fine. If you want to test it -- that is, to see your beautiful mug on the screen, AKA use a $2000 computer as a glorified mirror -- emerge camstream, which you'll probably have to unmask.
Make sure you compile the cpufreq_* modules for the kernel, load them on boot, emerge powernowd, and use rc-update to start it by default. It'll control adjusting your CPU frequency on demand.
If you've compiled ACPI, which you should, the CPU temperature is in /proc/acpi/thermal_zones/THRM/temperature. Just 'cat' it. CPU information is in /proc/cpuinfo. You can also compile all of the i2c modules, emerge the lm-sensors package, and get some information from the motherboard. I don't know much about this, but there are several sensors, none of which I've been able to get any useful information out of. On the other hand, I don't know what I'm looking for, so...
With ACPI enabled in the kernel, you can normally do an echo -n 3 > /proc/acpi/sleep and get the laptop to go into a low-power mode, and indeed this works. However, getting the laptop to wake up is another matter entirely. Pressing the power button does get it to respond, but the fan doesn't spin up and I don't think the hard drive is, either. The screen remains entirely without power, and all that's left is to power-cycle the laptop and boot it up again. So, S3 -- for me, at least -- has been an utter failure. Which is too bad, because the way this laptop sucks down power, it'd be pretty handy.
Coldplug solved a lot of problems for me, so there are some things that work that didn't before coldplug, and I don't know why.
First is the framebuffer. When you first boot and use this laptop, you'll get big, blocky, 24x80 consoles. Compile framebuffer support into the kernel, emerge and run coldplug, and voila! You'll have 210x64 consoles.
X works pretty much out of the box with Xorg.
It took me a couple of weeks to get hardware accelleration working. Mind you, the Xorg driver ("ati" or "radeon") works fine, just without any hardware accelleration for OpenGL. I tried everything, and then one day, it just fixed itself. Here's what I think the final configuration needs to be.
First, get the 2.6.10-gentoo kernel running. You need this to get the ati-drivers to compile properly. Then unmask the ati-drivers.
cat >> /etc/portage/package.keywords <<EOL media-video/ati-drivers ~amd64 media-video/ati-drivers-extra ~amd64 EOL
Disable DRM in the kernel! I think this is what screwed me up for a long time. AGP will automatically be compiled into the kernel; apparently, with AMD64 you don't have the option of disabling it.
Back up your /etc/X11/xorg.conf file, and run the fglrxconfig tool. It will save the config to the correct place, despite what you read on the net. Use the defaults for everything, and don't worry about the sync rates it asks you for; put in anything. You're going to take them out later, because the drivers auto-detect the LCD.
Modify the resulting /etc/X11/xorg.conf. In the "Screen" section, delete the "Modes" line. In fact, mine looks like this:
Section "Screen" Identifier "Screen0" Device "ATI Graphics Adapter" Monitor "Monitor0" DefaultDepth 24 Subsection "Display" Depth 24 ViewPort 0 0 # initial origin if mode is smaller than desktop EndSubsection EndSection
Run X, and check that fglrxinfo gives you sane results:
18 % fglrxinfo ~ display: :0.0 screen: 0 OpenGL vendor string: ATI Technologies Inc. OpenGL renderer string: MOBILITY RADEON 9700 Generic OpenGL version string: 1.3.4893 (X4.3.0-8.10.19)
Check glxinfo, while you're at it. I get about 2391.600 FPS on glxgears, and about 134 FPS when I maximize the gears window. Respectable.
Here's my whole xorg.conf.
This was sort of a pain to set up, but the on-board Bluetooth chip works. In the end, I compiled bluetooth into the Kernel (NOT the USB Bluetooth support, but the other one) as well as every other related Bluetooth module I could find; it is currently working with these modules:
rfcomm l2cap hci_usb bluetooth
Also, emerge bluez-utils and bluez-libs; I also emerged bluez-pan and bluez-sdp, which needed to be unmasked. Then run /etc/init.d/bluetooth start, and it came up. Don't forget to change the name of your device, and the pin, in /etc/bluetooth/*.
I went through a lot of effort to figure this out, and this may should not be considered a tutorial. I did much more than I'm suggesting here, and I don't know which steps were relevent or needed. I'm happy it works, but I'm not sure I could repeat it.
Oh, make sure that you disable 802.11 and enable Bluetooth by pressing Fn-11, Fn-12, so that the orange light, not the green light, is showing on the third LED, while you're setting this up. The manual recommends using only one at a time, so it will help when you're getting it working to avoid any possible wireless conflicts. Once it is working, you can turn them both on and see what sort of mileage you get; over short distances, it appears to work fine for me, and I don't notice any degredation in the 802.11b signal (I don't have a 'g' WAP yet). And make sure Bluetooth on the laptop is enabled before you try to start the bluetooth daemon (/etc/init.d/bluetooth), or restart the bluetooth daemon after you enable bluetooth.
Finally, install kdebluetooth. It rocks. I recently bought an Ericsson P900 smart phone, since I'm ditching PalmOS, and got it to connect to the laptop. kdebluetooth provides drag-and-drop file installation with OBEX devices, among other things.
I've been so far unable to get this to work. I've tried the only Winbond drivers for Linux that I can find, and they don't appear to work. For one thing, the drivers are for "W83L51xD" chipsets, and lspci reports the chip in this laptop is an "8481". This isn't conclusive, and I'd like to get this working, so I'll poke with it some more. Here's another page related to Winbond cardreaders.
Word on the street is that with the 2.6.12 kernel, the reader works without patching the kernel. However, I haven't been able to get it working, and I haven't identified anybody who has, so I can't get a kernel config to compare.
Add irda-utils to package.keywords, because 0.9.15 doesn't compile fully under x86_64. Not only that, but it is misleading, because it appears to install, but the install in incomplete, and you'll be missing irattach.
Suprisingly, I've been unable to get this to work. I say "surprisingly", because this is the first laptop I've ever had where IR wasn't straightforward, and also because I had success with more esoteric features such as bluetooth. It appears everything is loading correctly, and the irda tools run without complaining, but nothing will communicate with the laptop. This will require more research.
Like the card reader, rumor has it that this now works with the 2.6.12 kernel. I haven't played with it yet, but I'll post more information when I do.
This was a no-brainer. Alsa picked it up right away. The module is snd_via82xx, and it picks up a dizzying array of mixers. The 5.1 surround sound appears to work, and the audio from this machine is simply fabulous. I haven't tried hooking it up to a stereo yet, but I don't anticipate any problems with that.
The screen is the most amazing thing about this laptop. Although it is shiny rather than matte, it is bright and crisp, and I don't notice any glare.
You'll want to mask gcc-3.4.3; it won't compile. Do this by adding ">=gcc-3.4.3" to /etc/portage/package.mask. Note that this may change, if the GCC folks fix gcc for cross compiling environments.
radeontool works with this graphics chipset. Emerge it, and try "radeontool light off". If you do, keep in mind that you won't be able to see the display, and will have to type "radeontool light on" blind. With this, you can do some neet tricks with screen blanking, and the great thing is that it turns off the really power-hungry part of the display, the backlight.
Incidentally, you do want to use 32-bit cross compiling. It is pretty easy to set up, because the 64-bit Gentoo install enables it by default... but don't turn it off, and read some of the documentation about it. There are some packages that won't compile or run in 64-bit mode, and the Athlon64 runs 32-bit applications just fine (and, theoretically, almost as fast as 64 bit native apps, although I have yet to test this).
A Little Story about PowerNotebooks. Four days after I got my shiny, new 4750, I came in to use it and it was dead. I've never seen a more lifeless piece of electronics. No power, no LEDs, no nothing. I called tech support (at 8pm EST, mind you) and they put in a trouble ticket and said they'd call me the next day.
Point #1: PowerNotebook's tech support answers the phone at night.
The next day at noon, I got a call from a tech guy at Sager in California who tried to help me troubleshoot the problem.
Point #2: They called me at 9am, their time, the next day.
He mustn't have understood my explaination of the problem, because he had me unscrewing and the panels and taking out DIMMs and stuff; we got to removing the DVD when he noticed that I kept saying "The light on the power brick flashes when I plug it into the laptop," at which point he said, "Oh, it flashes? Then I'm sorry... it's game over." He went off to talk to his manager for a couple of minutes, and when he came back, he said they'd replace it. He gave me two options: wait for them to send me an RMA sticker, ship the laptop back to them, and after they got it they'd send me a new one (expect about two weeks turnaround time), or give them a credit card number and they'd ship me a replacement laptop with an RMA sticker. This doesn't cost anything, but if I fail to ship back the failed computer, they charge me for the one they shipped.
Point #3: They offered me a way of getting a replacement without having to wait half a month.
I opted for the latter option; he was going to ship me a clone of the one I have, but I said I'd already started installing the OS, and would rather they just didn't ship a hard drive in the new laptop, and I'd swap out the one I have; he said this was fine, and that he'd ship the replacement the next day. As I'm writing this, I haven't received the replacement, so we'll see if it all goes smoothly. The moral of the story is that PowerNotebooks has exceptional customer support, and Mindern Computers (the company that makes the Sager brand and who does the RMA stuff) is equally on the ball. Considering their prices are very reasonable, this counts for a lot -- to me, at least. While I should be pissed that the laptop is broken, I'm actually quite pleased with PowerNotebooks and Sager, the companies. We'll see if I still feel this way when I get the new computer; much will depend on how quickly I get it.
I just found out that they shipped the replacement 2nd day air, without me asking. How's that for service?
The laptop arrived, and everything works fine.
Update 2005/156. About a year ago, we bought a Linux laptop for my wife from Los Alamos Computers. Several months ago, that battery died, and I tried several times over the next few months to get in touch with LAC in an attempt to purchase a replacement battery. They didn't respond to my emails, and I now notice that they appear to have gone out of business, which doesn't surprise me. In any case, I thought I had seen this model of laptop on PowerNotebooks' web site at some point, so I contacted them and asked them if they recognised the laptop. To make a long story short, it wasn't a model they sold, but they did find out which model it was and sent me a link to a third-party site that sold batteries for it. The upshot of this story is that, four months after purchasing the laptop, PowerNotebooks is still providing me with outstanding customer support, far beyond the call of duty. I highly recommend PowerNotebooks as a vendor if you can at all manage installing your own OS. In my experience, good customer support is worth far more than almost any other vendor trait.
PowerNotebooks are the people that I bought my laptop from. They do not install Linux, but are very knowledgeable about the hardware, and I found them to be equally knowledgeable about Linux. They have several good articles on their website, as well as hardware reviews and some good forums for Linux users. They won my purchase by (a) responding to me rapidly, repeatedly, honestly, and in great detail, and (b) by having good prices. They get bonus marks for shipping the laptop fairly rapidly -- within their advertised shipping time, and much more quickly than alternative vendors. It should be pointed out that they can afford to ship quickly because they don't install an OS on the machine
The D470K wiki has some good information about this computer, although they call it something different. The base system is a Clevo D470K, and Sager builds the 4750 from that. The BIOS, when it boots up, says "PhoenixBIOS D470K-1.04".
GamePC sells these laptops under the name GPN-A64C. The sales price is barely more than PowerNotebooks, and they will install Linux to boot (for a price). They were also good about answering my questions, although not as quickly or with as many details as PowerNotebooks. However, there are a couple of reasons why I didn't go with them:
They only provide a couple of distributions, and Gentoo wasn't one of them. Therefore, I'd be installing my own OS anyway.
On the customization page for this computer, they give, as an option, a 12-cell battery upgrade (the 4750 comes with an 8-cell battery). The only problem is that this battery is for an entirely different laptop, and won't fit in the 4750. I don't know if they catch that before they ship it, or if they charge you for it but don't do the upgrade (how are you going to know the difference?), or what... but it made me a little suspicious.
Please note that I've done no business with GamePC, so I can't actually vouch for their service or product. As always, caveat emptor.