Skip to contentSkip to conversation

New: Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted

Bug 13865 Rafael J. Wysocki 5 participants 16 messages Jul 29, 2009 – Jul 30, 2009 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]/

#1 lore raw
Quoted 20 lines · you

http://bugzilla.kernel.org/show_bug.cgi?id=13865

           Summary: Can only resume with HP_WMI selected on compaq nc6000
                    when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is
                    reverted
           Product: Power Management
           Version: 2.5
    Kernel Version: 2.6.30
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Hibernation/Suspend
        AssignedTo: [email protected]
        ReportedBy: [email protected]
        Regression: No
Quoted 4 lines

Just for testing I enabled HP_WMI. But from then, I could not resume anymore. I just reverted the last git commit on the 'drivers/platform/x86/hp-wmi.c' code (4c395bdd3f2ca8f7e8efad881e16071182c3b8ca) and now I can resume. The problem still persists on .31-rc serie

Frans, that's something for you to take care of.

Best,
Rafael

#2 lore raw

[Bug 13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted

Quoted 8 lines · Rafael J. Wysocki
Quoted 5 lines · you

Just for testing I enabled HP_WMI. But from then, I could not resume anymore. I just reverted the last git commit on the 'drivers/platform/x86/hp-wmi.c' code (4c395bdd3f2ca8f7e8efad881e16071182c3b8ca) and now I can resume. The problem still persists on .31-rc serie

Frans, that's something for you to take care of.

I'll at least give it a try.

Cedric, as a start, can you please provide the output of the following commands after the system is booted and with hp-wmi loaded:

$ grep . /sys/devices/platform/hp-wmi/*
$ ls -l /dev/input/*
$ cat /proc/bus/input/devices

Does an unload and reload of the module work correctly? What gets output in dmesg by that?

The strange thing is that the resume function does not do anything that's not also done in hp_wmi_input_setup(). The only thing I can think of is that we might need to test for wmi_has_guid(HPWMI_EVENT_GUID) because that model simply does not support input events.

Cheers,
FJP

#3 lore raw

[Bug 13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted

In reply to Rafael J. Wysocki
Quoted 8 lines · Rafael J. Wysocki
Quoted 5 lines · you

Just for testing I enabled HP_WMI. But from then, I could not resume anymore. I just reverted the last git commit on the 'drivers/platform/x86/hp-wmi.c' code (4c395bdd3f2ca8f7e8efad881e16071182c3b8ca) and now I can resume. The problem still persists on .31-rc serie

Frans, that's something for you to take care of.

I'll at least give it a try.

Cedric, as a start, can you please provide the output of the following commands after the system is booted and with hp-wmi loaded:

$ grep . /sys/devices/platform/hp-wmi/*
$ ls -l /dev/input/*
$ cat /proc/bus/input/devices

Does an unload and reload of the module work correctly? What gets output in dmesg by that?

The strange thing is that the resume function does not do anything that's not also done in hp_wmi_input_setup(). The only thing I can think of is that we might need to test for wmi_has_guid(HPWMI_EVENT_GUID) because that model simply does not support input events.

Cheers,
FJP

#4 lore raw

Re: [Bug 13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted

Quoted 5 lines · Frans Pop

The strange thing is that the resume function does not do anything that's not also done in hp_wmi_input_setup(). The only thing I can think of is that we might need to test for wmi_has_guid(HPWMI_EVENT_GUID) because that model simply does not support input events.

If that is the problem, the following patch will hopefully fix it. This patch is against .31-rc4 but will need only minor changes to apply against .30.

Subject: hp-wmi: check that an input device exists in resume handler

Some systems may not support input events, or registering the input handler may have failed. So check that an input device exists before trying to set the docking and tablet mode state during resume.

Reported-by [email protected]
Cc Matthew Garrett <[email protected]>
drivers/platform/x86/hp-wmi.c +7 -5
index 369bd43..63c9214 100644
@@ -540,11 +540,13 @@ static int hp_wmi_resume_handler(struct device *device)
 	 * the input layer will only actually pass it on if the state
 	 * changed.
 	 */
-
-	input_report_switch(hp_wmi_input_dev, SW_DOCK, hp_wmi_dock_state());
-	input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
-			    hp_wmi_tablet_state());
-	input_sync(hp_wmi_input_dev);
+	if (hp_wmi_input_dev) {
+		input_report_switch(hp_wmi_input_dev, SW_DOCK,
+				    hp_wmi_dock_state());
+		input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
+				    hp_wmi_tablet_state());
+		input_sync(hp_wmi_input_dev);
+	}
 
 	if (wifi_rfkill)
 		rfkill_set_states(wifi_rfkill,
#5 lore raw

Re: [Bug 13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted

In reply to Frans Pop
Quoted 5 lines · Frans Pop

The strange thing is that the resume function does not do anything that's not also done in hp_wmi_input_setup(). The only thing I can think of is that we might need to test for wmi_has_guid(HPWMI_EVENT_GUID) because that model simply does not support input events.

If that is the problem, the following patch will hopefully fix it. This patch is against .31-rc4 but will need only minor changes to apply against .30.

Subject: hp-wmi: check that an input device exists in resume handler

Some systems may not support input events, or registering the input handler may have failed. So check that an input device exists before trying to set the docking and tablet mode state during resume.

Reported-by [email protected]
Cc Matthew Garrett <[email protected]>
drivers/platform/x86/hp-wmi.c +7 -5
index 369bd43..63c9214 100644
@@ -540,11 +540,13 @@ static int hp_wmi_resume_handler(struct device *device)
 	 * the input layer will only actually pass it on if the state
 	 * changed.
 	 */
-
-	input_report_switch(hp_wmi_input_dev, SW_DOCK, hp_wmi_dock_state());
-	input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
-			    hp_wmi_tablet_state());
-	input_sync(hp_wmi_input_dev);
+	if (hp_wmi_input_dev) {
+		input_report_switch(hp_wmi_input_dev, SW_DOCK,
+				    hp_wmi_dock_state());
+		input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
+				    hp_wmi_tablet_state());
+		input_sync(hp_wmi_input_dev);
+	}
 
 	if (wifi_rfkill)
 		rfkill_set_states(wifi_rfkill,
#6 lore raw

Re: [Bug 13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted

In reply to Frans Pop
Quoted 24 lines · Frans Pop
Quoted 10 lines · Rafael J. Wysocki
Quoted 6 lines · you

Just for testing I enabled HP_WMI. But from then, I could not resume anymore. I just reverted the last git commit on the 'drivers/platform/x86/hp-wmi.c' code (4c395bdd3f2ca8f7e8efad881e16071182c3b8ca) and now I can resume. The problem still persists on .31-rc serie

Frans, that's something for you to take care of.

I'll at least give it a try.

Cedric, as a start, can you please provide the output of the following commands after the system is booted and with hp-wmi loaded:

$ grep . /sys/devices/platform/hp-wmi/*
$ ls -l /dev/input/*
$ cat /proc/bus/input/devices

Does an unload and reload of the module work correctly? What gets output in dmesg by that?

Quoted 8 lines

The strange thing is that the resume function does not do anything that's not also done in hp_wmi_input_setup(). The only thing I can think of is that we might need to test for wmi_has_guid(HPWMI_EVENT_GUID) because that model simply does not support input events.

Cheers,
FJP

I tested your patch (from buzilla) and now I can resume.

Thanks ! You have my tested-by ;-)

PS: I suppose you don't need this infos anymore ?

#7 lore raw

Re: [Bug 13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted

In reply to Frans Pop
Quoted 24 lines · Frans Pop
Quoted 10 lines · Rafael J. Wysocki
Quoted 6 lines · you

Just for testing I enabled HP_WMI. But from then, I could not resume anymore. I just reverted the last git commit on the 'drivers/platform/x86/hp-wmi.c' code (4c395bdd3f2ca8f7e8efad881e16071182c3b8ca) and now I can resume. The problem still persists on .31-rc serie

Frans, that's something for you to take care of.

I'll at least give it a try.

Cedric, as a start, can you please provide the output of the following commands after the system is booted and with hp-wmi loaded:

$ grep . /sys/devices/platform/hp-wmi/*
$ ls -l /dev/input/*
$ cat /proc/bus/input/devices

Does an unload and reload of the module work correctly? What gets output in dmesg by that?

Quoted 8 lines

The strange thing is that the resume function does not do anything that's not also done in hp_wmi_input_setup(). The only thing I can think of is that we might need to test for wmi_has_guid(HPWMI_EVENT_GUID) because that model simply does not support input events.

Cheers,
FJP

I tested your patch (from buzilla) and now I can resume.

Thanks ! You have my tested-by ;-)

PS: I suppose you don't need this infos anymore ?

#8 lore raw

Re: [Bug 13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted

Quoted 7 lines · Cédric Godin
Quoted 5 lines

The strange thing is that the resume function does not do anything that's not also done in hp_wmi_input_setup(). The only thing I can think of is that we might need to test for wmi_has_guid(HPWMI_EVENT_GUID) because that model simply does not support input events.

I tested your patch (from buzilla) and now I can resume.

Great.

Quoted 3 lines

Thanks ! You have my tested-by ;-)

PS: I suppose you don't need this infos anymore ?

I'd still like to see the following if it's not too much trouble, basically to confirm that the theory was indeed correct.

$ grep . /sys/devices/platform/hp-wmi/*
$ cat /proc/bus/input/devices

Thanks,
FJP

#9 lore raw

Re: [Bug 13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted

In reply to Cédric Godin
Quoted 7 lines · Cédric Godin
Quoted 5 lines

The strange thing is that the resume function does not do anything that's not also done in hp_wmi_input_setup(). The only thing I can think of is that we might need to test for wmi_has_guid(HPWMI_EVENT_GUID) because that model simply does not support input events.

I tested your patch (from buzilla) and now I can resume.

Great.

Quoted 3 lines

Thanks ! You have my tested-by ;-)

PS: I suppose you don't need this infos anymore ?

I'd still like to see the following if it's not too much trouble, basically to confirm that the theory was indeed correct.

$ grep . /sys/devices/platform/hp-wmi/*
$ cat /proc/bus/input/devices

Thanks,
FJP
_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

#10 lore raw

Re: [Bug 13865] [PATCH] hp-wmi: check that an input device exists in resume handler

In reply to Rafael J. Wysocki
Quoted 8 lines · Rafael J. Wysocki
Quoted 7 lines · you

http://bugzilla.kernel.org/show_bug.cgi?id=13865

Just for testing I enabled HP_WMI. But from then, I could not resume anymore. I just reverted the last git commit on the 'drivers/platform/x86/hp-wmi.c' code (4c395bdd3f2ca8f7e8efad881e16071182c3b8ca) and now I can resume. The problem still persists on .31-rc serie

Here's the final patch, tested by Cédric. (And properly against mainline.)

From: Frans Pop <[email protected]>
Subject: hp-wmi: check that an input device exists in resume handler

Some systems may not support input events, or registering the input handler may have failed. So check that an input device exists before trying to set the docking and tablet mode state during resume.

Reported-and-tested-by Cédric Godin <[email protected]>
Cc Matthew Garrett <[email protected]>
drivers/platform/x86/hp-wmi.c +7 -5
index ca50856..a2ad53e 100644
@@ -520,11 +520,13 @@ static int hp_wmi_resume_handler(struct platform_device *device)
 	 * the input layer will only actually pass it on if the state
 	 * changed.
 	 */
-
-	input_report_switch(hp_wmi_input_dev, SW_DOCK, hp_wmi_dock_state());
-	input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
-			    hp_wmi_tablet_state());
-	input_sync(hp_wmi_input_dev);
+	if (hp_wmi_input_dev) {
+		input_report_switch(hp_wmi_input_dev, SW_DOCK,
+				    hp_wmi_dock_state());
+		input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
+				    hp_wmi_tablet_state());
+		input_sync(hp_wmi_input_dev);
+	}
 
 	return 0;
 }

_______________________________________________
linux-pm mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

#11 lore raw

Re: [Bug 13865] [PATCH] hp-wmi: check that an input device exists in resume handler

In reply to Rafael J. Wysocki
Quoted 8 lines · Rafael J. Wysocki
Quoted 7 lines · you

http://bugzilla.kernel.org/show_bug.cgi?id=13865

Just for testing I enabled HP_WMI. But from then, I could not resume anymore. I just reverted the last git commit on the 'drivers/platform/x86/hp-wmi.c' code (4c395bdd3f2ca8f7e8efad881e16071182c3b8ca) and now I can resume. The problem still persists on .31-rc serie

Here's the final patch, tested by Cédric. (And properly against mainline.)

From: Frans Pop <[email protected]>
Subject: hp-wmi: check that an input device exists in resume handler

Some systems may not support input events, or registering the input handler may have failed. So check that an input device exists before trying to set the docking and tablet mode state during resume.

Reported-and-tested-by Cédric Godin <[email protected]>
Cc Matthew Garrett <[email protected]>
drivers/platform/x86/hp-wmi.c +7 -5
index ca50856..a2ad53e 100644
@@ -520,11 +520,13 @@ static int hp_wmi_resume_handler(struct platform_device *device)
 	 * the input layer will only actually pass it on if the state
 	 * changed.
 	 */
-
-	input_report_switch(hp_wmi_input_dev, SW_DOCK, hp_wmi_dock_state());
-	input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
-			    hp_wmi_tablet_state());
-	input_sync(hp_wmi_input_dev);
+	if (hp_wmi_input_dev) {
+		input_report_switch(hp_wmi_input_dev, SW_DOCK,
+				    hp_wmi_dock_state());
+		input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
+				    hp_wmi_tablet_state());
+		input_sync(hp_wmi_input_dev);
+	}
 
 	return 0;
 }

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#12 lore raw

Re: [Bug 13865] [PATCH] hp-wmi: check that an input device exists in resume handler

Quoted 7 lines · Frans Pop

From: Frans Pop <[email protected]>
Subject: hp-wmi: check that an input device exists in resume handler

Some systems may not support input events, or registering the input handler may have failed. So check that an input device exists before trying to set the docking and tablet mode state during resume.

Quoted 5 lines
Reported-and-tested-by Cédric Godin <[email protected]>
Cc Matthew Garrett <[email protected]>
Signature · 1 line
Matthew Garrett | [email protected]
#13 lore raw

Re: [Bug 13865] [PATCH] hp-wmi: check that an input device exists in resume handler

In reply to Frans Pop
Quoted 7 lines · Frans Pop

From: Frans Pop <[email protected]>
Subject: hp-wmi: check that an input device exists in resume handler

Some systems may not support input events, or registering the input handler may have failed. So check that an input device exists before trying to set the docking and tablet mode state during resume.

Quoted 5 lines
Reported-and-tested-by Cédric Godin <[email protected]>
Cc Matthew Garrett <[email protected]>
Signature · 5 lines
Matthew Garrett | [email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#16 lore raw
In reply to a message not in the archive
Quoted 20 lines · you

http://bugzilla.kernel.org/show_bug.cgi?id=13865

           Summary: Can only resume with HP_WMI selected on compaq nc6000
                    when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is
                    reverted
           Product: Power Management
           Version: 2.5
    Kernel Version: 2.6.30
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Hibernation/Suspend
        AssignedTo: [email protected]
        ReportedBy: [email protected]
        Regression: No
Quoted 4 lines

Just for testing I enabled HP_WMI. But from then, I could not resume anymore. I just reverted the last git commit on the 'drivers/platform/x86/hp-wmi.c' code (4c395bdd3f2ca8f7e8efad881e16071182c3b8ca) and now I can resume. The problem still persists on .31-rc serie

Frans, that's something for you to take care of.

Best,
Rafael