You are not logged in.
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
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
thanks for your answer, but the problem is, that I do not get any output when I press power button while running xev.
Offline
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
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
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
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
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
what about 4) isn't there an application for that?
Offline
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.
Offline
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
2 is solved. above is the solution
Offline
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
For #3, (un)mute microphone, one user found a solution for Ubuntu. Might work for Arch.
Offline
Another possible solution for #3, (un)mute microphone.
Offline
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
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.
Offline
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
Offline
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
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
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
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
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
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.
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
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