Saturday, January 14, 2012

Running Ubuntu on a Toshiba Z830

I bought a Toshiba Z830 recently.  This post is to document how I am running Kubuntu on it.  First, let me show you how fast it boots :)

  1. The machine has only 128GB storage, which cannot be upgraded yet, which means having both Windows and Linux on the machine may not be realistic.  But there’s a way to back up Windows!  Toshiba bundles a program with the computer that creates recovery USB drives for the Z830.  I bought a new 16GB USB drive and made it a recovery drive.  The plan is to use this for restoring Windows when I am giving this laptop away to somebody in future.
  2. I downloaded 64-bit Kubuntu 11.10 installer from kubuntu.org.  Since I have a backup copy of Windows, I removed all NTFS and recovery partitions from the disk and created new partitions for installing Kubuntu.
  3. After the installation, almost everything worked out of the box.  I had no issues with the laptop sleeping or waking up; 3D graphics worked fine; audio, bluetooth, webcam... everything worked.  Except the following one issue.
  4. Screen brightness controls sometimes worked, but sometimes they didn’t.  The technique that helped in 2008 helped me this time too, except I needed to make a minor modification to the program: the file that required changing was /sys/class/backlight/intel_backlight/brightness (i.e. intel_backlight instead of acpi_video0).  And the brightness value seem to be in the range of 100 through 4400.
  5. Battery life was bad.  More worrying than battery life was the heat generated by the laptop.  I found some tips to reduce power usage on Putokaz blog, and tried it (thank you, voloder!).  While it did reduce power consumption, it also resulted in some screen update issues.  After some trial and error, I found that frame buffer compression was causing issues, so I left that one out.
    Update: Kubuntu 12.04 provides a very good battery life out of the box.
  6. ZDNet recommends disabling “elevator” I/O scheduler by passing elevator=noop to kernel.  Based on tips from both sources, I have updated my /etc/default/grub to have this line:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=noop"
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=force i915.i915_enable_rc6=1 i915.lvds_downclock=1 elevator=noop"
    (Power management flags may work on other computers with the same Core i5-2467M Sandy Bridge processor as well.)
  7. Based on the same ZDNet story mentioned before, I updated my /etc/fstab as well.  I added noatime flag to my ext4 partitions and mounted /tmp on RAM using tmpfs.  (I didn’t change the caching parameters as that sounds a bit scary.)
    UUID=dbccce1d-8e31-428e-a25a-227afc54651f /      ext4  noatime  0  1
    UUID=720c576c-2c1a-435f-ae90-9151acda2005 /home  ext4  noatime  0  2
    tmpfs /tmp tmpfs nodev,nosuid,noexec,size=1G 0 0
    
Update: Someone was asking about battery life, so here's a screenshot of expected battery life.  With Ubuntu 12.04, you'd get more than 5 hours of battery life on a full charge.

18 comments:

  1. Very interesting, thanks. Did you also find a way to reduce the fan noise?

    Also: when runnng ubuntu, the keyboard lighting is off. Is there a way to restore it?

    ReplyDelete
    Replies
    1. Hi. Enabling these power saving options made the system run cooler than before, and that has resulted in the fan being off (or slow) when the machine is not doing anything graphically intensive (e.g. playing videos).

      Keyboard backlight worked for me out of the box. Check if it's enabled in your BIOS settings. (Mine has been configured to be on with a timeout of 15 seconds.)

      Delete
  2. Hi, what is the average battery life ?

    ReplyDelete
    Replies
    1. I get about 5 hours on a full charge. I think you get similar battery life on Windows too, so it's comparable.

      Delete
  3. Hello:

    I have install with both systems: w7 and ubuntu 11 (64 bits).
    After, I quit Ubuntu and install Linux Mint 12.
    I tried too fedora in a USB.
    I agree with the fan (too noise), but in the BIOS the option is CPU works slowly if CPU is hot.
    I disassemble the Z830 and the fan too. I put a little a plastic pieces with good results. The fan is not noisy, the location design is improvable.
    Regards

    ReplyDelete
  4. can you help with my following questions?

    I want to run win 7 via virtual box over my toshiba z835. I have installed a fresh copy of 12.04 LTS.

    Sequence of events
    1. created a recovery media from toshiba
    2. installed 12.04 as a fresh install
    3. installed virtualbox 4.1 on the machine
    4. now trying to use recovery media 16GB usb flash drive to use as my windows 7 booting however virtual box is not detecting usb it is not giving me option to use usb as a booting device. it just hows floppy/CD/HDD

    Am I missing thing ?


    Any help is appreciated
    Regards,
    idom

    ReplyDelete
    Replies
    1. I have never used VirtualBox or any other virtualisation software. Sorry; I don't know why it isn't working for you.

      Delete
  5. Hi kannan,

    one more question regarding backlit keyboard. and my laptop is working fine and function keys are working fine. however it keyboard backlight is not working. any ideas?

    ReplyDelete
    Replies
    1. it is ubuntu 12.04 LTS and ubuntu.

      Delete
    2. Hi there, keyboard backlight has been working fine for me since day 1. See if it's enabled on your BIOS settings. Turning on/off the backlight with Fn+Z is not working for me, but when I press any key, the keyboard is lit up for the next 15 seconds. This 15 seconds interval is configurable from the BIOS.

      Delete
  6. Hi,

    I have two question , would you like to help
    1\ with your introduction about how to fix brightness after suspend i still failed , would you like to help me that ?

    2\ how is your fn+F9 key , it works ?

    Thanks,

    ReplyDelete
    Replies
    1. 1. Try these steps:
      (i) Download the file brightness from http://goo.gl/MhQqW
      (ii) Move this file to /usr/local/bin directory. (You'll need to use a command like sudo mv ~/Downloads/brightness /usr/local/bin/.)
      (iii) Flip the setuid bit of this file by running the command sudo chmod +s /usr/local/bin/brightness
      (iv) Configure a global shortcut key to increase brightness. (I use Ctrl+Alt+=) This key should run the command /usr/local/bin/brightness $(expr $(/usr/local/bin/brightness) + 200)
      (v) Configure another global shortcut key to decrease brightness. (I use Ctrl+Alt+-) This key should run the command /usr/local/bin/brightness $(expr $(/usr/local/bin/brightness) - 200)
      (Search Google to find out how to create global shortcut keys.)

      2. Fn+F9 never worked for me. Pressing it doesn't do anything.

      Delete
  7. Hi

    Really thanks for your help
    i was during business trip last week , so late :(

    ReplyDelete
  8. Has someone test Linux on the new model z930/935 ?
    Thanks

    ReplyDelete
  9. IMHO - using tmpfs for /tmp is unwise because, all content of the location is being wiped out after every reboot and some aplication may lost their temporary data. There's far more better to have it safe. You can keep some of your /var data in RAM.

    ReplyDelete
    Replies
    1. Yeah, so I don't use tmpfs for anything anymore. I didn't see any noticeable performance improvement so decided to not use the RAM for random things. I left the post as such since some people may want to try that out.

      Thanks for your comment.

      Delete
  10. Hi~ o(* ̄▽ ̄*)ブ
    how can you let the function key work?
    mine is useless

    ReplyDelete