Saturday, March 7, 2009

Debian GNU/Linux on a Toshiba Satellite M40X-141

Toshiba Satellite M40X-141I bought this laptop with a 50% discount, and haven’t had the possibility to try running a Linux live-cd to test if everything could run smoothly. Once back home, I immediately installed Debian GNU/Linux on it, without any major problem. I chose to install Debian sid, as for all my desktop machines. So far, everything works as expected, without needing extreme tweaks. However, this how-to is not for beginners, as some steps won’t be detailed. Please note that I can’t answer to all the queries I received, and I will silently ignore questions not directly related to this article. For more general questions, please refer to more general sites!

The Toshiba Satellite comes with the following configuration:

  • Intel Celeron M 370 1.5 Ghz
  • 512 MB RAM
  • 15.4″ screen Wide XGA
  • 40 GB hard drive
  • Video card: Intel Graphic Media Accelerator 900
  • Weight: 3.00 kg
  • Size: 365 x 275 x 29.5

Detailed information are available in French on Toshiba’s website.

Hardware details

Output of lscpci:

0000:00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03)
0000:00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
0000:00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
0000:00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03)
0000:00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03)
0000:00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03)
0000:00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03)
0000:00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03)
0000:00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev d3)
0000:00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03)
0000:00:1e.3 Modem: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller (rev 03)
0000:00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge (rev 03)
0000:00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev 03)
0000:00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 03)
0000:06:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
0000:06:02.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
0000:06:04.0 CardBus bridge: Texas Instruments PCIxx21/x515 Cardbus Controller
0000:06:04.2 FireWire (IEEE 1394): Texas Instruments OHCI Compliant IEEE 1394 Host Controller
0000:06:04.3 Mass storage controller: Texas Instruments PCIxx21 Integrated FlashMedia Controller
0000:06:04.4 0805: Texas Instruments PCI6411, PCI6421, PCI6611, PCI6621, PCI7411, PCI7421, PCI7611, PCI7621 Secure Digital (SD) Controller

Output of lspci -n:

0000:00:00.0 0600: 8086:2590 (rev 03)
0000:00:02.0 0300: 8086:2592 (rev 03)
0000:00:02.1 0380: 8086:2792 (rev 03)
0000:00:1d.0 0c03: 8086:2658 (rev 03)
0000:00:1d.1 0c03: 8086:2659 (rev 03)
0000:00:1d.2 0c03: 8086:265a (rev 03)
0000:00:1d.3 0c03: 8086:265b (rev 03)
0000:00:1d.7 0c03: 8086:265c (rev 03)
0000:00:1e.0 0604: 8086:2448 (rev d3)
0000:00:1e.2 0401: 8086:266e (rev 03)
0000:00:1e.3 0703: 8086:266d (rev 03)
0000:00:1f.0 0601: 8086:2641 (rev 03)
0000:00:1f.2 0101: 8086:2653 (rev 03)
0000:00:1f.3 0c05: 8086:266a (rev 03)
0000:06:01.0 0200: 10ec:8139 (rev 10)
0000:06:02.0 0200: 168c:0013 (rev 01)
0000:06:04.0 0607: 104c:8031
0000:06:04.2 0c00: 104c:8032
0000:06:04.3 0180: 104c:8033
0000:06:04.4 0805: 104c:8034

With this output, you can refer to the Debian GNU/Linux device driver check page for details about the drivers you have to use.

If you choose to install from the CD, be aware that the SATA driver block access to CD drive. This is an known issue, which can be easily fixed as follows:

At the first debconf screen, witch to another console (eg. alt+F2), and load the IDE modules:

modprobe ide-generic ide-cd isofs

Then, switch back to the first console (alt+F1) to go on with the standard installation.

We will see later how this can be fixed after rebooting.


So that Grub uses WXGA resolution, append vga=0x362 to the kopt line in /boot/grub/menu.lst. Run update-grub so that changes are taken into account after the next reboot.


Nothing special is needed in Xorg configuration to enjoy from a 1280×800 resolution.

As for the Synaptics touchpad, you should install the xserver-xorg-input-synaptics package, and make the required changes in your /etc/X11/xorg.cong file. You can take example on my M40X-141 Xorg configuration file.

If you are interested in 3D, simply install libgl1-mesa-dri.


The Atheros wifi chip works very well under Linux thanks to the Madwifi project.

A very good and detailed how-to describing the module installation is available on the project site:

Note that I successfully use the madwifi module with wpasupplicant.

The Atheros chip can now work perfectly with the free ath5k module (introduced in kernel 2.6.25).
See this page for more information on this module.


This Toshiba model is shipped with a Phoenix bios, which mean you cannot use fnfx to make the hotkeys work. The solution is to use the omnibook kernel module, which is a fork of the original unmaintained omnibook module.

The package omnibook-source is available in my repository (and could be one day uploaded into the official archive). I also try and maintain binary omnibook-module packages for current kernel images in unstable.

Using omnibook kernel module gives useful functions available under /proc/omnibook/ (like CPU temperature, battery and AC state, LCD brightness control…).

Thanks to Mathieu Bérard, the M40x-141 is now officially supported by the omnibook module. I usually load the module with userset=1 option to give normal users the right to change parameters such as LCD brigthness under /proc/omnibook/. To be sure this option is given each time the module is loaded, I created a new file in /etc/modprobe.d/ named omnibook-local, which contains: options omnibook userset=1

So that the hotkeys send the right keycodes, I use this init script. Save this file as /etc/init.d/omnibook and run update-rc.d defaults omnibook to install the sysV links.

I have worked on adding support for Toshiba Satellite M40X to the hotkey-setup package. You can use the unofficial hotkey-setup package from my repository until the patch is applied and the bug is closed.


To my own surprise, the modem works without any problem, and is well supported by the package sl-modem-daemon.

It needs a kernel driver to access the hardware. This can be either recent ALSA (shipped with a newer kernel (>=2.6.4) with Alsa support and intel8×0m module) which is sufficient for basic operation and data/Internet connection, or the SmartLink kernel driver which is provided by separate packages which you can build using the source from the sl-modem-source package.

I chose to use the sound module snd-intel8x0m, and haven’t (yet) tried the sl-modem-source package.

Smart card reader

A working driver for the SD Host Controller (function 4) can be found here.

It is now included in the Linux kernel 2.6.17 (since 2.6.17-rc1).

To get your smart cart reader working, you need to load the sdhci and mmc_block modules. Also, I need to disable the SD support in TI’s “FlashMedia” device, which reverts control of the SD socket to the “SD-Host Controller”, for which the above sdhci driver works. This can be done with:

setpci -s 06:04.3 4c=0x22

The smart card reader now works perfectly thanks to the tifm driver.

However, I have found that Memory Stick Duo cards are not automounted in GNOME, which lead me to open this bug.
SD cards work ok.


An improved DSDT was re-compiled by Kevin Kanz and uploaded to the ACPI4Linux website. You can easily include this new DSDT in initrd thanks to an actively maintained patch. You will have to compile your own kernel (do not forget the --initrd option of make-kpkg if using the “Debian way”).

You will have to copy the Toshiba-Satellite_M40X-141.aml file to /etc/initramfs-tools/DSDT.aml before installing your new kernel image or run update-initramfs -u, the DSDT will be automatically appended to the initrd.

I haven’t noticed any change when using this modified DSDT - I thought it could fix some issue with Gnome-power-manager (see below) which sometimes gets messed-up in the remaining battery time.

I wouldn’t recommend using this DSDT, as it is generally considered to be a Linux bug if Windows handles an un-modified DSDT and Linux does not.

Power management

Power management is a big part in the configuration of a laptop. I propose some methods I use successfully with the Satellite M40X, but other methods exist! Please send your feedbacks which can be of great interest.


Although I have been using successfully suspend2 patch and hibernate script for some time the laptop, I noticed it refused to work without I could find any explanation.

I have thus switched to µswsusp which allows easy suspend-to-disk and suspend-to-ram, and has several advantages over suspend2:

  • Does not require patching the kernel (though requires a kernel >= 2.6.17)
  • Suspend and resume processes are far more quick as with hibernate
  • No confguration file has to be edited to find the modules to be unloaded or services stopped before suspending

Just to name a few of them.

Suspend to disk

No particular configuration needs to be done.
Simply running s2disk works like a charm.

Suspend to ram

The Toshiba Satellite is not yet in the s2ram whitelist, you still have to run the following command to be allowed to suspend to ram:

s2ram -f -s -p -v

The TS M40X should be added to the s2ram whitelist in the next release.

Frequency scaling

Installing cpudyn, laptop-mode-tools and loading the modules p4-clockmod, cpufreq-ondemand and cpufreq-userspace is sufficiant to provide frequency scaling functions. I use the ondemand policy, which usually decreases frequency to 562MHz when on battery.

Screen brightness

If you use omnibook kernel module and not gnome-power-manager (see below), you can control the screen brightness via /proc/omnibook/lcd.

You can use fn+F5 or fn+F6 to adjust manually the brightness, which is automatically decreased when on battery.


gpm is a session daemon for the GNOME desktop environment that makes it easy to manage your laptop or desktop system.

gnome-power-manager package is now part of Debian, working out-of-the-box. You just need to add yourself (and/or other users) to the powerdev group, which is created by newer hal.

Thanks to gpm’s main author who wrote a patch allowing lcd control on a Toshiba Satellite M40x - this patch it was accepted by HAL developers, and committed to CVS as of 19/02/2006.


You may want to use pm-utils which was uploaded to unstable on 08/05/2007.

pm-utils also allows to unload modules when suspending/hibernating.

Simply create an executable file /etc/pm/config.d/config with:

S2RAM_OPTS="-f -s -p -v"

I have also noticed that slmodemd should be restarted after resuming (this was reported in #411581). To do this automatically, just add a 15sl-modem-daemon file into /etc/pm/sleep.d/ and make it exectuable:


. /usr/lib/pm-utils/functions

case "$1" in
stopservice sl-modem-daemon
restartservice sl-modem-daemon

exit $?

Fixes and workarounds

In some cases, my USB mouse did not work correctly on some USB ports. To fix this issue, I needed to add irqpoll to my boot options. Add this option at the end of the kopts line in /etc/grub/menu.lst and run update-grub as root. More can be found on

Not working


I found a patch for Toshiba Satellite 5105 which might be a base for further development. However, it seems that the notebook doesn’t have any sensor chip! Instead, you can use all the information provided by the omnibok module.

Not tested

  • PCMCIA slot (EDIT: briefly tested, actually works like a charm)
  • S-Video output (according to some readings, should work with a 1024×768 resolution, provided that the extended ACL are disabled in BIOS configuration menu)

External links and resources

Article listed on

No comments: