Announcement

Collapse
No announcement yet.

Thinkpad configurations

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Thinkpad configurations

    The Lenovo Thinkpads are some of the best Linux supported laptops around and most works 'Out of the Box'.
    Missing are Hibernation, Hard Disk shock protection and the Hot Keys for screen brightness.

    These are my experiences with a W520, no guarantees for other models.

    To get the hot keys for screen brightness working (Fn+Home or End) you need an /etc/X11/xorg.conf file.
    Either make it or edit the existing one (this does require root privileges)

    Add this to the file:
    Code:
    Section "Device"
        Identifier    "Default Device"
        Option "RegistryDwords" "EnableBrightnessControl=1"
        Option    "NoLogo"    "True"
    EndSection
    After a new log-in your keys should work, this includes the brightness function present in the Battery Monitor plasmoid.

    For hard disk shock protection you need to install two packages, tp-smapi-dkms and hdapsd.

    On 13.10 I am successful with the regular packages but on older distributions you might have to get patched versions:
    http://wiki.ubuntuusers.de/TP-SMAPI (A German site but you'll recognise the download buttons

    Now you'll have check the /etc/default/hdapsd file and if missing add (as root) the following:
    Code:
    # hdapsd default file
    
    # start hdapsd at boottime?
    START="yes"
    
    # the name of the disk device that hdapsd should monitor.
    #
    # usually this is 'hda' for the primary IDE master or 'sda'
    # for the primary S-ATA drive
    DISK="sda"
    
    # sensitivity
    SENSITIVITY=15
    
    # other options to pass to hdapsd.
    # the -d $DISK, -s $SENSITIVITY, -b and -p $PIDFILE options are always passed.
    OPTIONS=""
    
    # The new interface in kernels >=2.6.28 sometimes wrongly detects HDAPS-capable
    # drives as not supported. Set this to "yes" to force-enable the feature.
    # Please be carefull with this setting!
    FORCEENABLE="no"
    The value 15 in SENSITIVITY can be edited, a higher value is LESS sensitive.

    You can also add the flag -a to automatically lower the sensitivity when the keyboard is being used.
    For HD's that don't recognise HDAPSD you can change FORCEENABLE from no to yes

    Once done with the configuration you should restart the daemon:
    Code:
    sudo /etc/init.d/hdapsd restart
    To test you need to stop the daemon:
    Code:
    sudo /etc/init.d/hdapsd stop
    And restart it with output to your Konsole:
    Code:
    sudo hdapsd -d sda -s 15
    Gently shaking the laptop should result in similar:
    Code:
    Sun Oct 25 22:17:34 2009: Starting hdapsd
    Sun Oct 25 22:17:34 2009: WARNING: You did not supply any devices to protect, trying autodetection.
    Sun Oct 25 22:17:34 2009: Adding autodetected device: sda
    Sun Oct 25 22:17:34 2009: Selected interface: HDAPS
    Sun Oct 25 22:17:35 2009: Selected HDAPS input device: /dev/input/event21
    Sun Oct 25 22:17:36 2009: parking
    Sun Oct 25 22:17:37 2009: un-parking
    Sun Oct 25 22:17:40 2009: parking
    Sun Oct 25 22:17:41 2009: un-parking
    Once happy you can stop the daemon with Ctrl+C and restart the regular operation with:
    Code:
    sudo /etc/init.d/hdapsd start
    Would you end up with errors like "Error! Not parked etc" the no. 1 reason is likely more than one HD and with different capabilities.

    I suggest to read this (German) site;
    http://wiki.ubuntuusers.de/Festplattenschutz

    Hibernation is not enabled OOTB but can easily be added to the shut down options.

    You need to make or edit (as root) the file /etc/polkit-1/localauthority/50-local-d/com.ubuntu.enable-hibernate.pkla

    And add the text:
    Code:
    [Re-enable hibernate by default]
    Identity=unix-user:*
    Action=org.freedesktop.upower.hibernate
    ResultActive=yes
    Rebooting will bring hibernation to the menu.
    The original page:
    http://askubuntu.com/questions/94754...le-hibernation

    Update 2014/03/02
    Things have changed around 13.10, I ran into it after installing 14.04 (Trusty) and the following gave me back Hibernation:
    http://askubuntu.com/questions/36173.../362499#362499

    Citation from Jeffery To's post on Launchpad Bug Report #1232814:
    For Saucy, indicator-session was updated to use logind (org.freedesktop.login1) instead of upower.
    If you check /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla, you'll see that hibernate is disabled by default in both upower and logind.
    So the first step to re-enable the Hibernate option is to edit (as root) /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla to something like:

    Code:
    [Re-enable hibernate by default in upower]
    Identity=unix-user:*
    Action=org.freedesktop.upower.hibernate
    ResultActive=yes
    
    [Re-enable hibernate by default in logind]
    Identity=unix-user:*
    Action=org.freedesktop.login1.hibernate
    ResultActive=yes
    After rebooting, the login screen session menu should have a Hibernate option.
    Last edited by Teunis; Mar 02, 2014, 07:57 AM.

    #2
    TLP from www.linrunner.de is the best laptop power saving tool around with its own Ubuntu ppa. It was made for Thinkpad and comes with extra tools but can be used on any laptops.

    Comment


      #3
      Nice post with very useful information!

      I just made a clean new install of 13.10 on a ThinkPad L420 and would like to add:
      - The Fn keys for screen brightness work out of the box
      - The fingerprint reader works fine following the steps here: http://ullrich-online.cc/nview/Appli...ep-manual.html
      NOTE: There is no PPA for Saucy yet, but the packages from the Raring PPA install and work without problems.

      Comment


        #4
        Nice write up Teunis! Very nice.
        Using Kubuntu Linux since March 23, 2007
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Don't forget thinkfan. Very useful at quieting your ThinkPads down.

          Comment

          Working...
          X