You are not logged in.

#1 2012-01-16 08:33:00

eduedix
Member
Registered: 2011-02-08
Posts: 35

Lenovo X220 Problems

Hi there,

Just bought a X220 and installed archlinux on it. Though I have some problems that i could not figure out.

1- My power button does not seem to react at all even though i ran acpid. I want to be able to poweroff using my power button.
##update: resolved issue. check comment #5

2- When i try to run Sketchup8 via wine, it crashes with the error : fixme:wgl:X11DRV_wglChoosePixelFormatARB unused pfAttribFList
##update: resolved this issue by installing lib32-intel-dri

3- My (un)mute microphone button also does not work.
4- Is there any application that can automate enabling/disabling devices such as bluetooth, card reader, camera etc.
5- Fn+F5 seems to toggle Wireless, but since i already have a hard-switch for that, is it possible to change it to toggle bluetooth?
6- Please let me know if you are X220 owner, I think we can help each other resolve the problems.

Thanks in advance.

Last edited by eduedix (2012-01-16 15:58:48)

Offline

#2 2012-01-16 13:21:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,441
Website

Re: Lenovo X220 Problems

Many of these should probably be separate threads with better titles.  I doubt many - if any - of these are X220 specific questions.

For questions 1. 3, & 5 you should use something like xev to get the key codes of the buttons you are interested in changing, xmodmap if you want to change the keycode they generate, and xbindkeys to get them to do what you want.  Here is a good overview.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2012-01-16 15:02:46

eduedix
Member
Registered: 2011-02-08
Posts: 35

Re: Lenovo X220 Problems

thanks for your answer, but the problem is, that I do not get any output when I press power button while running xev.

Offline

#4 2012-01-16 15:41:31

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Lenovo X220 Problems

I have an X220, but not all your issues have been my issues.

1)  Not in Arch atm, but see if acpi_listen (part of acpitool I believe) shows any output when pressing the power button.  The traditional thinkpad hotkey responses have changed with the newer kernels.  You should be able to edit /etc/acpi/handler.sh to get the power button to repond as you like.
https://wiki.archlinux.org/index.php/ACPI_hotkeys
2) Don't know anything about that.
3) Don't use the microphone, so haven't worked on this issue.
4) Much of this depends upon the desktop environment you are using I think; Gnome, KDE, Xfce, etc.  Usually there is an option for creating keyboard shortcuts in Gnome, Xfce, KDE, etc.  If you want a default setting on boot up, Gnome has /etc/gdm/PostLogin/Default for placing a script to run at login.
5) For bluetooth toggle I found a solution for that in Fedora: http://forums.fedoraforum.org/showthread.php?t=273141

I'll boot arch and check a couple of the items above, then report back.

Last edited by David Batson (2012-01-16 15:51:13)

Offline

#5 2012-01-16 15:46:10

eduedix
Member
Registered: 2011-02-08
Posts: 35

Re: Lenovo X220 Problems

1) I do not get any output when I press power button while running acpi_listen
##update: i get output when i hold it down like 1 sec. the output is :
button/power PBTN 00000080 00000000
##update: resolved issue by changing /etc/acpi/handler.sh

case "$1" in
    button/power)
        #echo "PowerButton pressed!">/dev/tty5
        #case "$2" in
        #    PBTN|PWRF)  logger "PowerButton pressed: $2" ;;
        #    *)          logger "ACPI action undefined: $2" ;;
        #               /sbin/poweroff;;
        case "$2" in
           PBTN)   logger "PowerButton pressed: $2"
                    /sbin/poweroff;;
           *)      logger "ACPI action undefined: $2" ;;       
##
        esac
        ;;

Last edited by eduedix (2012-01-16 15:58:09)

Offline

#6 2012-01-16 15:51:31

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Lenovo X220 Problems

1) Looks like no solution for this.  No acpi event and no xev event for the power button that I can see.
5) In arch I put a line in /etc/rc.local to disable bluetooth on boot up.  Haven't tried to toggle it in arch.

echo disable > /proc/acpi/ibm/bluetooth

Offline

#7 2012-01-16 16:05:47

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Lenovo X220 Problems

Looking a little further, thinkwiki.org mentions lsinput.
http://www.thinkwiki.org/wiki/Thinkpad-acpi

I installed that from AUR.
http://aur.archlinux.org/packages.php?ID=52213

Running lsinput as root shows the following output (clipped).

/dev/input/event3
   bustype : BUS_HOST
   vendor  : 0x0
   product : 0x1
   version : 0
   name    : "Power Button"
   phys    : "LNXPWRBN/button/input0"
   bits ev : EV_SYN EV_KEY

From the above, I believe there should be a way to use the power button the way you want.

Offline

#8 2012-01-16 16:10:47

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Lenovo X220 Problems

eduedix wrote:

1) I do not get any output when I press power button while running acpi_listen
##update: i get output when i hold it down like 1 sec. the output is :
button/power PBTN 00000080 00000000

Now I see that as well.  Glad you found a solution there.

Offline

#9 2012-01-17 12:06:25

eduedix
Member
Registered: 2011-02-08
Posts: 35

Re: Lenovo X220 Problems

what about 4) isn't there an application for that?

Offline

#10 2012-01-17 15:55:59

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Lenovo X220 Problems

Archassistant does some of that.  I just installed it to control WLAN as a regular user with netcfg.  If you create keyboard shortcuts from the DM applet for that purpose (or use thinkpad-acpi), that should work.  Note that with Arch you have to intall the applications you wish to use, such as cheese for the webcam.  Many other distros include an array of apps by default.  Arch does not.

http://aur.archlinux.org/packages.php?ID=15655

Offline

#11 2012-01-18 01:08:57

Yurlungur
Member
From: USA
Registered: 2012-01-06
Posts: 116

Re: Lenovo X220 Problems

For (2), there's a wiki.


Lenovo Thinkpad T420; Intel sandy bridge i7 2.7GHz; integrated graphics card; 4GB RAM; wifi; Arch; Xmonad WM

Offline

#12 2012-01-18 16:08:07

eduedix
Member
Registered: 2011-02-08
Posts: 35

Re: Lenovo X220 Problems

2 is solved. above is the solution

Offline

#13 2012-01-18 16:51:14

Yurlungur
Member
From: USA
Registered: 2012-01-06
Posts: 116

Re: Lenovo X220 Problems

Oops. Sorry, didn't see the update there.


Lenovo Thinkpad T420; Intel sandy bridge i7 2.7GHz; integrated graphics card; 4GB RAM; wifi; Arch; Xmonad WM

Offline

#14 2012-01-18 17:50:33

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Lenovo X220 Problems

For #3, (un)mute microphone, one user found a solution for Ubuntu.  Might work for Arch.

http://www.thinkwiki.org/wiki/Installin … ortcomings

Offline

#15 2012-01-23 12:05:01

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Lenovo X220 Problems

Another possible solution for #3, (un)mute microphone.

http://forums.fedoraforum.org/showpost. … ostcount=7

Offline

#16 2012-02-12 14:45:28

eduedix
Member
Registered: 2011-02-08
Posts: 35

Re: Lenovo X220 Problems

can you please report your watt consumption after updating to kernel 3.2.5? I am getting around 14W whilst running X at full brightness.

Offline

#17 2012-02-12 15:45:40

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Lenovo X220 Problems

Try the  i915.i915_enable_rc6=1 kernel parameter.  It helps a lot.  There are other power saving kernel parameters for sandy bridge, but I am not running them.  Sorry that I can't afford to upgrade the kernel just now as I am very close to my 5GB cellular data cap.  Not sure when exactly I'll have access to a land line again.

http://www.phoronix.com/scan.php?page=a … ower&num=1

Offline

#18 2012-02-14 00:43:51

therico
Member
Registered: 2011-12-10
Posts: 4

Re: Lenovo X220 Problems

I am seeing 12W on 3.2.5 with Awesome GNOME and some background apps. gnome-power-manager is estimating a battery life of around 9-10 hours on the 9-cell battery.

My boot parameters are pcie_aspm=force i915.i915_enable_rc6=1 i915.lvds_downclock=1 i915.i915_enable_fbc=1 acpi_backlight=vendor

(the latter disables the auto backlight dim, you may not want that) Some of these may no longer be applicable on 3.2.5.

Another thing is to install powertop2 from AUR, use right arrow to navigate to 'Tunables' and set them all to 'Good', if you haven't already smile

Offline

#19 2012-02-16 01:24:18

eduedix
Member
Registered: 2011-02-08
Posts: 35

Re: Lenovo X220 Problems

thanks for your response.

I do not know how and why, but today my battery lasted about 7 hours ( on 6cell), maybe because of an update. haven't changed anything.

Offline

#20 2012-02-24 01:14:36

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Lenovo X220 Problems

Finally updated my kernel along with many other packages.

# uname -a
Linux myhost 3.2.6-2-ARCH #1 SMP PREEMPT Thu Feb 16 10:10:02 CET 2012 x86_64 Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz GenuineIntel GNU/Linux

I am showing 1 watt power consumption on battery (I believe that is off by a factor of 10).  So 10 watts power consumption at full brightness is what I am getting on my X220 Core i5 2540M / 2.6 GHz.  This is with Powertop.  I had Powertop2 installed from AUR, but the last set of updates broke it.  Uninstalled Powertop2 and replaced with Powertop.

Offline

#21 2012-02-25 23:25:35

JamieKitson
Member
From: UK
Registered: 2010-10-18
Posts: 161
Website

Re: Lenovo X220 Problems

5- Fn+F5 seems to toggle Wireless, but since i already have a hard-switch for that, is it possible to change it to toggle bluetooth?

I think there is a BIOS setting to change what the switch does. You could have the switch apply to BT and the key apply to wireless.

Offline

#22 2012-02-26 01:43:08

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Lenovo X220 Problems

I have bluetooth disabled on bootup in Arch, but in Fedora I use Fn + F9.  See following thread for more info on how I did that in Fedora Gnome.
http://forums.fedoraforum.org/showthread.php?p=1542919

Not sure it's so straightforward in Arch.  In my experience, using the Fn + hotkey combos doesn't work out of the box in Arch.  You have to edit /etc/acpi/handler.sh.  Haven't got around to figuring out exactly how to edit it yet.
https://wiki.archlinux.org/index.php/Acpid

Offline

#23 2012-02-27 21:30:18

eduedix
Member
Registered: 2011-02-08
Posts: 35

Re: Lenovo X220 Problems

David Batson: thanks for your responses, but i am still wondering how your pc runs at 10W with full brightness, it is amazing.
Can you perhaps try installing powertop2 now, because the package is patched, and tell me the fan rpm and lcd power consumption at full brightness values? how many wake ups do you get in general? what are your bad values in tunables of powertop2?

Offline

#24 2012-02-28 04:23:20

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Lenovo X220 Problems

eduedix wrote:

Can you perhaps try installing powertop2 now, because the package is patched...

patching file Makefile
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 38 with fuzz 2.
gcc -o csstoh csstoh.c
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/cc1: error while loading shared libraries: libcloog-isl.so.2: cannot open shared object file: No such file or directory
make: *** [csstoh] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

Not yet ready for primetime. roll

EDIT:  It was I that was not ready for primetime.  Googled the error and found out I did not have multilib enabled in the pacman.conf file (as it was previously) after a recent pacman update.

Last edited by David Batson (2012-02-28 04:46:25)

Offline

#25 2012-02-28 05:00:27

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Lenovo X220 Problems

PowerTOP 1.98     Overview   Idle stats   Frequency stats   Device stats   Tunables                                     

The battery reports a discharge rate of 9.71 W

Summary: 75.7 wakeups/second,  0.0 GPU ops/second and 0.0 VFS ops/sec

                Usage       Events/s    Category       Description
              5.8 pkts/s                Device         Network interface: wlan0 (iwlwifi)
             1963 rpm                   Device         Laptop fan
            539.8 µs/s      25.0        Interrupt      [43] i915
             75.8 µs/s      10.1        kWork          ieee80211_iface_work
              0.8 ms/s       9.8        Interrupt      [6] tasklet(softirq)
            202.4 µs/s       8.8        Timer          tick_sched_timer
              1.8 ms/s       4.9        Process        /usr/bin/tpb -d
            177.0 µs/s       4.3        Timer          hrtimer_wakeup
            163.9 µs/s       2.0        Process        emerald --replace
            279.1 µs/s       1.4        Process        /home/david/.local/lib/opera/opera
            136.5 µs/s       1.1        Process        /usr/bin/X -nolisten tcp vt07 -auth /var/run/slim.auth
             84.2 µs/s       1.0        Process        compiz --replace --sm-disable --ignore-desktop-hints ccp
             33.4 µs/s       0.9        kWork          iwl_bg_run_time_calib_work
             46.5 µs/s       0.8        Process        /usr/lib/upower/upowerd
             19.5 µs/s       0.8        kWork          pci_pme_list_scan
             49.0 µs/s       0.5        Process        Thunar --sm-client-id 22d7155a9-213d-40aa-997a-9832dd5a6056 --daemon
             44.0 µs/s       0.4        Interrupt      [9] acpi
              4.3 µs/s       0.4        kWork          mei_timer
             31.6 µs/s       0.3        Process        gpg-agent --daemon --enable-ssh-support --write-env-file /home/dkb/.cache/gpg-a
              9.0 µs/s      0.30        Process        /usr/lib/rtkit-daemon
             21.5 µs/s      0.25        Process        /usr/bin/Terminal
             16.6 µs/s      0.25        Process        xfdesktop --display :0.0 --sm-client-id 290770c3d-6aa0-45f0-9a13-36d9ed37db70
             12.7 µs/s      0.20        Process        init [5]
              4.9 µs/s      0.20        Process        [flush-8:0]
              3.2 µs/s      0.20        kWork          i915_gem_retire_work_handler
             12.9 µs/s      0.15        Process        /usr/bin/dbus-daemon --system
              1.0 µs/s      0.15        Process        [sync_supers]
PowerTOP 1.98     Overview   Idle stats   Frequency stats   Device stats   Tunables                                     


>> Bad           Enable Audio codec power management                                                                    
   Bad           Power Aware CPU scheduler
   Bad           VM writeback timeout
   Bad           Wake-on-lan status for device eth0
   Good          Wireless Power Saving for interface wlan0
   Good          Enable SATA link power management for /dev/sda
   Good          NMI watchdog should be turned off
   Good          Autosuspend for USB device EHCI Host Controller [usb1]
   Good          Autosuspend for USB device EHCI Host Controller [usb2]
   Good          Autosuspend for unknown USB device 1-1 (8087:0024)
   Good          Autosuspend for unknown USB device 2-1 (8087:0024)
   Good          Autosuspend for USB device Biometric Coprocessor [UPEK]
   Good          Autosuspend for USB device Integrated Camera [Chicony Electronics Co., Ltd.]
   Good          Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2
   Good          Runtime PM for PCI Device Ricoh Co Ltd MMC/SD Host Controller
   Good          Runtime PM for PCI Device Intel Corporation Centrino Advanced-N 6205
   Good          Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller
   Good          Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller
   Good          Runtime PM for PCI Device Intel Corporation 82579LM Gigabit Network Connection
   Good          Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5
   Good          Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller
   Good          Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4
   Good          Runtime PM for PCI Device Intel Corporation 2nd Generation Core Processor Family DRAM Controller
   Good          Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2
   Good          Runtime PM for PCI Device Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller
   Good          Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1
   Good          Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1
   Good          Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1
   Good          Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family KT Controller
   Good          Wake-on-lan status for device wlan0
   Good          Using 'ondemand' cpufreq governor

This is after waiting a minute or two for things to settle down.  This is at full brightness with WiFi on, my browser open, a couple of terminal windows open, and thunar file manager open.  Using XFCE with Compiz.

EDIT:  I toggled the 4 "Bad" tunables above to "Good".  Didn't make any significant differerence.  Maybe a 10th of a point or 2.

Last edited by David Batson (2012-02-28 05:08:15)

Offline

Board footer

Powered by FluxBB