Linux on the Toshiba U505-S2960

Author: Michael Minn (www.michaelminn.com)

23 May 2010

Describes how to set up an Ubuntu 10.4 operating system on a Toshiba Satellite U505-S2960 notebook computer.

1. Introduction

This page describes how to install 32-bit Ubuntu 10.04 LTS (Lucid Lynx) Linux operating system on a Toshiba U505-S2960 notebook computer. Although this is a 64-bit machine, 64-bit Ubuntu is not recommended for general use and you will want to use the 32-bit version of Linux to avoid some hardware issues. Some of these problems (notably with the fan and the wireless card) are detailed below and on my Ubuntu 9.10 installation guide.

The machine that I purchased in December of 2009 features:

  • Intel Core 2 Duo T6600 2.2GHz Processor
  • 2MB L2 Cache, 800MHz FSB
  • 4GB DDR2 800MHz RAM Max: 8GB
  • 320GB (5400 RPM) SATA Hard Drive
  • 13.3" diagonal WXGA (1280 x 800) TruBrite TFT LCD Display
  • Webcam and Microphone
  • Intel Graphics Media Accelerator 4500MHD Video with 128MB-1760MB shared graphics memory
  • Labelflash SuperMulti DVD±R/RW Double Layer Drive
  • Realtek RTL8172 802.11b/g/n Wireless LAN
  • Realtek RTL8101E/8102E 10/100 Ethernet LAN
  • Modem RJ-11
  • ExpressCard 54/34 Slot
  • 85 key US keyboard, Touchpad Enable/Disable button, Media Control Buttons
  • Memory Card Reader: SD, SDHC, MS, MS Pro, MMC, xD
  • Ports: 2 x USB 2.0, eSATA/USB, Headphone/S/PDIF output, Microphone input, VGA, HDMI-CEC, RJ-11 (Modem), RJ-45
  • Approximate Unit Dimensions: 12.5" (W) x 9.08" (D) x 1.16"~1.5" (H)
  • Approximate Unit Weight: 4.74 Pounds
  • Purchased from J & R for $789 + $69.98 NYS tax = $858.98

2. Install From CD

The install from CD is fairly straightforward and painless, except for partitioning. The following are my choices and you may need to choose other options depending on your situation.

This installation assumes that you will be building a system that can dual-boot into either Windoze or Linux. For systems that can run both simultaneously, you will need to explore virtualization software like VMWare.

Defrag: Prior to installing Linux, you should boot into Windoze at least once and defragment the drive. I'm not sure if this is still necessary to maximize available disk space, but it can't hurt.

Download and Burn: the current Ubuntu release CD image ISO from Ubuntu.com and burn it to a CD.

Boot from Install CD: Insert the boot CD into the CD-ROM drive and reboot. When the American Megatreds BIOS splash screen comes up press F-12 and choose CD/DVD P-1MATSHITADVD-RAM UJ862. The machine takes 3-5 minutes to load the OS from the CD-ROM. You can press ESC to view boot messages, although there aren't alot of meaningful ones issued anymore.

Initial Prompt: Choose the language of your choice and select "Install" NOT "Try".

Welcome: choose language and click forward.

Where are you?: select time zone.

Keyboard layout: Default is USA.

Prepare disk space: This step defines how you will partition your hard disk. The easiest choice is, "Install them side-by-side, choosing between them each startup." However, if you know what you're doing, choosing "Specify partitions manually," will allow you to set up separate root and home partitions, making future OS upgrades a bit easier. My steps:

  • Change /dev/sda2 to 100GB, type NTFS, mount point /windows. This will handle the resizing of the NTFS partition and will take a few minutes.
  • Add /dev/sdb5 1024MB, type ext2, mount point /boot
  • Add /dev/sdb6 4096MB, type swap
  • Add /dev/sda7 30000MB, type ext4, mount point /
  • Add /dev/sda8 171909MB, type ext4, mount point /home

This left me with the following partition table, which includes three residual (and mysterious) NTFS partitions.

	/dev/sda1  ntfs             1572MB
	/dev/sda2  ntfs   /windows  100000MB
	/dev/sda5  ext2   /boot     1019MB
	/dev/sda6  swap             4096MB
	/dev/sda7  ext4   /         29997MB
	/dev/sda8  ext4   /home     171908MB
	/dev/sda3  ntfs             11472MB
Format / and /boot, NOT /windows and /home

Who are you?: These steps configure the name, password, and name of computer. Since you don't know how this info will be hacked, tou may not want to use real name. I named my computer localhost and require password for login.

Migrate documents and settings: Why?

Install: Kick it off and it takes around 25 minutes.

At the conclusion of the install, the installer will eject the CD and crash with the following message. It is simply the installer trying to access the disk it already ejected, and can be ignored.

	I/O error, dev sr0, section 507360

Reboot: Restart Ubuntu and you should be able to boot from the hard drive.

Update Your Package Repository: Once you get the machine on the internet, you should update your application package repository with a list of the latest security patches and repository updates. This may take a few minutes. You can get a command-line terminal from Applications->accessories -> terminal to execute the following command:

	sudo apt-get update

This particular combination of hardware and software release is a bit touchy, and some fairly important tweaks follow.


3. Fan Issues

The first thing you may notice about the machine is that the wrist rest gets really hot and the fan doesn't seem to be running. Apparently, there are issues with this particular BIOS and version of ACPI, which doesn't turn the fan on. There supposedly is a thermocouple that will force the fan on at a critical temperature, but you will not want to test that feature very often.

None of the fixes given in various forum threads ( 1, 2, 3, 4, 5, 6) seemed to work for me and it looks like this is something that will just have to wait for another release. The sensors-detect program finds the "EDID EEPROM" with a Intel Core family thermal sensor, but installing the suggested coretemp driver didn't do anything for me.

The nasty workaround is to simply suspend and reawaken the machine once it starts getting warm:

	sudo pm-suspend

The BIOS apparently feels the heat on reawakening and turns the fan on. It stays on, but that allows you to continue to stay cool. You can check the temperature with the "sensors" command, with the -f option giving readouts in Farenheit for Americans who haven't caught up with the rest of the planet.

	sensors -f

	acpitz-virtual-0
	Adapter: Virtual device
	temp1:      +109.4°F  (crit = +226.4°F)                  

	coretemp-isa-0000
	Adapter: ISA adapter
	Core 0:      +84.2°F  (high = +185.0°F, crit = +185.0°F)  

	coretemp-isa-0001
	Adapter: ISA adapter
	Core 1:      +84.2°F  (high = +185.0°F, crit = +185.0°F)  

4. Wireless

Although this version of Ubuntu comes with a driver for the internal The 10.4 distribution of Ubuntu comes with a driver for the internal Realtek RTL8172 802.11b/g/n Wireless chip, it does not seem to work out of the box. The interface is brought up at boot time, but performing an "iwlist wlan0 scan" gives no results:

	$ iwlist wlan0 scan

	wlan0     No scan results

I'm not sure what the issue is, but the Linux (not Windoze) driver I downloaded from the Realtek website (rtl8192se_linux_2.6.0017.0507.2010.tar.gz) seemed to work fine. The source is available in the download section of their website. (Communications Network ICs -> Wireless LAN ICs -> IEEE 802.11 b/g/n Single Chip -> Software).

Even though this chip is the RTL 8172, the driver for the RTL 8192se is the one to download.

Unzip and compile the driver, but DO NOT do a make install, or you will get the following vexing message:

	make[3]: *** No rule to make target `kernel/bounds.c', needed by `kernel/bounds.s'.  Stop.

Instead, compile and install the kernel module and firmware manually:

	tar -zxvf rtl9182*
	cd rtl*2010
	make 
	sudo mv /lib/modules/2.6.32-21-generic/kernel/ubuntu/rtl8192se/r8192se_pci.ko ~/r8192se_pci.ko.hold
	sudo cp HAL/rtl8192/r8192se_pci.ko  /lib/modules/2.6.32-21-generic/kernel/ubuntu/rtl8192se/
	sudo cp -r firmware/RTL8192SE /lib/firmware
	sudo depmod
	sudo rmmod r8192se_pci
	sudo modprobe r8192se_pci

If you have turned the on wireless switch on the front of the machine, you should have get working interface and visible access points. The Fn-F8 key seems to be a Windoze feature and has no effect in Linux:

	$ ifconfig wlan0 up

	$ ifconfig wlan0

	wlan0     Link encap:Ethernet  HWaddr 00:26:b6:74:6a:d1  
        	  UP BROADCAST MULTICAST  MTU:1500  Metric:1
	          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
        	  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
	          collisions:0 txqueuelen:1000 
        	  RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
	          Interrupt:17 Memory:f8320000-f8320100 

	$ iwlist wlan0 scan

	wlan0     Scan completed :
	          Cell 01 - Address: 00:01:36:37:F5:18
	                    ESSID:"4668"
	                    Protocol:IEEE802.11bg
	                    Mode:Master
	                    Channel:1
	                    Encryption key:on
	                    Bit Rates:54 Mb/s
	                    Extra: Rates (Mb/s): 1 2 5.5 6 9 11 12 18 24 36 48 54 
	                    Quality=47/100  Signal level=-70 dBm  Noise level=-93 dBm
	                    Extra: Last beacon: 1024ms ago
	          Cell 02 - Address: 00:22:2D:94:10:DA
	                    ESSID:"10D8"
	                    Protocol:IEEE802.11bg
	                    Mode:Master
	                    Channel:1
	                    Encryption key:on
	                    Bit Rates:54 Mb/s
	                    Extra: Rates (Mb/s): 1 2 5.5 6 9 11 12 18 22 24 36 48 54 
	                    Quality=47/100  Signal level=-70 dBm  Noise level=-93 dBm
	                    Extra: Last beacon: 1027ms ago
	          Cell 03 - Address: 00:13:F7:B6:6A:0C
	                    ESSID:"6A0A"
	                    Protocol:IEEE802.11bg
	                    Mode:Master
	                    Channel:1
	                    Encryption key:on
	                    Bit Rates:54 Mb/s
	                    Extra: Rates (Mb/s): 1 2 5.5 6 9 11 12 18 22 24 36 48 54 
	                    Quality=47/100  Signal level=-71 dBm  Noise level=-93 dBm
	                    Extra: Last beacon: 1016ms ago

	et cetera...

If the wireless switch is off when you boot, you may need to bring the interface down and back up after turning it on to get access points.

	$ sudo ifdown wlan0
	$ sudo ifup wlan0

Although some other users have seemed to be able to get ndiswrapper working with this distribution and chip, my attempts to install the Windoze XP driver resulted in the following unresolved symbol messages in dmesg. Since the manufacturer's Linux driver

	[139998.621727] ndiswrapper version 1.55 loaded (smp=yes, preempt=no)
	[139998.632841] ndiswrapper (import:242): unknown symbol: ntoskrnl.exe:'IoWMIQueryAllData'
	[139998.632849] ndiswrapper (import:242): unknown symbol: ntoskrnl.exe:'IoWMIOpenBlock'
	[139998.633035] ndiswrapper (load_sys_files:206): couldn't prepare driver 'net8192se'
	[139998.633482] ndiswrapper (load_wrap_driver:108): couldn't load driver net8192se; 
			check system log for messages from 'loadndisdriver'
	[139998.633556] usbcore: registered new interface driver ndiswrapper

The lspci listing for this chip is:

	lspci -vv

03:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device 8172 (rev 10)
        Subsystem: Realtek Semiconductor Co., Ltd. Device 8152
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- 
		<MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 17
        Region 0: I/O ports at c800 [size=256]
        Region 1: Memory at fdffc000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
                Address: 0000000000000000  Data: 0000
        Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 
			<512ns, L1 <64us ClockPM+ Suprise- LLActRep- BwNot-
                LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        Capabilities: [100] Advanced Error Reporting <?>
        Capabilities: [140] Virtual Channel <?>
        Capabilities: [160] Device Serial Number 00-e0-4c-ff-fe-22-55-88
        Kernel driver in use: rtl819xSE
        Kernel modules: r8192se_pci

5. Screen Brightness

Out of the box the screen brightness can be a bit overwhelming, especially in contrast to older, dimmer LCD displays. The backlight intensity can be changed with with xrandr and the contrast (gamma) adjustment can be tweaked with xgamma. I put the following in my .xinitrc file in my home directory to set the values when X starts.

	xgamma -gamma .7

You can use xrandr --verbose to view other configurable display options and the range of available values. Unfortunately, the BACKLIGHT parameter no longer seems to work, so gamma is all you have if you have issues.


6. Removing the Splash Screen

I prefer to see what's going on with my machine rather than have the boot messages hidden behind the splash bitmap just in case there's a boot problem (which used to happen alot). Unlike RedHat, which provides a runlevel 3 text login, Debian distribution runlevels always start the GUI. So the process is a bit more complicated than changing /etc/inittab (which doesn't exist in Debian).

Ubuntu used GRUB 2. The old /boot/grub/menu.lst is replaced by a generated file with options specified in /etc/default/grub configuration file. The splash screen can be removed and text mode (non-graphical) booting can be enabled by editing that file and changing these lines:

	GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
	GRUB_HIDDEN_TIMEOUT=true

To...

	GRUB_CMDLINE_LINUX_DEFAULT="text acpi=noirq"
	GRUB_HIDDEN_TIMEOUT=0

Then run:

	sudo update-grub

After these changes, on boot you will see the system startup messages and then be greeted with a console login prompt. After logging in, you can use the startx command to start the graphical desktop.

	startx

7. Removing the Desktop

If you're hard core command line and don't want the clutter and delay of the Ubuntu desktop, you might consider getting rid of the desktop altogether and just using a window manager to manage xterms and X applications started from the xterms. This will speed your boot time a bit and get rid of some annoying background daemons.

Although I used the venerable Motif Window Manager (MWM) for a number of years (from the motif-clients package), this version of mwm locks up when X is started. So I switched to the ICE Window Manager, which has a few more features (like a task bar with graphical system monitoring) but is still fast and lightweight:

	sudo apt-get install motif-clients

.xinitrc is a file that is executed when X is started. Create a .xinitrc in your home directory (/home/<username>) and type the following lines. This creates a couple single terminal window, sets the "desktop" color to pleasant shade of greenish grey blue and starts the window manager. When you type "startx", from the text login, it will start an xterm, in which you can type commands to start other programs. You can create additional terminal windows from a popup menu when you right-click on the desktop.

The xgamma command changes screen contrast and is optional.

	xgamma -gamma .7
	xsetroot -solid "dark slate gray"
	xterm -geometry 128x24+10+10&
	xterm -geometry 128x24+10+375&
	exec icewm

8. TrueType Fonts

The X window server supports TrueType (tm) fonts, although installing them via the command line is a bit more cumbersome than with an installer program or package. If you've got some on a Windoze box, TrueType fonts tend to look quite a bit better than the fonts that come with the distributions. And if you're doing any web development, you need them to have at least a guess as to what your pages look like on a Windoze box.

Unfortunately, the FontPath configuration that specifies the directories where fonts are located is compiled into the X binary and is not configurable. While "xset +fp" can add a directory to the font path, that setting is not permanent and is lost when you reboot. xset cannot be added to a local configuration file like .xinitrc. This is not a problem for newer applications that use fontconfig, but this may represent an issue for older applications that only use the X font paths. The kludge is to copy the fonts you want to add into one of the configured truetype font directories.

Copy the fonts into a shared font directory: You can do an "xset -q" to find the configured Font Paths for your X configuration:

	xset -q

Chose one of the directories listed in "Font Path" and copy your .ttf font files into that directory. In my case, I chose to use /usr/share/fonts/X11/misc. While you could create a new directory under /usr/share/fonts, fonts installed there would not be visible to xlsfonts or older X applications.

	sudo cp your-fonts/*.ttf /usr/share/fonts/X11/misc

Then run mkfontscale to create the fonts.scale file and mkfontdir to create the fonts.dir files used by the X server. You should also change the owner of all the files to root to avoid permission problems. The mkfontscale and mkfontdir steps are critical if you want to be able to list your fonts with xlsfonts or other legacy X applications.

	cd /usr/share/fonts/X11/misc
	sudo mkfontscale
	sudo mkfontdir
	sudo chown root:root *

You can check to verify the fonts are loading by starting an X application (like gimp). The xlsfonts command lists fonts available directly from X and the fc-list command lists fonts available through fontconfig.

	xlsfonts | less
	fc-list | less

The listing will likely be long, but if the fonts are loading correctly, you will see X font names like these (for Arial and Garamond, respectively):

	-monotype-arial-medium-i-normal--0-0-0-0-p-0-iso8859-1
	-monotype-arial-medium-i-normal--0-0-0-0-p-0-iso8859-10
	-monotype-arial-medium-i-normal--0-0-0-0-p-0-iso8859-15
	-monotype-arial-medium-i-normal--0-0-0-0-p-0-iso8859-2

	-monotype-garamond-medium-i-normal--0-0-0-0-p-0-iso8859-1
	-monotype-garamond-medium-i-normal--0-0-0-0-p-0-iso8859-10
	-monotype-garamond-medium-i-normal--0-0-0-0-p-0-iso8859-15
	-monotype-garamond-medium-i-normal--0-0-0-0-p-0-iso8859-2
I am 216.14.220.197
You are 38.107.191.115

When you go back to the home of your youth, you find it's not the home you miss, it's your youth.

All content on this site (c) 2000-2010 by Michael Minn or the respective copyright owners.