You are not logged in.

#26 2012-02-28 10:20:25

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

Re: Lenovo X220 Problems

eduedix, do you have the i915 boot options enabled?

https://help.ubuntu.com/community/AsusZenbook#PowerOpts

Offline

#27 2012-03-01 17:08:05

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

Re: Lenovo X220 Problems

yes i have them enabled JamieKitson.
btw David Butson, can you poweroff your X220 when you have your Runtime PM for devices enabled( as seen in powertop2 ), because i guess there is a bug somewhere. When i run 'poweroff' it turns off fine, but 1 sec later it turns on again. I disabled runtime pm and it poweroffs fine now.

Offline

#28 2012-03-01 18:38:25

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

Re: Lenovo X220 Problems

I just updated the kernel again yesterday.  Now when I run powertop2 I have a number of bad tunables, notably Runtime PM tunables.  I also get this error message when I close powertop2: "Cannot load from file /var/cache/powertop/saved_parameters.powertop".  After rebooting, none of the tunables seem to have stuck to what I set them to previously.

I notice that powering off my laptop works fine when plugged in, but does resume automatically as you describe when on battery.

Offline

#29 2012-03-02 01:37:27

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: Lenovo X220 Problems

It is similar, I think, to the problem associated with laptop-mode tools which enables PM runtime. With PM runtime enabled, my laptop (and others') reboots if shutdown on battery power.

It is extremely annoying  because it means I can't really use PM runtime and so am shortening battery life...


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#30 2012-03-05 01:14:09

ggs
Member
Registered: 2011-06-19
Posts: 3

Re: Lenovo X220 Problems

I added a bunch (all?) of the fn+key combinations to my /etc/acpi/handler.sh (on my thinkpad x220t.) I pasted that file here for reference, in case it helps somebody else:

#!/bin/sh
# Default acpi script that takes an entry for all actions

minspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`
maxspeed=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`
setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"

set $*

case "$1" in
    button/power)
        #echo "PowerButton pressed!">/dev/tty5
        case "$2" in
            #PBTN|PWRF)  logger "PowerButton pressed: $2" ;;
            PBTN)  /sbin/poweroff ;; #logger "PowerButton pressed: $2" ;; #works on x220t, evdev: XF86PowerOff
            *)          logger "ACPI action undefined: $2" ;;
        esac
        ;;
    button/sleep)
        case "$2" in
            #SLPB)   echo -n mem >/sys/power/state ;;
            SBTN)   echo -n mem >/sys/power/state ;; #Fn+F4 on x220t, evdev: XF86Sleep
            *)      logger "ACPI action undefined: $2" ;;
        esac
        ;;
    ac_adapter)
        case "$2" in
            #AC|ACAD|ADP0)
            #    case "$4" in
            #        00000000)
            #            echo -n $minspeed >$setspeed
            #            #/etc/laptop-mode/laptop-mode start
            #        ;;
            #        00000001)
            #            echo -n $maxspeed >$setspeed
            #            #/etc/laptop-mode/laptop-mode stop
            #        ;;
            #    esac
            #    ;;

    #x220t gives the following on unplug/plug:
    #ac_adapter ACPI0003:00 00000080 00000000
    #ibm/hotkey LEN0068:00 00000080 00006040
    #ibm/hotkey LEN0068:00 00000080 00006030
    #thermal_zone LNXTHERM:00 00000081 00000000
    #battery PNP0C0A:00 00000080 00000001
    #ac_adapter ACPI0003:00 00000080 00000001
    #ibm/hotkey LEN0068:00 00000080 00006040
    #ibm/hotkey LEN0068:00 00000080 00006030
    #thermal_zone LNXTHERM:00 00000081 00000000
    #battery PNP0C0A:00 00000080 00000001

            *)  logger "ACPI action undefined: $2" ;;
        esac
        ;;
    battery)
        case "$2" in
        #x220t, haven't worked this one out yet.
            BAT0)
                case "$4" in
                    00000000)   #echo "offline" >/dev/tty5
                    ;;
                    00000001)   #echo "online"  >/dev/tty5
                    ;;
                esac
                ;;
            CPU0)	
                ;;

            *)  logger "ACPI action undefined: $2" ;;
        esac
        ;;
    button/lid)
    case "$2" in
        LID)
        case "$3" in
            close)
            #echo "LID closed!">/dev/tty5
            ;;
            open)
            #echo "LID opened!">/dev/tty5
            ;;
                *)  logger "ACPI action undefined: $*" ;;
        esac
            ;;
        *)  logger "ACPI action undefined: $*" ;;
    esac
    ;;

    #The following buttons are caught by ACPI on the Thinkpad X220 tablet:
    #where it isn't obvious, I'll put the key combo that generates it.
    #Also, I'll put some of the keycodes caught by evdev in X (you might find some additional info starting from /usr/share/X11/xkb/symbols/inet.)
    button/volumeup) # + Volume, XF86AudioRaiseVolume
        case "$2" in
            VOLUP) volchange +2 ;;
            *) logger "ACPI action undefined: $2" ;;
        esac
    ;;
    button/volumedown) # - Volume, XF86AudioLowerVolume
        case "$2" in
            VOLDN) volchange -2 ;;
            *) logger "ACPI action undefined: $2" ;;
        esac
    ;;
    button/mute) #Mute, XF86AudioMute
        case "$2" in
            MUTE) amixer set Master toggle ;;
            *) logger "ACPI action undefined: $2" ;;
        esac
    ;;
    #note: the mic mute button doesn't register (kernel/showkey register it as keycode 248)
    button/prog1) #ThinkVantage, XF86Launch1
        case "$2" in
            PROG1) #logger "ThinkVantage button pressed."
                #Openbox config handles this one.
                ;;
            *) logger "ACPI action undefined: $2" ;;
        esac
        ;;
    #Fn+key combinations on the x220t:
    button/fnf1) #Fn+F1, not registered by evdev
        case "$2" in
            FNF1) #logger "fnf1 button pressed."
                chvt 1 #get unstuck from X in a pinch. Doesn't rely on X, unlike ctrl-alt-backspace!
                ;;
            *) logger "ACPI action undefined: $2" ;;
        esac
        ;;
    button/screenlock) #Fn+F2, XF86ScreenSaver
        case "$2" in
            SCRNLCK) logger "screenlock button pressed.";;
            *) logger "ACPI action undefined: $2" ;;
        esac
        ;;
    button/battery) #Fn+F3, XF86Battery, note: laptop-mode catches this too.
        case "$2" in
            BAT) logger "battery button pressed.";;
            *) logger "ACPI action undefined: $2" ;;
        esac
        ;;
    #Fn+F4 taken care of above (button/sleep SBTN)
    button/wlan) #Fn+F5, XF86WLAN, note: toggles the wireless w/o using this script
        case "$2" in
            WLAN) logger "wlan button pressed.";;
            *) logger "ACPI action undefined: $2" ;;
        esac
        ;;
    #Fn+F6 not caught by ACPI. evdev: XF86WebCam
    video/switchmode) #Fn+F7, XF86Display
        case "$2" in
            VMOD) logger "switchmode button pressed.";; 
            *) logger "ACPI action undefined: $2" ;;
        esac
        ;;
    #Fn+F8 not caught by ACPI. XF86TouchpadToggle
    button/f24) #Fn+F9, keycode 202 (NoSymbol)
        case "$2" in
            F24) logger "f24 button pressed.";;
            *) logger "ACPI action undefined: $2" ;;
        esac
        ;;
    #Fn+F10 is not caught by ACPI or evdev/X.
    button/fnf11) #Fn+F11, not caught by evdev
        case "$2" in
            FF11) logger "fnf11 button pressed.";;
            *) logger "ACPI action undefined: $2" ;;
        esac
        ;;
    button/suspend) #Fn+F12, XF86Suspend
        case "$2" in
            SUSP) logger "suspend button pressed.";;
            *) logger "ACPI action undefined: $2" ;;
        esac
        ;;
    #And a few more:
    video/brightnessup) #Fn+Home, XF86MonBrightnessUp, works w/o script here
    #note: this registers twice:
    #video/brightnessup BRTUP 00000086 00000000 K
    #video/brightnessup BRTUP 00000086 00000000
        case "$2" in
            BRTUP) #logger "brightness up button pressed."
        ;;
            *) logger "ACPI action undefined: $2" ;;
        esac
        ;;
    video/brightnessdown) #Fn+End, XF86MonBrightnessUp, works w/o script here
    #note: this registers twice:
    #video/brightnessdown BRTDN 00000087 00000000 K
    #video/brightnessdown BRTDN 00000087 00000000
        case "$2" in
            BRTDN) #logger "brightness down button pressed."
        ;;
            *) logger "ACPI action undefined: $2" ;;
        esac
        ;;
    #note: Fn+PgUp doesn't seem to be caught by ACPI or the kernel. (Keyboard light?)
    button/zoom) #Fn+Space, not caught by evdev
        case "$2" in
            ZOOM) logger "zoom button pressed.";; #pass it on to X?
            *) logger "ACPI action undefined: $2" ;;
        esac
        ;;
    cd/stop) #Fn+Up, XF86AudioStop
        case "$2" in
            CDSTOP) mpc stop;; #logger "Audio Stop button pressed.";;
            *) logger "ACPI action undefined: $2" ;;
        esac
        ;;
    cd/play) #Fn+Down, XF86AudioPlay
        case "$2" in
            CDPLAY) mpc toggle;; #logger "Audio Play button pressed.";;
            *) logger "ACPI action undefined: $2" ;;
        esac
        ;;
    cd/next) #Fn+Right, XF86AudioNext
        case "$2" in
            CDNEXT) mpc next;; #logger "Audio Next button pressed.";;
            *) logger "ACPI action undefined: $2" ;;
        esac
        ;;
    cd/prev) #Fn+Left, XF86AudioPrev
        case "$2" in
            CDPREV) mpc prev;; #logger "Audio Stop button pressed.";;
            *) logger "ACPI action undefined: $2" ;;
        esac
        ;;
    *)
        logger "ACPI group/action undefined: $1 / $2"
        ;;
esac

other notes:
evdev catches the Fn button as XF86WakeUp, and the back/forward keys as XF86Back/XF86Forward.
Fn+1 or Fn+2 register as keycode 240 with the kernel
The bezel buttons are not caught by the kernel, so I added these lines to my /etc/rc.local:

setkeycodes 0x67 171 & #set "circle arrow" bezel button keycode, so evdev reads it as XF86Tools (X220 tablet)
setkeycodes 0x6c 154 & #set "orientation button" bezel button keycode, so evdev reads it as XF86RotateWindows (X220 tablet)

Offline

#31 2012-04-03 21:00:26

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

Re: Lenovo X220 Problems

Can you try running any kind of application with webcam?

when i run skype or googletalk and start video-chatting, after a few minutes the whole laptop locks up, i dont get any response/reaction from any key and key combination(including caps lock).

do you know how to solve this issue? i didnt have this issue earlier, i think this is due to some updates lately. so please try it after updating.

Offline

Board footer

Powered by FluxBB