Sleep button not detected on HP NW8240

Bug #20282 reported by Martijn vdS
10
Affects Status Importance Assigned to Milestone
hotkey-setup (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

On my HP NW8240, the sleep button is not detected (no ACPI button events and no
"keyboard" events).

This means "sleep" does not work out of the box.

Revision history for this message
Matthew Garrett (mjg59) wrote :

If you run xev and press the sleep button while focusing it, do you get any
output? Unless the 8240 is wildly different to the rest of the machines in the
range, this /ought/ to work.

Revision history for this message
Matthew Garrett (mjg59) wrote :

Ping?

Revision history for this message
Martijn vdS (martijn) wrote :

xev wasn't available at the time, but yes, dit does something:

FocusOut event, serial 26, synthetic NO, window 0x3000001,
    mode NotifyGrab, detail NotifyAncestor

FocusOut event, serial 26, synthetic NO, window 0x3000001,
    mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 26, synthetic NO, window 0x3000001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 26, synthetic NO, window 0x0,
    keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
           0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Revision history for this message
Matthew Garrett (mjg59) wrote :

That's the events from the mouse moving in and out, by the looks of it. Does
focusing the window, waiting for messages to stop being generated and then
pressing the sleep key generate anything?

Revision history for this message
Martijn vdS (martijn) wrote :

Yes. That stuff (2 FocusOut, 1 FocusIn and a KeymapNotify). The mouse generates
this crud:

MotionNotify event, serial 26, synthetic NO, window 0x3400001,
    root 0x3d, subw 0x0, time 2152589, (119,39), root:(124,501),
    state 0x0, is_hint 0, same_screen YES

MotionNotify event, serial 26, synthetic NO, window 0x3400001,
    root 0x3d, subw 0x0, time 2152597, (133,17), root:(138,479),
    state 0x0, is_hint 0, same_screen YES

LeaveNotify event, serial 26, synthetic NO, window 0x3400001,
    root 0x3d, subw 0x0, time 2152605, (141,-1), root:(146,461),
    mode NotifyNormal, detail NotifyAncestor, same_screen YES,
    focus YES, state 0

FocusOut event, serial 26, synthetic NO, window 0x3400001,
    mode NotifyNormal, detail NotifyNonlinear

PropertyNotify event, serial 26, synthetic NO, window 0x3400001,
    atom 0x13f (_NET_WM_ICON_GEOMETRY), time 2152684, state PropertyNewValue

Revision history for this message
Matthew Garrett (mjg59) wrote :

Ok. Can you confirm that system/preferences/keyboard shortcuts claims that sleep
is 0xdf, and that /etc/default/acpi-support has the second line uncommented?

Revision history for this message
Martijn vdS (martijn) wrote :

keyboard shortcut "sleep" = 0xdf: yes
/etc/default/acpi-support ACPI_SLEEP is commented (but that might be because
this is an old daily, will test with colony-4 as soon as I finish downloading it.

Revision history for this message
Matthew Garrett (mjg59) wrote :

Right. Can you uncomment it and then try again?

Revision history for this message
Matthew Garrett (mjg59) wrote :

Ping?

Revision history for this message
Martijn vdS (martijn) wrote :

Pressing the button does nothing, except generate the code, it seems.

Revision history for this message
Matthew Garrett (mjg59) wrote :

You're running Gnome, right? If you go into keyboard shortcuts, can you bind the
sleep key to the sleep function? Is ACPI_SLEEP=true uncommented?

Revision history for this message
Martijn vdS (martijn) wrote :

Then it gets set to 0xdf, but the computer still does nothing (no log message,
etc.) when I press the key.

Revision history for this message
Matt Zimmerman (mdz) wrote :

(In reply to comment #12)
> Then it gets set to 0xdf, but the computer still does nothing (no log message,
> etc.) when I press the key.

Similar to bug #20204...

Revision history for this message
Matthew Garrett (mjg59) wrote :

Can you please confirm that ACPI_SLEEP is uncommented?

Matt: I doubt it. The HP hardware I have here behaves in much the same way,
except that it works...

Revision history for this message
Martijn vdS (martijn) wrote :

root@ubuntu:/etc/default# head acpi-support

# Uncomment the next line to enable ACPI suspend to RAM
ACPI_SLEEP=true

# Comment the next line to disable suspend to disk
ACPI_HIBERNATE=true

Revision history for this message
Martijn vdS (martijn) wrote :

OK, so I just needed a reboot(?!)...

It works now, but waking up doesn't go very well, but that seems to be a fglrx
issue.

Revision history for this message
Matthew Garrett (mjg59) wrote :

Ok. Could you try waking up without fglrx (or if the system doesn't work without
fglrx, make sure that there's a bug filed on that)

Revision history for this message
Matthew Garrett (mjg59) wrote :

Did this work?

Revision history for this message
Martijn vdS (martijn) wrote :

The system doesn't work nicely without fglrx (see #14043)

Revision history for this message
Matthew Garrett (mjg59) wrote :

Does it resume to the same sort of level of brokenness, though?

Revision history for this message
Luka Renko (lure) wrote :

Still does not work for Kubuntu Breezy and Dapper Flight 2. Should I open new bug?
Note: hibernate only works with ATI drivers (tested only of Breezy).
See https://wiki.ubuntu.com/LaptopTestingTeam/HPNW8240/Kubuntu

Revision history for this message
Paul Sladen (sladen) wrote :

That's because this machine is a *Compaq* and not an HP!

Rebranded and with the dmi-sig changed from "Compaq ..." to "HP Compaq ...".

Ooh, magical. I've added the entries provided by Luka to a new compaq.hk. Four of the keycodes match other [pre-HP-merger] Compaqs. One key code ("Presentation") matches other HP definitions.

Revision history for this message
Paul Sladen (sladen) wrote : To keep all the codes in one place...

# From: "HP Compaq nw8240 (PG818ET#ABU)"
setkeycodes e05f $KEY_SLEEP # Fn+F3 Sleep (matches compaq.hk)
setkeycodes e059 $KEY_F24 # Fn+F8 Battery
setkeycodes e075 $KEY_PROG2 # Info Info key (matches hp.hk)
setkeycodes e01f $KEY_F23 # Presentation (Full screen?)
setkeycodes e020 $KEY_MUTE # Mute toggle Volume Mute (matches compaq.hk)
setkeycodes e02e $KEY_VOLUMEDOWN # LowVolume Volume Down (matches compaq.hk)
setkeycodes e030 $KEY_VOLUMEUP # HighVolume Volume Up (matches compaq.hk)

Revision history for this message
Luka Renko (lure) wrote :

Paul: was fix for this really released? It still does not work on my system, and I do not find compaq.hk (only hp.hk) - is it possible that this file is not packaged in latest hotkey-setup (0.1-12 on my system)?

Revision history for this message
Paul Sladen (sladen) wrote :

It's not even in 0.14 which is in Debian. the compaq.hk is on my hard-drive and there's a copy attached to another bug.

Matthew's right, this is an HP, not old-Compaq; many of the keycodes are not in there as they match the ones used by Microsoft (and therefore the default codes in the kernel).

If you copy and paste the contents of the comment two above onto the end of:

  /usr/share/hotkey-setup/hp.hk

does that make things better for you?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.