Linux On Laptops

Running Linux on the Toshiba Portege R500

I am currnetly running Ubuntu Hardy and kernel 2.6.24-14-generic

Sound

The sound sort of works out the box but does not detect the hardware properlly so things like when you plug the headphones in the speaker did not mute. Adding the following to '''/etc/modprobe.d/snd_hda_intel helps but it not the correct solution:

options snd_hda_intel model=hippo

As I say I don't think that this is totally correct as I now have independent controls for headphones and speaker and I can easily unmute the speakers without knowing it. Also I have a load of buttons and sliders in the volume control that I am sure are not there in real life. The soundcard is an Intel HDA with the ALC262 codec.

Networking

The wired network card uses the e1000 module and works great. The wireless netowrk card uses the iwl4965 module and so I think you need kernel 2.6.22 or greater.

Touchpad

Adding 'Option "SHMConfig" "on"' to the synaptics touchpad section of Xorg.conf allows you to use something like gsynaptics to run and change your configuration. I also enable syndaemon to turn off the touchpad when I am typing.

Graphics

Using the Intel Card everything works great. All the 3d compiz effects are okay. I don't play any 3D games on it so I can't comment on it's performance but as a desktop it's great.

Setting up dual monitors

You need to replace the "Modes" lines in xorg.conf with a "Virtual 2048 2048" then it can switch between the monitors using xrandr

xrandr --output VGA --above LVDS --auto
xrandr --output VGA --off

You can set the Virtual to be bigger than 2048 but then you don't get 3D support and so you have to use --above with xrandr not --to-left which is a shame.

I am also having problems with the VGA monitor going to sleep now and again. This is now fixed but I do get occasional crashes where everything but the mouse locks up and not even CTRL-ALT-BKSPACE will save me. ( Alt-SysRQ works though )

I have some problems with X resolution going wrong and getting really big fonts in epipany when using Hardy so I have also added "--dpi 96" to the above xrandr commands for now.

Transflective

The screen has a transflective display so that you can turn off the backlight when you are working in bright sunlight this is now supported using toshset 1.73. http://www.schwieters.org/toshset/

# toshset -trmode off

Turns off the backlight and "on" turns it on again. I still don't know how to hook this up to the key press as it currently returns the same as the "i" info key and launches the help browser but there you go. Any ideas please leave here or on the discussion page.

I have the following in /etc/acpi/toshbright.sh and this allows me to change the brightness right down to 0 then the next step it turns off the backlight. ( Note the "-bl on" everwhere as otherwise my whole screen goes blank. Not great but it works)

#!/bin/sh

NOTIFY_USER=$(who |grep "(:0)" |cut -d" " -f1|sort -u |head -1)
NOTIFY="sudo -u ${NOTIFY_USER} gnome-osd-client --dbus "
DISPLAY=:0
XAUTHORITY=/home/${NOTIFY_USER}/.Xauthority



TS=/usr/bin/toshset

get_brightness () {
    BRIGHTNESS=$(( `grep brightness: /proc/acpi/toshiba/lcd | cut -d: -f2` + 0 ))
    MAXBRIGHT=$(( `grep brightness_levels: /proc/acpi/toshiba/lcd | cut -d: -f2` - 1 ))
    if $TS -q |grep -q "transreflective mode: on"; then
        TRANS="on"
    else
        TRANS="off"
    fi
}

notify () {
    get_brightness
    $NOTIFY "Brightness: ${BRIGHTNESS}/${MAXBRIGHT}, Transflective: ${TRANS}"

}

get_brightness

if [ "x$1" = "x" ]; then
   echo $BRIGHTNESS / $MAXBRIGHT
elif [ "x$1" = "xdown" ]; then
   if [ "x$BRIGHTNESS" != "x0" ]; then
      BRIGHTNESS=$(( $BRIGHTNESS - 1 ))
      echo 'brightness : '$BRIGHTNESS > /proc/acpi/toshiba/lcd
      $TS -bl on
   else
       if $TS -q |grep -q "transreflective mode: on" ;then
            $TS -trmode off -bl on
       fi
   fi
   notify
elif [ "x$1" = "xup" ]; then
   if [ "x$BRIGHTNESS" = "x0" ] && $TS -q |grep -q "transreflective mode: off"; then
       $TS -trmode on -bl on
   fi

   if [ "x$BRIGHTNESS" != "x$MAXBRIGHT" ]; then
      BRIGHTNESS=$(( $BRIGHTNESS + 1 ))
      echo 'brightness : '$BRIGHTNESS > /proc/acpi/toshiba/lcd
      $TS -bl on
   fi
   notify
else
   echo >&2 Unknown argument $1
fi

Docking

It works on the slim dock and will detect if it has an external screen on bootup works but I can't get it to notice that it has been plugged into the display.

Power and batteries

The Batteries are lasting over 3hrs at the moment. According to the power history it is only using 13 to 14 watts when running reaching up to about 16 watts when it's busy on the disks at startup.

On a side note if you enable in the BIOS USB power when off then you can use the usb ports for charging your phone or what not even when the laptop is off. Which is nice.

Hibernate

For Gutsy I have some problems with sound not working after hibernate but this is now fixed with Hardy I think. You need to remove the snd_hda_intel module during the hibernate so I added it to the MODULES section of '/etc/default/acpi-support' but it can't do this if the mixer_applet is running so we have to kill this during the shutdown.

Create a file called '/etc/acpi/suspend.d/66-close_mixer.sh' ( note the 66 is any number before it does the remove modules script ) and add the following:

#!/bin/sh pkill mixer_applet2

You will get a "Reload applet" nag each time but that's the only way I can see how unless we can get the mixer applet to let go. Credits for most of this go to this dell linux wiki page: http://linux.dell.com/wiki/index.php/Ubuntu_7.04/Issues/Audio_not_working_properly

Also make sure that the kernel modules kvm and kvm_intel are both removed otherwise the kernel may crash on restart.

I have also had to enable DOUBLE_CONSOLE_SWITCH in /etc/default/acpi-support so that the graphics are not buggered after a reboot.

Suspend to RAM works but the system wakes up again straight after going to sleep so it's not much use!

Note for Ubuntu Hardy (8.04): You will need to make sure that the line below is added to the file /etc/pm/config.d/modules

SUSPEND_MODULES="kvm kvm_intel ehci_hcd"

This is because they have changed to use pm-utils now.

Pci List

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03) 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03) 00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03) 00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02) 00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02) 00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2) 00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02) 00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA AHCI Controller (rev 02) 01:00.0 Ethernet controller: Intel Corporation 82573L Gigabit Ethernet Controller 02:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN Network Connection (rev 61) 03:0b.0 ?CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller 03:0b.1 ?FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller 03:0b.3 Generic system peripheral [0805]: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller

blog comments powered by Disqus