Linux on Toshiba Satellite 5100-501 / Satellite 5105-S607
rob miller -- rob at janerob dot com

February 2007


Get the cPad driver - LCD and middle button work!

Latest news:

Contents


Disclaimer

This is my best effort at documenting what I've done to get Linux running on my Toshiba Satellite 5100-501. What you do with the information, which may include errors, is fully your own responsibility. I assume you have basic Linux skills including the ability to configure, build and install your own kernel. Furthermore, my effort here is to supply information, not a turnkey solution for your system -- you may actually have to look at the configuration and other files I have supplied. The files here have generally not been cleaned up. Use at your own risk. All trademarks are the property of their respective owners. Finally, many of the links are a bit old now, you should definitely look for the latest versions of the X server, ACPI patch, etc. -- check the source websites in the links.
 



Overview

Things I've got working: faster hard disk, ACPI + some Toshiba extras, ethernet, 1280x1024 framebuffer, 1600x1200 X windows, TV out, RGB out, DVD/CDRW, sound, SIR IrDA (minor issues), PCMCIA CF, 'Toshiba' and 'Internet' buttons, middle mouse button, cPad LCD, serial (with a Belkin USB-serial), SWSUSP (suspend to swap partition).

Things that don't yet work: trickery with the small lcd.

Things I haven't tried yet: bluetooth, FIR IrDA, S/P DIF, SD or SmartMedia cards, 1394 Firewire.
 

Hardware Specs

This document from Toshiba describes the overall specification of the 5105-S607, which I believe to be the US version of the 5100-501 (without Bluetooth or the 'Treasure Island' price). Here's my dmesg output and lspci -vv output for your perusal. Note that the IDE controller is not actually the Intel PIIX4 as selected in the kernel config, but it is recognised as ICH3M (82801CAM) during boot.

The main points of interest for me are:

Geeks like me may also care about:

See the dmesg and lspci -vv output for more info.
 

Software Specs

Information on this web page is based on the following configuration:

I recommend nothing less.
 

Display

(update 15 April 03)

I currently use^H^H^H^H^H^H^H^H^H^H^H^H^H was using the UXGA (1600x1200) server option for this system from Nvidia. The drawbacks are that this 'taints' the kernel with a non-GPL module, that -currently- there is no power management support (so suspend/resume breaks right here), and that it won't work with the 2.5 kernels by default. On the positive side, TwinView (for TV and RGB output with X windows) and the framebuffer interaction works, plus it's fast and pretty.

There are patches available to make this work on 2.5, I used them successfully during my SWSUSP odyssey. Check out the minion and/or devolus sites.

Here's my NVidia XF86Config-4 file. In addition to the more technical features, I've set the 'NoLogo' option to skip the Nvidia splash screen and set 'DigitalVibrance' to 2 (range is 0-4). Check out the Nvidia README to learn more options.

On some variations of this laptop users have reported to me some problems under X. Alan Danziger (Toshiba 5105-S901) needed

Options "IgnoreEdid"  "true"

in the XF86Config-4 file, while Steve Dean (Toshiba 6100) reported a black line on the right side of the display, and worked out that he needed to modify os-registry.c in the Nvidia kernel driver to have

 Vreg_SoftEDIDs = 0 (disable checking - default was 1)
 NVreg_Mobile = 2 (non-Compal Toshiba - default was ~0)

in order to get the full 1600x1200.

Your mileage may vary.

TV out: The config file above is set up to display on both the TV and LCD panel at 800x600 when/if you (re)start the X server with the TV output connected. TV sound works as well. J. Belmonte's work (toshiba_acpi module) supports TV out as a video option through the /proc/acpi/toshiba interface. Note, the toshiba_acpi code will let you put a console on the TV screen (hmmm, haven't tried with SVGAlib yet) without a reboot, but putting X on the TV always seems to require re-starting the X server.

Update: Oliver Koenig wrote me with an XF86Config-4 file that activates both the LCD and TV-out whether the TV is connected or not. Don't know if the Nvidia chip is happy about this but it's probably ok since X lets you do it... The magic lines are

  Option       "MetaModes"                "1024x768, 1600x1200; NULL,1600x1200"
  Option       "ConnectedMonitor"         "TV, DFP"
and here's his report.

RGB out: RGB output is a little trickier (or really simple -- just reboot with the monitor plugged in). To have software control, you need to install John Belmonte's Toshiba Extras ACPI module kernel patch. Switching puts the console on the external monitor as well as the X server, however the default setup above has TwinView using 800x600 when enabled. To get the full resolution, you need to select the second ServerLayout by starting with "startx -- -layout CRT". You can switch the XF86Config-4 file ServerLayout sections around so that the RGB TwinView is the default rather than the TV support and thus use xdm, but that's left as an exercise to the reader (see the comments in the file). As noted on J. Belmonte's pages, you should go to the console, switch LCD/CRT, and then go back to X. Sometimes doing this I get to a state where the LCD panel can't sync on the console framebuffer, but no big deal as the external monitor is there after all.

Framebuffer: Compile the VESA framebuffer into the kernel (I also like the 8x8 compiled-in font myself), and put vga=0x31a (1280x1024 at 16 bits color) or vga=0x346 for 1600x1200x16 (thanks Tom Lukasiak and a SUSE web page). into your lilo.conf. See the framebuffer howto. You may need to convert that to a decimal value for older lilo's. I think you also need the XF86Config-4 file's Frame Buffer section in order to switch between X and the console. No, TV out (at least to my TV :-) won't handle the 1280x1024 framebuffer, I just go back to vga=extended.

Extra thanks to macemoneta on the Compuserve Toshiba list for supplying his XF86Config-4 file, which was the basis for most of this.

If you do need to switch around between console and X while using the CRT or TV out, my findings are that you need to re-start X with the alternate video already plugged in. Presumably this is because the Nvidia driver will be accessing the graphics chip directly, independent of the Toshiba BIOS (HCI) commands used by the /proc/acpi interface.

The update bit is mostly covered under SWSUSP in the acpi section. Mainly I am happily running the XFree86 4.3 X server, though most of my X software is still 4.1, and it wasn't too painful a download. No, the TV and CRT out are not working at all yet for this server...
 

Keyboard & Mouse

There's an annoying key repeat problem under X windows, my solution is to use 'xkbset' as well as a special keymap (Xmodmap) to enable the 'windows' and 'menu' keys for use as extra mousebuttons. Ben Lynn's site explains that the spurious keypresses have the characteristic that the keyrelease is immediate, thus we can use an XKB preference called 'SlowKeys' to allow only keypresses that last a minimum length of time. Another XKB preference disables the bell that this setting enables. Next, one requires software to work with the XKB API and manage these features; I use xkbset by Stephen Montgomery-Smith (also in Debian unstable). Under Debian, I place this script in /etc/X11/Xsession.d to implement the key fix for all users (and - I think - the xdm login) as well as load my Xmodmap file. There are several other fixes for this problem around the net.

The mouse is USB, thus the 'USB Human Interface Device (full HID) support' is recommended, and see the XF86Config-4 file for the protocol. I haven't made any effort to set up gpm thus far.

If you load my cPad driver module, you can get the middle mouse button working (and won't need the hid module above). See John Belmonte's toshiba_acpi work to use/access the 'Toshiba' and 'internet' buttons next to the power button.


 

Sound

Sound options are either the i810 code that comes with the kernel distribution, or the Advanced Linux Sound Architecture (ALSA) software distribution. Here's some random hints which may be useful either way:


 

Toshiba modules / ACPI

As noted above, I'm using the ACPI patch. The benefits are at least some of the following:

Also as noted above, I'm using John Belmonte's Toshiba Extras kernel patch/module, which is based on the work of Jonathan Buzzard. This is now included in the ACPI patch. The benefits here are:

There's also the Jonathan Buzzard toshiba.o module (toshutils) already in the kernel source tree, this will only work if you exclude all the ACPI code from the kernel. In this case, load the module with the option "tosh_fn=0x62" to get the hotkeys (function keys) working. Alternatively, and still subject to the ACPI problem as far as I know, try Charles Schwieters' toshset utility (works without toshiba.o). I have heard that the problem with ACPI is not present in the 2.5 kernels.

SWSUSP:

I am successfully using the SWSUSP patch (also see here), a fully Linux solution for suspending to a swap partition. This required switching to the XFree86 Xserver version 4.3, and I'm now on kernel 2.4.21-rc1 with the ACPI patch. I was having a problem with the (non-kernel) PCMCIA code -- couldn't see the bridge after resuming -- but I have found that the kernel-PCMCIA code does all I need now; compile the code in (not modularised), I'm only using CardBus. There is a bug in the smc-ircc IrDA code, see my IrDA page for the fix while I wait for it to get into the kernel.

There is a problem with the 2.4.20 ACPI-patched kernel, fixed in the 20030321 and later ACPI patches. The problem appears as a general slowdown for the whole system, and if you run 'top' you'll see 'system' getting 99-100% of the CPU with 'keventd' accumulating loads of time. There is a "fix" (the correct term is actually "hack" :-) that I heard of second-hand from Marco Trevisani:

Edit drivers/acpi/events/evrgnini.c, go to end of function 'acpi_ev_pci_config_region_setup()' and comment out the line that reads

acpi_os_derive_pci_id (node, region_obj->region.node, &pci_id);

(in the 2.4.21-pre3 is at line 274).

This doesn't seem like the best solution to me, but it seems to work without any other side-effects that I've noticed. A better solution as of today is to use kernel 2.4.21-pre5 or later; there is an ACPI patch (without the bug) and the SWSUSP patch from < href="http://fchabaud.free.fr/English/default.php3?COUNT=3&FILE0=Tricks&FILE1=Laptop&FILE2=Swsusp">fchabaud.free.fr for the previous ACPI-patched kernel -almost- works (check and fix the errors by hand when you apply the patch!).

I tried a lot of different things before I finally got this all working. Here's the main 'gotchas':

I think that's it, the main thing should be knowing that it really does work on the this laptop once you can get a non-NVidia X solution. Here's today's 2.4.20 kernel .config file in case I missed anything.

(28 Apr 03) I am using the 20030328 ACPI patch with the swsusp-rc1-1924 and swsusp-1925-incremental patches. You need to read the mailing list (linked off the SWSUSP FAQ page) to work out which patch goes with which kernel, but seems reliable for me at the moment. I did have some problems when the kernel compile wasn't just right, e.g. having it look for ide-cd as a module when it was compiled-in, and the 0424 ACPI patch seems to play ok with the SWSUSP patches but the resulting kernel doesn't suspend/resume reliably.

I bought a Gig of RAM and had problems with SWSUSP (kernel 2.4.25), had to patch the kernel to make it all appear in LOWMEM -- see my post to the swsusp mailing list at SourceForge for the details of my solution. This is all sorted with current SWSUSP and the 2.4.26 kernel -- no need to patch.


 

DVD/CD/CDRW


 

Disk Drives


 

Connecting Up

Except for the ethernet, this section is all about connecting up to my TRGpro (essentially a Palm IIIxe with Compact Flash).


 

Kernel

Here's my kernel .config file. Of particular note:

You may also want to see my /etc/modules.conf and /etc/modules files (/etc/modules is Debian specific, I understand Gentoo uses /etc/modules.autoload, while Suse/RedHat may use entries in /etc/sysconfig).
 

Linux Installation

The easiest way to get an install started was to download the disk images from the Debian distribution subdirectory dists/woody/main/disks-i386/ into a directory on the Windows XP partition. Then boot from a DOS floppy and use the loadlin program (through install.bat) as found in the Debian tools subdirectory. Drop me a line if you know a tweek for the XP 'command prompt only' boot mode to give it enough memory to run loadlin. Check your local mirror of ftp://ftp.debian.org/debian to find these files. Update: My, how things change. Now I'd say the easiest thing is to boot off a knoppix cd and build your hard drive partition the way you want it for the initial install.

The boot device can be selected at power-on or reboot: be holding down the left or right arrow key when the Toshiba splash screen shows. This will pause the boot procedure until you hit [enter], booting from the selected icon (hdd, cd, fdd, network, PC card ATA device).
 

Windows XP partition

The system comes with two formatted VFAT partitions, with Windows XP Home installed on the first. I suggest that you don't trash the Windows XP partition for the following reasons:


 

Likes

It works as well (almost!) as I had hoped, and lived up to the expectations I'd developed from researching on the net. Certainly all of the "core" Linux functionality is working.


 

Dislikes


 

Still Working On


 

Files
cPad_driver dmesg lspci -vv XF86Config-4-nvidia XF86Config-4-XFree86-4.3 lsusb
lilo.conf X-keyboard script user Xmodmap /etc/asound.state hdparm -i /dev/hda /etc/suspend.conf
/etc/fstab /etc/rc.boot/0hdparm /usr/src/linux/.config /etc/modules.conf /etc/modules /etc/init.d/irda

 

Links
 

Some related Linux on Toshiba laptops pages:

Toshiba-spcific Linux utilities:

Drivers:

Toshiba Support sites:

Mailing lists (see also the Japan site above):

Suggested software:

More info:

links to other pages that might get other parts of the hardware working(haven't tried them yet myself):

And of course:


 

Utilities

ooops, I see my webhost isn't serving up the .pl scripts; great. here is a tar.gz file
 

The almost 1 year review

Yes, I'm still very happy with it and use it as a desktop replacement day-in and day-out. The only problems have been that the display has developed some 'washed out pixels' around the top and right edges, and at some point I seem to have cleaned the screen too vigorously and made a shiny spot near the middle. The washed out pixel problem is very subtle and I can only really detect it when KDE flashes a grey screen before putting up it's normal background -- I tried to find a Windows background that would make it show up when I had it in the shop once (trashed the cPad while experimenting :-), but concluded that the Toshiba techs are trained to be unable to perceive display problems... The shiny spot is only noticeable when it is off and sometimes when I am working at the console; perhaps there is a layer of plastic that I could replace protecting the LCD to fix this, but the only Toshiba repair facility on this continent is in South Africa (I bought my laptop in London, then moved to Nigeria -- so much for that 3 year warranty!).

I don't use it on my lap anymore so the heat isn't a problem, and there are no problems with the case at all.

Wow, one week short of one year since I bought it and I have everything working to my satisfaction! Good thing I Haven't needed to get the winmodem working :-).

Year 2 Update: Still going strong, especially with the new screen... And I do have the winmodem working now, too....

Year 4+ Update: I lost a year of use due to the video card problem and moved completely back to a desktop in that time. The 5100 is still my work laptop though, and holding up very well. I got one of these at Staples and always use it.



February 2007
rob miller -- rob at janerob dot com
This page has been accessed times since Oct 2005 (oopsie, sysadmin reset my counter sometime around then, so lost the count from 27 Oct 2002, plus some other time that the counter's been off)