Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: laptop-mode-tools 1.53 can not handle kernel 3.0 rc-x

  1. #1

    Default laptop-mode-tools 1.53 can not handle kernel 3.0 rc-x

    Code:
    laptop-mode: Unhandled kernel version: 3.0
    openSuse 11.4, 3.0.0-rc7-3-desktop

    and thus suspend to disk fails.

    So before putting kernel 3.0 to tumbleweed, a new laptop-mode-tools version will be needed, won't it?

    Same point here: Answer : Bug#632311: laptop-mode-tools: Does not handle kernel version 3.0

    Alexander

  2. #2

    Default Re: laptop-mode-tools 1.53 can not handle kernel 3.0 rc-x

    So it will be buggable in Bugzilla with Tumbleweed for sure as soon as 3.0 kernel released. May be already.
    I think the same problem exists currently in 12.1 M3 / Factory and the possible HAL dependency is likely worth report in Bugzilla on it's own (a similar one I found with the power-management stuff pm-profiler is in).

    For now, I've reported it to email list as a "3.0" version change gotcha, plus inform AJ of another possible HAL dependency - Tumbleweed user reports with Kernel:HEAD 3.0 rc7 "laptop-mode: Unhandled kernel version: 3.0" (possible Factory 12.1 HAL dependency to) [opensuse-factory] Tumbleweed user reports with Kernel:HEAD 3.0 rc7 "lapptop-mode: Unhandled kernel version: 3.0"

    May be there's a simple fix, someone can apply before 3.0 gets pushed into Tumbleweed for all. There's nothing upstream though to port to kernel 3.0 yet, though so it's not as simple as rebuilding with 1.57 as the Debian bug report shows.

  3. #3

    Default Re: laptop-mode-tools 1.53 can not handle kernel 3.0 rc-x

    Can you hack /usr/sbin/laptop_mode for me? Try this patch which simply says 3.0 and up, is an acceptable kernel number, not a real fix for short sighted coding, but might be all you need.
    If it "works", then there's even less worry about "being breakfast", folk like bug reports which have patches in them

    diff -u -r1.1 laptop_mode
    --- laptop_mode 2011/07/20 16:28:47 1.1
    +++ laptop_mode 2011/07/20 16:30:31
    @@ -494,6 +494,7 @@
    case "$KLEVEL" in
    "2.4" ) ;;
    "2.6" ) ;;
    + 3.[0-9]*) ;;
    *)
    log "ERR" "Unhandled kernel version: $KLEVEL ('uname -r' = '$(uname -r)')" >&2
    exit 1

  4. #4

    Default Re: laptop-mode-tools 1.53 can not handle kernel 3.0 rc-x

    If you are not used to diff output that means just to add :

    Code:
    Look for :
           "2.6" ) ;;
    
    And add right after on line following, which ought to allow kernel 3.0, 3.1 .. 3.9 & 3.666 though Linus probably will be fed up of 3.X before then ;)
           3.[0-9]*) ;;

  5. #5

    Default Re: laptop-mode-tools 1.53 can not handle kernel 3.0 rc-x

    Code:
    diff -u -r1.1 laptop_mode
    --- laptop_mode 2011/07/20 16:28:47 1.1
    +++ laptop_mode 2011/07/20 16:30:31
    @@ -494,6 +494,7 @@
    case "$KLEVEL" in
    "2.4" ) ;;
    "2.6" ) ;;
    + 3.[0-9]*) ;;
    *)
    log "ERR" "Unhandled kernel version: $KLEVEL ('uname -r' = '$(uname -r)')" >&2
    exit 1

    Code:
    patching file laptop_mode
    patch: **** malformed patch at line 5: case "$KLEVEL" in
    Öööh, whut?

  6. #6

    Default Re: laptop-mode-tools 1.53 can not handle kernel 3.0 rc-x

    Hand edit it /usr/sbin/laptop_mode, just add a line for "3.0" and see if it works, or even change "2.4" to "3.0"

    I didn't get CODE /CODE around the diff in time, that **** 10 min edit limit bit me, sorry, so all the white space was messed up.

    Code:
    diff -u -r1.1 laptop_mode
    --- laptop_mode 2011/07/20 16:28:47     1.1
    +++ laptop_mode 2011/07/20 16:37:35
    @@ -494,6 +494,7 @@
     case "$KLEVEL" in
            "2.4" ) ;;
            "2.6" ) ;;
    +       3.[0-9*]) ;;
            *)
                    log "ERR" "Unhandled kernel version: $KLEVEL ('uname -r' = '$(uname -r)')" >&2
                    exit 1
    Might work if you want to use patch program, rather than just edit it yourself

  7. #7

    Default Re: laptop-mode-tools 1.53 can not handle kernel 3.0 rc-x

    I made that hand edit, and laptop_mode now looks at line 495 ff. like this:

    Code:
    case "$KLEVEL" in
    	"2.4" ) ;;
    	"2.6" ) ;;
          3.[0-9]*) ;;
    	*)
    		log "ERR" "Unhandled kernel version: $KLEVEL ('uname -r' = '$(uname -r)')" >&2
    		exit 1
    		;;
    esac
    But it does not seem this easy, suspend to disk did not work and I -- fortunately -- got KDE back:

    Code:
    Jul 20 19:01:47 linux-yg22 laptop-mode: On AC power: Deactivating, because ENABLE_LAPTOP_MODE_ON_AC is not set.
    Jul 20 19:01:47 linux-yg22 laptop-mode: Laptop mode 
    Jul 20 19:01:47 linux-yg22 laptop-mode: Checking if desired state is different from current state.
    Jul 20 19:01:47 linux-yg22 laptop-mode: enabled, not active
    Jul 20 19:01:47 linux-yg22 laptop-mode: Invoking module /usr/share/laptop-mode-tools/modules/ac97-powersave.
    Jul 20 19:01:48 linux-yg22 laptop-mode: AC97 audio power setting is disabled.
    Jul 20 19:01:48 linux-yg22 laptop-mode: Invoking module /usr/share/laptop-mode-tools/modules/battery-level-polling.
    Jul 20 19:01:48 linux-yg22 laptop-mode: Battery level polling is disabled.
    Jul 20 19:01:48 linux-yg22 laptop-mode: Invoking module /usr/share/laptop-mode-tools/modules/bluetooth.
    Jul 20 19:01:48 linux-yg22 laptop-mode: Invoking module /usr/share/laptop-mode-tools/modules/configuration-file-control.
    Jul 20 19:01:48 linux-yg22 laptop-mode: Invoking module /usr/share/laptop-mode-tools/modules/cpufreq.
    Jul 20 19:01:48 linux-yg22 laptop-mode: Invoking module /usr/share/laptop-mode-tools/modules/dpms-standby.
    Jul 20 19:01:48 linux-yg22 laptop-mode: CONTROL_DPMS_STANDBY is disabled, skipping...
    Jul 20 19:01:48 linux-yg22 laptop-mode: Invoking module /usr/share/laptop-mode-tools/modules/eee-superhe.
    Jul 20 19:01:48 linux-yg22 laptop-mode: Control file is /sys/devices/platform/eeepc/cpufv
    Jul 20 19:01:48 linux-yg22 laptop-mode: Invoking module /usr/share/laptop-mode-tools/modules/ethernet.
    Jul 20 19:01:48 linux-yg22 laptop-mode: Ethernet module is disabled.
    Jul 20 19:01:48 linux-yg22 laptop-mode: Invoking module /usr/share/laptop-mode-tools/modules/hal-polling.
    Jul 20 19:01:48 linux-yg22 laptop-mode: Invoking module /usr/share/laptop-mode-tools/modules/hdparm.
    Jul 20 19:01:48 linux-yg22 laptop-mode: Invoking module /usr/share/laptop-mode-tools/modules/intel-hda-powersave.
    Jul 20 19:01:48 linux-yg22 laptop-mode: Intel HDA power save mode enabled with timeout 10.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Initialize timer change by close/open /dev/dsp
    Jul 20 19:01:49 linux-yg22 laptop-mode: Intel HDA Controller power save set to N.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Invoking module /usr/share/laptop-mode-tools/modules/intel-sata-powermgmt.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Intel SATA link power saving disabled.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Invoking module /usr/share/laptop-mode-tools/modules/laptop-mode.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Executing: echo 0 > /proc/sys/vm/laptop_mode
    Jul 20 19:01:49 linux-yg22 laptop-mode: Remounting filesystems.
    Jul 20 19:01:49 linux-yg22 laptop-mode: rootfs not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: / not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Checking rootfs against HD because PARTITIONS contains "auto".
    Jul 20 19:01:49 linux-yg22 laptop-mode:    Considering /dev/sda.
    Jul 20 19:01:49 linux-yg22 laptop-mode: devtmpfs not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: /dev not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Checking devtmpfs against HD because PARTITIONS contains "auto".
    Jul 20 19:01:49 linux-yg22 laptop-mode:    Considering /dev/sda.
    Jul 20 19:01:49 linux-yg22 laptop-mode: tmpfs not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: /dev/shm not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Checking tmpfs against HD because PARTITIONS contains "auto".
    Jul 20 19:01:49 linux-yg22 laptop-mode:    Considering /dev/sda.
    Jul 20 19:01:49 linux-yg22 laptop-mode: devpts not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: /dev/pts not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Checking devpts against HD because PARTITIONS contains "auto".
    Jul 20 19:01:49 linux-yg22 laptop-mode:    Considering /dev/sda.
    Jul 20 19:01:49 linux-yg22 laptop-mode: /dev/sda2 not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: / not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Checking /dev/sda2 against HD because PARTITIONS contains "auto".
    Jul 20 19:01:49 linux-yg22 laptop-mode:    Considering /dev/sda.
    Jul 20 19:01:49 linux-yg22 laptop-mode:    /dev/sda2 contains /dev/sda, which is in HD, so we will remount it.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Original options: rw,relatime,user_xattr,acl,barrier=1,data=ordered
    Jul 20 19:01:49 linux-yg22 laptop-mode: Reducing file system type.
    Jul 20 19:01:49 linux-yg22 laptop-mode: No saved mount options, so apparently we never remounted this filesystem during this session.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Not remounting.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Executing: /sbin/blockdev --setfra 256 /dev/sda2
    Jul 20 19:01:49 linux-yg22 laptop-mode: proc not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: /proc not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Checking proc against HD because PARTITIONS contains "auto".
    Jul 20 19:01:49 linux-yg22 laptop-mode:    Considering /dev/sda.
    Jul 20 19:01:49 linux-yg22 laptop-mode: sysfs not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: /sys not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Checking sysfs against HD because PARTITIONS contains "auto".
    Jul 20 19:01:49 linux-yg22 laptop-mode:    Considering /dev/sda.
    Jul 20 19:01:49 linux-yg22 laptop-mode: debugfs not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: /sys/kernel/debug not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Checking debugfs against HD because PARTITIONS contains "auto".
    Jul 20 19:01:49 linux-yg22 laptop-mode:    Considering /dev/sda.
    Jul 20 19:01:49 linux-yg22 laptop-mode: /dev/sda5 not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: /local not found in PARTITIONS.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Checking /dev/sda5 against HD because PARTITIONS contains "auto".
    Jul 20 19:01:49 linux-yg22 laptop-mode:    Considering /dev/sda.
    Jul 20 19:01:49 linux-yg22 laptop-mode:    /dev/sda5 contains /dev/sda, which is in HD, so we will remount it.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Original options: rw,relatime,user_xattr,acl,barrier=1,data=ordered
    Jul 20 19:01:49 linux-yg22 laptop-mode: Reducing file system type.
    Jul 20 19:01:49 linux-yg22 laptop-mode: No saved mount options, so apparently we never remounted this filesystem during this session.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Not remounting.
    Jul 20 19:01:49 linux-yg22 laptop-mode: Executing: /sbin/blockdev --setfra 256 /dev/sda5
    . . . . . . 
    .......... I had to shorten it
    ...........
    Jul 20 19:01:55 linux-yg22 laptop-mode: Module /usr/local/share/laptop-mode-tools/modules/* is not executable.
    Jul 20 19:01:55 linux-yg22 laptop-mode: Module /etc/laptop-mode/modules/* is not executable.
    Jul 20 19:01:55 linux-yg22 dbus-daemon: [system] Rejected send message, 7 matched rules; type="method_call", sender=":1.28" (uid=1002 pid=2515 comm="kdeinit4: plasma-desktop [kdeinit]) interface="org.freedesktop.NetworkManager" member="Sleep" error name="(unset)" requested_reply=0 destination="org.freedesktop.NetworkManager" (uid=0 pid=1592 comm="/usr/sbin/NetworkManager))
    Sorry, to many lines: "The text that you have entered is too long (23410 characters). Please shorten it to 15000 characters long."

  8. #8

    Default Re: laptop-mode-tools 1.53 can not handle kernel 3.0 rc-x

    OK, thinking about it if KLEVEL is used anywhere, we could just set it to 2.6 right?

    Code:
    #    Version checks are broken, so we lie for now
          3.[0-9]*) KLEVEL="2.6" ;;
    Glad you got KDE back. The issue with disk suspend not working may be another problem. Was laptop-mode-tools installed by default install, or was it something you added for power management reasons?

    I think that "rootfs" stuff may well stuff laptop-mode-tools and/or suspend for now. I can't remember if you see that in 2.6.39, it may be a Tumbleweed novelty, which was not present in 11.4; but I have to check round. Right now I'm testing Nvidia at another location, so can't check things easily, am in Win 7 right now after Live CD failed.

  9. #9

    Default Re: laptop-mode-tools 1.53 can not handle kernel 3.0 rc-x

    AJ would like this in Bugzilla so it does not get forgotten - [opensuse-factory] Re: [opensuse-kernel] Tumbleweed user reports with Ke

  10. #10
    Join Date
    Jun 2008
    Location
    Germany
    Posts
    26

    Default Re: laptop-mode-tools 1.53 can not handle kernel 3.0 rc-x

    Rob, in general I'd like to have this in bugzilla. In this specific case, I fixed it without.

    Please download the package from Index of /repositories/home:/a_jaeger:/branches:/openSUSE:/Factory/openSUSE_Factory/noarch and tell me whether it works for you. the package should work just fine on 11.4.
    I had to change some more places for kernel 3.0.
    Andreas Jaeger
    aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
    SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany
    GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer, HRB 16746 (AG Nuernberg)

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •