Review and Installation of Linux (Fedora Core 2)
on a Sharp Actius MM20 laptop.

By David Cafaro <dac(at)cafaro.net>

UPDATES:

Febuary 7th, 2005 - Well, I finaly wrote up the Fedora Core 3 install. Go to that link to get the lowdown, oh and check out the Wireless section, I found a cool new tool, and the instructions will probably work for Fedora Core 2 as well!

January 31st, 2005 - Ok minor note, I've installed Fedora Core 3 on the laptop, I'll soon add a new page that documents that install and link to it from here. Most things went pretty well, but DRI is seriously broken in the 2.6.10 kernels from Fedora. Anyways, more on that in the how-to to come.

December 27th, 2004 - Some minor notes and updates. I'm currently frozen at the 2.6.8-1.521 Fedora kernel. Kernels beyond that will not fully shutdown on power off. Also suspend to ram has stopped working on kernels after 2.6.6 from Fedora. I haven't gotten around to building my own kernels again, debating on moving to FC3 and a custom kernel this coming weekend. Also I did purchase the extended run battery and it gets about 7 hours on it, very nice :-).

June 26th, 2004 - Recompiled the 2.6.7 kernel with Pentium III as the target platform vs the Fedora default of Pentium Pro and squeked out a 215-220 fps on glxgears.  Also added some links to others who have installed Linux on an MM20

June 23rd, 2004 - Ok, figured out what was causing the kernels to lock.  Apparently AGPMode 4 is no longer working with the 2.6.6 and later kernels.  This happened with the Fedora 2.6.6 kernel as well as a hand built 2.6.7 kernel of mine.  The way to get around it is to comment out the Option "AGPMode" "4" in the xorg.conf file.  Oh, and no AGPMode 2 doesn't work either.  I'm going to keep working and see how to get AGPMode 4 back up and running, just not sure how right now.

June 16th, 2004 - Both the updatd Fedora Core 2 Kernels 2.6.6-1.427 and 2.6.6-1.435 cause a hard system lock at run level 5. They will boot into run level 3, but starting X windows will cause a hard lock. Sticking with the orginal kernel for now. See this BugReport 125974 for details (and add to it if you can) .

June 15th, 2004 - Ok, I did it, bought a Linksys WRT54GS and yes 802.11G works great! Very nice.

The Review and How-To:

Well I've had this new laptop for 3 weeks now and have gotten most everything working on it now. First off this thing is SO small. I'm talking under two pounds small, thinner and lighter than most of my O'Reilly tech books! I recently changed jobs and since I was loosing my trust Dell C610 with the old job, I needed to find myself a new laptop. Since I had a good desktop now, I just wanted something small and light to complement it and let me do a little writing, a little email, some web browsing, remote systems admin, and maybe a little coding hear and there. My final two choices were a Apple Powerbook 12" and the Sharp MM20. I went with the MM20, and have been happy ever since.

Hardware:

Here is the rundown on the hardware this thing comes with and what I think of it:

  1. 1Ghz Transmetta Efficeon Processor. Ok, I know it's a Transmetta and the first thing everyone thinks of is slow. Well, these new Efficeon processors seem to be doing a much better job of trying to be fast. It's still not fast, but it's quick enough that I could play Bzflag at 1024x768 just as well as my old 1.2Ghz PIII C610 laptop.
  2. 512MB of DDR memory. Unfortunately this is built-in and can not be upgraded. Fortunately they were wise enough to give it 512MB of memory which is enough for what this laptop was designed to be.
  3. 20GB 4200rpm Harddrive. It's not much space, but it is enough for what it was designed to be, a desktop companion. Unfortunately it seems to be the main cause of slow speeds on the laptop. I don't know why but this harddrive feels slower than any other I've owned in a laptop. Maybe in the future I will be able to get a replacement 1.8" drive for this machine with some more space and better performance.
  4. 1024x768 10.4" TFT display with ATI Radeon Mobile 16MB graphics card. The screen is small, but because of the quality of the display (it is VERY sharp and VERY bright) reading webpages and email is no problem. Also thanks to a decent graphics card you can get 3D to work with pretty good results.
  5. 802.11b and g (PrismGT/Duette).This laptop comes with built-in Wireless networking, and yes it works with Linux! Also there is a nice function key that lets you turn of the wireless card antenna when you don't need it. It's hardware based so nothing to setup in Linux for that function. I haven't tried it with 802.11g yet, but the 802.11b works great.
  6. Ethernet port (Realtek). One standard 10/100 port, works fine.
  7. USB2.0. This works and I've gotten pretty good transfer rates, much better than USB1.1. I've used it with a Flash memory key, a USB external HD, and a USB mouse with no problems.
  8. Synaptics Touchpad. Ok, it's a nice touchpad, but it caused 95% of all my problems and was the sole reason it took almost a week before I could finally even get a 2.6 series kernel to work on this laptop. I'll go into more detail below in the install part, but finally everything works, tap to drag, scrolling, all good.
  9. Sound (ALI 5455). Works fine, but the built-in speaker is horrible. About the only thing it's good for are sound alerts. Luckily the headphone out jack works great and had pretty decent sound quality. Unfortunately it doesn't get real loud, so may not drown-out outside noise in loud environments with out a real good set of headphones.
  10. Keyboard. It's smaller than normal, but thank fully it has a very good feel to the keys so I was able to very quickly get a feel for it. My typing is back up to it's normal horribleness ;-).
  11. PC Card Slot and PCMCIA V.92 modem. The laptop doesn't come with a built-in modem, but instead comes with a Zoom v.92 PC Card modem. I haven't used it yet so no idea if it works. The PC Card slot is recognized, but I haven't used any cards with it yet.
  12. Docking cradle Ok very very cool feature. You bring your laptop home, have some documents you need to move to your desktop, what do you do? Well if you have MM20 you just stick it in the docking station, hit the on button on the dock, and mount your laptops harddrive as a harddrive on your desktop. That's it, and now you have access to all your files. And yes it works with Linux, and thanks to USB2.0 it's reasonablyquick. Very nice feature, and it charges too!
  13. E>xternal USB2.0 CDRW/DVD. Well at least the CD reading part works. I haven't tried burning a CD yet, but XCDRoast sees the drive and seems ready to go. I also haven't tried playing a DVD on it yet, but again, don't see any reason why it won't work. This doesn't come standard. I paid an extra $99 to get this, but it was a necessity since there are no built-in drives on this machine, and I had to get Linux on it some way!
  14. 1800 mAh Battery and Longrun. This is the standard battery that comes with the laptop. They claim it can get up to 3 hours on it. My best so far, doing standard stuff (Browsing, Email, etc.) was 2 hours. I was hoping for more, and I may yet get more with some better tweaking. That and I do plan on purchasing the extended battery (which will almost come for free from the Sharp Rewards program), which they claim will give 9 hours, I'll be happy with 7-8 hours (ok I got about 7 hours, not bad). As for longrun, I've gotten some features to work, but I have not been able to get true Longrun working. Best I can do is have the system set a low CPU setting for when on battery and automatically increase the CPU when on AC power. I have yet to find any support for thermal scaling and auto longrun on the Efficeon processor and the 2.6 kernel.

 

The Install:

I decided to go with Fedora Core 2 for several reasons. First and foremost is the use of the 2.6 kernel. Fedora Core 1 installed fine on the laptop but, it doesn't fully support the AGP bus nor the wireless network card. So without doing a LOT of back porting and compiling I would have no Hardware 3D or wireless networking. The 2.6.5 kernel and above have built-in support for the new Efficeon front side bus which includes AGP hardware support as well as having the Prism54 drivers included for the new 802.11b/g wireless card. Then there is the fact that I've always been partial towards Red Hat distros and Gnome so I stuck with Fedora Core.

Since I had first installed Core 1 on the laptop and that had gone so easily, I thought Core 2 would be just as easy but with the additional support of my newer hardware. I was wrong, very wrong. I started the installer and it failed to recognize the touchpad. It found no mouse device. I tried again and again, and no mouse device. I tried many different kernel commands at boot to try and get it recognized and nothing. I even plugged in a USB mouse to get through the install, but soon as I was done and I tried starting X Windows with out an external mouse, X crashed complaining that it couldn't find a mouse. I fought with this for several days. Finally, I got lucky and one google search after many finally found my solution. To get this laptops touchpad to work with the 2.6 series kernels you must pass the following on the installers boot line:

linux acpi=on i8042.nomux

Without that line the mouse will never work (the acpi=on is just to make sure the installer setups the acpi system for the laptop). Later on you must add this bit to every grub kernel line you have so that your mouse continues to work. I've filed a bug 2713, but no response yet.

Stage 1 of the install: Base Install

So to get the install started I booted up the Fedora Core 2 disks and and started the install with the "linux acpi=on i8042.nomux" command. From there just follow the normal install routine and throw on what every software you want. The only thing to remember is to configure the grub boot loader to add the "acpi=on" for your power management, "i8042.nomux" for your touchpad to work, and I added "idebus=66" to try and squeak out a little more performance from the harddrive. Once the install finishes you should be good to go.

Stage 2 of the install: Wireless Networking

Ok now that the base system is on, time to get some features working. First up is that wireless card. Though the drivers are installed you need to go grab the firmware off of this site:

http://prism54.org

Go to the Firmware section and download the 1.0.4.3.arm file. Rename the file isl3890 and place it in the /usr/lib/hotplug/firmware directory. After that you can manually startup the network card using ifconfig and iwconfig. I haven't managed to get Fedora's ifcfg-eth1 scripts to setup and activate the network card correctly. Instead I wrote the following script that sets everything up and activates the wireless card for my home network:

#!/bin/bash
# Dry start to load firmware
/sbin/ifconfig eth1 up
# Wait a sec to make sure it's good and loaded
sleep 2
# Now really load it
/sbin/iwconfig eth1 essid MYNET Managed channel 6 key VERYLONGKEYCODE
/sbin/ifconfig eth1 192.168.2.36 netmask 255.255.255.0
/sbin/route add default gw 192.168.2.1

I'm sure there is a cleaner more elegant way to do this, but this works for me. (update, found a realy cool tool, but installed it on Fedora Core 3, go to the wireless section on the FC3 Install page to get info that would probably work for FC2)

Stage 3 of the install: Synaptics Touchpad

Well, the base install gets the touchpad working, but only the very basics. No tap and drag, or tap and click. Just move and click the buttons. Thankfully it's pretty easy to add on true synaptics support. I just downloaded the synaptics diver from this site

:http://w1.894.telia.com/~u89404340/touchpad/index.html

I just followed the readme instructions to build and then install the driver. Once it was installed then I just edited my xorg.conf config file to the following for the mouse:

Section "InputDevice"
    Identifier "Mouse0" 
    Driver "synaptics" 
    Option "Device" "/dev/input/mice" 
    Option "Protocol" "IMPS/2" 
    Option "LeftEdge" "1700" 
    Option "righted" "5300" 
    Option "topped" "1700" 
    Option "bottomed" "4200" 
    Option "fingerless" "25" 
    Option "FingerHigh" "30" 
    Option "MaxTapTime" "180" 
    Option "MaxTapMove" "220" 
    Option "VertScrollDelta" "100" 
    Option "misnamed" "0.06" 
    Option "MaxSpeed" "0.12" 
    Option "AccelFactor" "0.0010" 
    Option "SHMConfig" "on" 
    Option "ZAxisMapping" "4 5" 
EndSection 
           


These get the basics set, but you will probably have to adjust it to your own liking. I'm still figuring out my favorite settings, but these seem to work pretty well.

Stage 4 of the install: 3D Acceleration

For the most part this should be working from the default. The only thing I would add would be the following line in the "Device" section of the xorg.conf file:

Option "AGPMode" "4" (REMOVED for 2.6.6 and greater kernels!)

Again, just to get a little more performance out of it.

Stage 5 of the install: Harddrive performance

I went to the /etc/sysconfig/harddisks config file and enabled the "EIDE_32BIT=3" option, once again to get more performance out of it. It already defaults to DMA so nothing to be done there.

Stage 6 of the install: Power management/Battery life

Ok this is a laptop and it needs to be mobile. I wanted to try and get as much power out of this tiny thing with it's tiny battery as I could. To start with in the /etc/fstab file I added "noatime" to all the main partitions to try and reduce the number of times the harddrive gets activated during non-active moments. Harddrive motion burns battery power. Next on the list was to get some of the processor throttling tricks to work. The version of longrun that comes with Fedora Core 2 does not work with this laptop (Bug 123963). Neither does the init.d script cpuspeed. I disabled cpuspeed from running at boot. There are two things you need to do to get longrun working on this laptop. First off you need to load the kernel modules cpuid and msr. I did this using the following init.d script to load these at boot (/etc/init.d/loadcustmod ):

#!/bin/sh
#
# loadcustmod Load Custom Modules Needed
#
# chkconfig: 2345 10 99
# description: Loads modules needed that don't load automatically
#
/sbin/modprobe cpuid
/sbin/modprobe msr
# End of Script

Next to get a working longrun utility I went to the debian source packages and latest patch from here:

http://packages.debian.org/unstable/utils/longrun.html

I downloaded the source tarball and the patch, applied the patch and compiled. After this version of longrun was made I replaced the /usr/sbin/longrun on my Fedora Install with my new version and everything was happy again. An important note here is that this new version of longrun is supposed to support thermal scaling. This DOES NOT work on the Efficeon processor. The only thing I've managed to do with this option in lock my computer HARD. Don't use it! You have been warned.

With this new version of longrun installed it's now possible to throttle down the CPU and put the CPU into economy or performance mode. To do this I added the following script which is activated at boot time and by ACPI whenever there is a change in A/C adapter state:

#!/bin/sh
#
# Powerstatus Check Laptops Powerstatus (AC Power)
#
# chkconfig: 2345 99 99
# description: Checks AC Power status and adjusts CPU accordingly
# /etc/init.d/powerstatus

status=`/bin/cat /proc/acpi/ac_adapter/AC/state | /bin/awk {'print $2'}`

case $status in
"on-line" ) /usr/sbin/longrun -s 0 100
/usr/sbin/longrun -f performance
exit 0
;;
"off-line" ) /usr/sbin/longrun -s 0 33
/usr/sbin/longrun -f economy
exit 0
;;
esac
echo "Something didn't work right."
exit 1
# End of Script

This will basically limit the CPU to 600 MHz and economy mode whenever on battery power and the full 1000 MHz and performance mode when on AC Power. To get this script to run when the power adapter changes you need to add the following to the /etc/acpi/events directory. I created the adapter.conf file which handles the power mode switching as well as a power.conf that handles the power button (which will shutdown the laptop if the power button is pressed and held):

# This is the /etc/acpi/events/power.conf ACPID configuration file
event=button/power.*
action=/sbin/shutdown -h now

# This is the /etc/acpi/events/adapter.conf ACPID configuration file
event=ac_adapter.*
action=/etc/init.d/powerstatus


So now the system automatically switches to powersave mode when the ac-adapter is unplugged and performance mode when the ac-adapter is plugged in. Very nice.

Stage 7 of the install: Suspend Modes.

Ok I didn't even try to get suspend to disk to work. I've never used it and didn't see a need to start. I have worked some on getting suspend to RAM to work. So far is suspends fine and comes back to life with no problem except one. When coming back from suspend for some reason the wireless antenna gets turned off, and I haven't figured out how to get it to turn back on without rebooting the laptop. I haven't played to much with this yet, isn't a top priority for me, but it would be nice to get it to work correctly. To have suspend work on a lid close I added another file to the /etc/acpi/events folder:

#/etc/acpi/events/lidbutton
event=button[ /]lid
action=/etc/acpi/actions/lidbutton

and the /etc/acpi/actions/lidbutton script:

#!/bin/sh
#/etc/acpi/actions/lidbutton
#/sbin/cardctl eject 0
#/etc/init.d/network stop
sleep 1
echo -n "mem" > /sys/power/state
sleep 1
/sbin/hwclock --hctosys
#/etc/init.d/network start
#/sbin/cardctl insert 0


The commented out lines are things I'm still trying out to get the Wireless networking to work after resume from suspend. I haven't relay played much with it, I just included it for ideas.

Stage 8 of the install: The Dock.

Well this was easy. Plug in the AC-adapter to the dock, plug the docks USB cable to a USB port on my desktop (Running Fedora Core 1) and turn it on. Edited the /etc/fstab folder to include the partitions I wanted to mount (the MM20 showed up as the /de/sda device) and then start mounting. That's it. Works just like any other USB storage device. No problems at all so far.

Conclusion:

Well, I've pretty much got everything working the way I want to now. The only things left are to get some better battery life out of it, and to improve on the suspend to memory mode. So far I love this laptop. Sure it would be nicer to have a larger screen, more processing power, and a built in DVD drive. But every time and pick up my bag to head to work and have to double check that I actually put my laptop in there because it's so light I remember why I gave up those aspects. If I need a bigger screen or more power, that's what the desktop computer is for. When I just want to be able to do a little work, read some email, and browse the web, I just sit down relax and play on my MM20 anywhere.

References:

These are the sites that I used to help figure out how to get this laptop to work. Thank you to the authors and contributors on these sites for adding their knowledge for all to share!

Wireless Stuff:
http://prism54.org/
http://prism54.org/forums/viewtopic.php?t=72

MM10 (Older Model) Laptop stuff:
http://www.linux-laptop.net
http://web.mit.edu/jjl/www/mm10/ 

Other MM20 installs:
http://www.blackindustries.biz/~castongj
http://spr.mahonri5.net/mm20.php
http://burdell.org/~pitr26/

Touchpad Information:
http://w1.894.telia.com/~u89404340/touchpad/index.html

And my Favorite LUGs that always share their knowledge:
http://www.calug.com
http://www.trilug.org