Installing Linux on the Sharp MP30
Here are my notes on installing Slackware Linux 10.0 on a Sharp MP30. I wanted to keep my WinXP partition intact so this took a bit of digging to make sure I wouldn't wipe it out, but it's not really so hard for Windows and Linux to co-exist on this machine.
(most of this is from somewhere in /proc)
  • CPU: Transmeta Efficeon
  • Northbridge: integrated on CPU
  • Southbridge: ALi Corporation M1563 HyperTransport South Bridge
  • RAM: 512MB
  • Graphics: ATI Technologies Inc Radeon Mobility M7 LW [Radeon Mobility 7500]
  • Hard Disk: Fujitsu MHT2040AT SP - 40GB, 4200RPM?
  • CD-ROM: Matsushita UJDA765 DVD/CDRW
  • Ethernet: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+
  • Wireless: Atheros Communications, Inc. AR5212 802.11abg NIC
  • Modem: ALi Corporation M5457 AC'97 Modem Controller
  • Sound: ALi Corporation M5455 PCI AC-Link Controller Audio Device
  • USB: ALi Corporation USB 1.1 and 2.0 Controllers
  • PCMCIA: Ricoh Co Ltd RL5c475
This is what fdisk reports as the default disk layout:
Disk /dev/hda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        2550    20482843+   c  W95 FAT32 (LBA)
/dev/hda2            2551        2576      208845   88  Unknown
/dev/hda3            2577        4226    13253625    f  W95 Ext'd (LBA)
/dev/hda4            4227        4864     5124735   de  Dell Utility
/dev/hda5            2577        4226    13253593+   b  W95 FAT32
/dev/hda1 is for WindowsXP
/dev/hda2 is for the InstantPlay software (Linux probably)
/dev/hda4 is for the recovery software (Win98?)
/dev/hda5 is an empty partition for DirectHD

It's strange that Sharp decided to format the primary Windows partition as a FAT32 partition instead of NTFS. Not a big deal though. The recovery partition is about 5GB, but only about 2GB is used.

I removed /dev/hda5 and created two new partitions:
/dev/hda5            2577        2699      987966   82  Linux swap
/dev/hda6            2700        4226    12265596   83  Linux
That's a 1GB swap partition and the rest for the OS and apps and data.

Sharp includes a Windows utility to create recovery CDs from the images stored on /dev/hda4 so that partition could be wiped out and used for Linux also. The recovery software can either repartition the whole drive or just re-image /dev/hda1 (the C: drive) so with this setup, it's possible to restore Windows without harming Linux. But to be safe I booted Knoppix and created images of the InstantPlay and the recovery partitions on an external drive using dd.

I can't remember if I also did the repartitioning under Knoppix or under the Slackware installation rootdisk, but it's all the same. As root, run
# /sbin/fdisk /dev/hda
Delete partition 5, add partition 5 with the default start and +1G for the end, add partition 6 with the default start and default end, change the type for partition 5 to 82 (Linux swap), write the parition table and it's all done.
Installing Slackware
I grabbed the ISOs for Slackware 10.0 off of BitTorrent a while ago but never tried it out. Since the optical drive is built in, simply booting from disc 1 will start the install.

Speaking of Slackware, Pat Volkerding, the Slackware maintainer, is suffering from some strange illnesss. So if any healers out there are reading this and have an idea for how to help him, please contact him. His information is in the letter.

The default 2.4.26 kernel loaded fine and provides enough drivers to install Slackware. I just followed the standard Slackware install procedure:
# setup
It's not a pretty graphical setup tool like Fedora or Mandrake, but it does the job.

The only step I skipped was the lilo install because I didn't want to wipe out the boot sector.
2.6.x Kernel
I installed the 2.4.26 kernel at first but I ran into some problems. It worked, but not well enough. So I downloaded the 2.6.9 kernel. This version of the kernel supports the Efficeon AGP GART and I've heard that it "feels faster" whatever that means.

Update [12/3/04]: This was a stupid mistake: I used the UHCI USB driver instead fo the OHCI driver. Using the UHCI driver causes the CPU to never go into C3. Here is the new .config file. The only difference is OHCI instead of UHCI.
Here's the .config I ended up using. It's probably not optimal (it's using the PIII compiler optimizations) and has a lot of junk that I will never need in there, but it's doing the job.

Speed is always a question when using Transmeta CPUs, but the 1.6GHz Astro 2.0 is no sloth. It took about 15 minutes to compile the kernel and all the modules. Not too bad.

Update [3/21/05]: I have been trying to install a newer kernel for a while now but without success. Today, I manged to get the 2.6.11 kernel working. The problem was that the keyboard wouldn't work after the machine boots up. To get it to work, I had to add another parameter to my lilo.conf:
image = /boot/vmlinuz-2.6.11a
  root = /dev/hda6
  label = linux-2.6.11
  append = "i8042.nomux i8042.noacpi"
After that, the keyboard worked fine. I put in the latest (for today) CVS snapshot of the Atheros Madwifi driver. So far, no problems.
Power Management
The biggest problem with the default 2.4.26 IDE kernel was that the CPU fan would never turn on. ACPI was enabled and appeared to be somewhat working, but it would never turn the fans on. I could watch /proc/acpi/thermal_zones/TZPR/temperature and watch it rise as the CPU was active but the fan never turned on. I've seen the temperature go up to 70C but the fan should come on at 55C. When the fan did work, however, it does a very good job of keeping the CPU temperature between 49C and 55C.

Switching to 2.6.9 fixed the fan problem. I never figured out why the fans didn't turn on under 2.4.26. This configuration has Longrun support in it so the CPU frequency will switch between 533MHz, 800MHz, 1.4GHz, and 1.6GHz. You can see this in /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq so Longrun is doing its job.

I built in the performance, powersave, and userspace governors but they're not necessary with Transmeta CPUs.

All the ACPI events put a ton of useless log messages because there are no handlers for most of the events. So I put empty handlers in /etc/acpi/ to clean everything up.
Wireless Networking
The Atheros device drivers aren't part of the Linux kernel sources yet. But you can find them here. Yep, that's mad wifi. I'm using the CVS current version as of 11/18/04.

Building it wasn't a problem. Just the usual:
# ./configure ; make ; make install
And it's ready.

Slackware's hotplug script detected it and loaded the module just fine. But the interface is called "athX" and Slackware's /etc/rc.d/rc.inet1 tries to bring up "ethX" interfaces.

I copied /etc/rc.d/rc.inet1 to /etc/rc.d/rc.ath and made a bunch of changes to it to bring up the ath0 interface. ifconfig and iwconfig set everything up properly. I added a call to rc.ath in rc.M. It has to go after rc.hotplug is finished or the ath_pci module won't be loaded yet.
Wired Networking
The network card uses the 8139too driver. The one with the kernel worked fine for me. With a network cable hooked up, I could get an IP address from my router without any problems.
The touchpad is a Synaptics PS/2 touchpad. I read somewhere that some machines use a USB-PS/2 converter internally to connect PS/2 devices so the USB subsystem needs to be brought up for PS/2 devices to work. I compiled USB support into the kernel and psmouse as a module so that psmouse can be loaded after USB, but it's not necessary on this machine.

For the pointer to work, you'll need to add "i8042.nomux" as a parameter to the kernel at boot time. Also, the default gpm configuration uses ps2 as the type, but that needs to be changed to imps2. Finally, make sure input device event handling is either in the kernal or loaded as a module.

The Syaptics driver for XFree86/Xorg came from here. I just followed the instructions in there to compile and install. The touchpad works fine under X. The right and bottom edges provide scroll capability and the top and bottom corners on the right side simulate middle and right clicks respectively.

There's also this tpconfig tool but I haven't tried it yet.
The sound card in this box is a ALi 5455 and it uses the Intel i8x0 driver (snd_intel8x0). Since ALSA is the default on the 2.6.x kernels, I used that driver. The only problem I ran into was that I thought it was an ALi 5451 card so I compiled that module instead. The volume controls are recognized by xev. Here's the output:

Volume down (Fn+F3)
KeyPress event, serial 30, synthetic NO, window 0x2000001,
    root 0x40, subw 0x0, time 414258, (106,-18), root:(688,336),
    state 0x0, keycode 174 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0x2000001,
    root 0x40, subw 0x0, time 414413, (106,-18), root:(688,336),
    state 0x0, keycode 174 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
Volume up (Fn+F4)
KeyPress event, serial 30, synthetic NO, window 0x2000001,
    root 0x40, subw 0x0, time 414995, (106,-18), root:(688,336),
    state 0x0, keycode 176 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0x2000001,
    root 0x40, subw 0x0, time 415147, (106,-18), root:(688,336),
    state 0x0, keycode 176 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
Mute (Fn+F10)
KeyPress event, serial 30, synthetic NO, window 0x2000001,
    root 0x40, subw 0x0, time 416665, (106,-18), root:(688,336),
    state 0x0, keycode 160 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0x2000001,
    root 0x40, subw 0x0, time 416795, (106,-18), root:(688,336),
    state 0x0, keycode 160 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 

I used xbindkeys to bind them to adjust volume. Here's my .xbindkeysrc file. Since I use KDE, I can use the DCOP interface to kmix to change the volume. Of course, kmix needs to be running for this to work. The "mute" command is ugly. It would be nice to make it simpler. It's probably also possible to use amixer or whatever GNOME's audio subsystem is, although I never tried it.
X Windows
Slackware now uses instead of XFree86 due to some licensing issues or something. But they're not much different. Just the name. The only changes I made to xorg.conf was to add Option "DPMS" in the Monitors section. But now it randomly turns off the display. I'm not sure why, but it's really annoying.

I'm also not using the Radeon DRM drivers. Not sure how to get that to work. And everything seems to be working ok for now.
lilo Configuration
For a while, I was booting Linux off of a USB memory drive, but that gets annoying. So I installed lilo using the liloconfig utility. I have an entry for Linux with a 2.6.9 kernel, Linux with a 2.4.36 kernel, Windows XP and the recovery partition.

The recovery partition doesn't work. I think I might need to do some partition hiding or something because I think it uses Windows 98 (DOS) as an OS so it gets confused when it finds a FAT32 partition at /dev/hda1. Or maybe I need to change the partitiong type to FAT32 before trying to load it.

I added the kernel i8042.nomux kernel parameter to my lilo.conf file under the 2.6.9 kernel section:
image = /boot/vmlinuz-2.6.9
  root = /dev/hda6
  label = linux-2.6.9
  append = "i8042.nomux"
Remote Control
There was a remote control in the box that can do things like control CD/DVD playback and volume control. This was surprisingly easy to set up. All the actions map to Win + a number. Here are the mappings in a format that will work for a .xbindkeysrc file:
"volume pushed down"
    m:0x40 + c:11
    Mod4 + 2
"volume pushed up"
    m:0x40 + c:12
    Mod4 + 3
"volume pushed in"
    m:0x40 + c:10
    Mod4 + 1
"play/pause pressed"
    m:0x40 + c:13
    Mod4 + 4
"playback pushed down"
    m:0x40 + c:16
    Mod4 + 7
"playback pushed up"
    m:0x40 + c:15
    Mod4 + 6
"playback pushed in"
    m:0x40 + c:14
    Mod4 + 5
I don't really plan on using the remote very much so I don't have those key sequences bound to anything. But it does work.
I think the main problem I had with getting suspend-to-RAM to work was the video. After resuming, I could still enter commands (like playing an mp3 with mpg321) but the video would be completely dead. I had to enable console frame buffer support to be able to resume. To resume from X I had to disable glx in my /etc/X11/xorg.conf file. I think it's possible to resume from STR with that enabled but I'm not sure what else needs to be done. I had to change some kernel configurations also. I'm not sure which one actually did the trick though. Maybe just enabling frame buffer did it.

To go into S3, simply run this command as root:
echo 3 > /proc/acpi/sleep
echo mem > /sys/power/state
I'm not sure what the difference is. But they both work. I put that command into a script so that I can unload modules and stuff before going into S3 and reload modules and reconnect my network interfaces after resuming.

The Fn-F12 key combination generates an ACPI button "sleep" event when it is pressed. In /etc/acpi/ I bound that event to my suspend script. What's great is that this runs as root so I don't need to worry about setting permissions and all that. Maybe that's a bad thing. I don't know.

For some reason, X is really slow when resuming from suspend-to-RAM. I followed some tips on William Stein's Thinkpad T42 page and used parts of his fakex script in my suspend script while resuming. It takes a while to resume now, but at least X isn't slow. I need to somehow make it cleaner. Right now, X will come up functional but sluggish for a few seconds, then the screen will go blank and then my windows will come back without the sluggishness.

One other thing I had to do was to change my /etc/acpi/ script to not shut down when the power button was pushed while resuming from STR. Thanks to Brad Emerson for this tip. Since I still want to be able to shut down the machine with the power button while not in S3, I replaced the /sbin/init 0 line with a script. It checks for a certain file that is present when the laptop is either going into or waking up from suspend-to-RAM. If the file exists, then do nothing and delete the file, otherwise shut down the computer. Here's what's in my power button script:
#!  /bin/tcsh

set SLEEP_FILE=/var/run/sleeping

if (! -f $SLEEP_FILE) then
  /sbin/init 0

My suspend script, will create the file right before it writes /proc/acpi/sleep and go into S3. It seems to be working pretty well so far.
Other Stuff
I updated Slackware 10.0 to slackware-current using swaret. It took a while but everything seems to be in tip-top shape. The only problem was that my old xorg.conf file wouldn't work (keyboard not detected, wtf???) so I had to rerun xorgconfig. Not a big deal.

There's a 56k modem on the side of the laptop but I haven't tried it yet. Since I don't have any dial-up services, I probably won't ever try it.

DVD playing works fine with xine and libdvdcss installed as long as the optical drive (/dev/hdc) had DMA turned on:
# hdparm -d 1 /dev/hdc

The PCMCIA port worked fine with the 2.4.26 kernel, but I haven't tried it with the current kernel.

One of my co-workers has gotten suspend-to-RAM and suspend-to-disk working on his MP30 but with mine, it will wake up, fill the screen white, fill the screen black, and then turn off. He was using SuSE with the same kernel. I'll have to go talk to him about it. Update [1/12/05]: I got suspend-to-RAM working, sort of. See the suspend-to-RAM section.
Debian on the MP30
Change Log
5/19/06 - Added a link to a Debian install howto
3/21/05 - Switched to a 2.6.11 so I added some instructions
1/12/05 - Added a suspend-to-something section
12/3/04 - Updated the .config file to use OHCI instead of UHCI
11/28/04 - Initial version

e-mail me: carl A.Tee