* [PATCH 1/2] ideapad-laptop: Ignore an unused VPC notification
@ 2011-06-28 13:35 Keng-Yu Lin
2011-06-28 13:35 ` [PATCH 2/2] ideapad-laptop: Handle the App-controlled RF event Keng-Yu Lin
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Keng-Yu Lin @ 2011-06-28 13:35 UTC (permalink / raw)
To: Matthew Garrett, platform-driver-x86, linux-kernel
Cc: ike.pan, vanhoof, kent.lin, sylee, Keng-Yu Lin
BIOS fires notifications in a constant period with VPC bit 1 set when the
power cord is unplugged.
This event is not known yet to have any effect, but it makes the
call to sparse_keymap_report_event() and generates many KEY_UNKNOWNs.
This causes the userspace (Gnome Power Manager in my case) unable
to enter the idle mode. As the result there is no screensaver showing up,
no dim backlight, etc.
Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
---
drivers/platform/x86/ideapad-laptop.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index bfdda33..820f013 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -463,7 +463,8 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)
ideapad_sync_rfk_state(adevice);
else if (vpc_bit == 4)
read_ec_data(handle, 0x12, &vpc2);
- else
+ else if (vpc_bit == 1) {
+ } else
ideapad_input_report(priv, vpc_bit);
}
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/2] ideapad-laptop: Handle the App-controlled RF event
2011-06-28 13:35 [PATCH 1/2] ideapad-laptop: Ignore an unused VPC notification Keng-Yu Lin
@ 2011-06-28 13:35 ` Keng-Yu Lin
2011-06-29 13:56 ` Ike Panhc
2011-07-07 15:11 ` Matthew Garrett
2011-06-29 14:26 ` [PATCH 1/2] ideapad-laptop: Ignore an unused VPC notification Ike Panhc
2011-07-07 15:10 ` Matthew Garrett
2 siblings, 2 replies; 13+ messages in thread
From: Keng-Yu Lin @ 2011-06-28 13:35 UTC (permalink / raw)
To: Matthew Garrett, platform-driver-x86, linux-kernel
Cc: ike.pan, vanhoof, kent.lin, sylee, Keng-Yu Lin
Notification with VPC2 bit 5 set is generated when the wireless
hotkey is pressed. BIOS fires this to notify a Windows
application to handle the RF switch.
On Linux, there is no such application. This patch implements
a toggle for all RF devices through accessing the EC I/O ports.
Without the explicit EC commands, the wifi LED is always on.
Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
---
drivers/platform/x86/ideapad-laptop.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 820f013..5e1e971 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -461,7 +461,11 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)
if (test_bit(vpc_bit, &vpc1)) {
if (vpc_bit == 9)
ideapad_sync_rfk_state(adevice);
- else if (vpc_bit == 4)
+ else if (vpc_bit == 13) {
+ read_ec_data(handle, 0x23, &vpc2);
+ write_ec_cmd(handle, 0x24, !vpc2);
+ ideapad_sync_rfk_state(adevice);
+ } else if (vpc_bit == 4)
read_ec_data(handle, 0x12, &vpc2);
else if (vpc_bit == 1) {
} else
--
1.7.4.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] ideapad-laptop: Handle the App-controlled RF event
2011-06-28 13:35 ` [PATCH 2/2] ideapad-laptop: Handle the App-controlled RF event Keng-Yu Lin
@ 2011-06-29 13:56 ` Ike Panhc
2011-06-30 10:34 ` Keng-Yü Lin
2011-07-07 15:11 ` Matthew Garrett
1 sibling, 1 reply; 13+ messages in thread
From: Ike Panhc @ 2011-06-29 13:56 UTC (permalink / raw)
To: Keng-Yu Lin
Cc: Matthew Garrett, platform-driver-x86, linux-kernel, vanhoof,
kent.lin, sylee
On 06/28/2011 09:35 PM, Keng-Yu Lin wrote:
> Notification with VPC2 bit 5 set is generated when the wireless
> hotkey is pressed. BIOS fires this to notify a Windows
> application to handle the RF switch.
>
> On Linux, there is no such application. This patch implements
> a toggle for all RF devices through accessing the EC I/O ports.
>
> Without the explicit EC commands, the wifi LED is always on.
>
> Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
> ---
> drivers/platform/x86/ideapad-laptop.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
> index 820f013..5e1e971 100644
> --- a/drivers/platform/x86/ideapad-laptop.c
> +++ b/drivers/platform/x86/ideapad-laptop.c
> @@ -461,7 +461,11 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)
> if (test_bit(vpc_bit, &vpc1)) {
> if (vpc_bit == 9)
> ideapad_sync_rfk_state(adevice);
> - else if (vpc_bit == 4)
> + else if (vpc_bit == 13) {
> + read_ec_data(handle, 0x23, &vpc2);
> + write_ec_cmd(handle, 0x24, !vpc2);
> + ideapad_sync_rfk_state(adevice);
> + } else if (vpc_bit == 4)
> read_ec_data(handle, 0x12, &vpc2);
> else if (vpc_bit == 1) {
> } else
I think its better to implement the changes in ideapad_sync_rfk_state() because we have
read switch status there. It is not necessary to read the same data twice in an event.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] ideapad-laptop: Ignore an unused VPC notification
2011-06-28 13:35 [PATCH 1/2] ideapad-laptop: Ignore an unused VPC notification Keng-Yu Lin
2011-06-28 13:35 ` [PATCH 2/2] ideapad-laptop: Handle the App-controlled RF event Keng-Yu Lin
@ 2011-06-29 14:26 ` Ike Panhc
2011-06-30 10:17 ` Keng-Yü Lin
2011-07-07 15:10 ` Matthew Garrett
2 siblings, 1 reply; 13+ messages in thread
From: Ike Panhc @ 2011-06-29 14:26 UTC (permalink / raw)
To: Keng-Yu Lin
Cc: Matthew Garrett, platform-driver-x86, linux-kernel, vanhoof,
kent.lin, sylee
On 06/28/2011 09:35 PM, Keng-Yu Lin wrote:
> BIOS fires notifications in a constant period with VPC bit 1 set when the
> power cord is unplugged.
>
> This event is not known yet to have any effect, but it makes the
> call to sparse_keymap_report_event() and generates many KEY_UNKNOWNs.
>
> This causes the userspace (Gnome Power Manager in my case) unable
> to enter the idle mode. As the result there is no screensaver showing up,
> no dim backlight, etc.
>
> Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
> ---
> drivers/platform/x86/ideapad-laptop.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
> index bfdda33..820f013 100644
> --- a/drivers/platform/x86/ideapad-laptop.c
> +++ b/drivers/platform/x86/ideapad-laptop.c
> @@ -463,7 +463,8 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)
> ideapad_sync_rfk_state(adevice);
> else if (vpc_bit == 4)
> read_ec_data(handle, 0x12, &vpc2);
> - else
> + else if (vpc_bit == 1) {
> + } else
> ideapad_input_report(priv, vpc_bit);
> }
> }
So far I know this event (coming with vpc_bit=1) is for Lenovo PM utility
on Windows. For most of the machine this event is not implemented in BIOS.
Its ok that we just ignore the event.
I think it will be better if we can let sparse-keymap or any upper level
application to ignore all unknown scancode or KEY_UNKNOWN but so far I do
not know a better way then this patch.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] ideapad-laptop: Ignore an unused VPC notification
2011-06-29 14:26 ` [PATCH 1/2] ideapad-laptop: Ignore an unused VPC notification Ike Panhc
@ 2011-06-30 10:17 ` Keng-Yü Lin
0 siblings, 0 replies; 13+ messages in thread
From: Keng-Yü Lin @ 2011-06-30 10:17 UTC (permalink / raw)
To: Ike Panhc
Cc: Matthew Garrett, platform-driver-x86, linux-kernel, vanhoof,
kent.lin, sylee
On Wed, Jun 29, 2011 at 3:26 PM, Ike Panhc <ike.pan@canonical.com> wrote:
> On 06/28/2011 09:35 PM, Keng-Yu Lin wrote:
>> BIOS fires notifications in a constant period with VPC bit 1 set when the
>> power cord is unplugged.
>>
>> This event is not known yet to have any effect, but it makes the
>> call to sparse_keymap_report_event() and generates many KEY_UNKNOWNs.
>>
>> This causes the userspace (Gnome Power Manager in my case) unable
>> to enter the idle mode. As the result there is no screensaver showing up,
>> no dim backlight, etc.
>>
>> Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
>> ---
>> drivers/platform/x86/ideapad-laptop.c | 3 ++-
>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
>> index bfdda33..820f013 100644
>> --- a/drivers/platform/x86/ideapad-laptop.c
>> +++ b/drivers/platform/x86/ideapad-laptop.c
>> @@ -463,7 +463,8 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)
>> ideapad_sync_rfk_state(adevice);
>> else if (vpc_bit == 4)
>> read_ec_data(handle, 0x12, &vpc2);
>> - else
>> + else if (vpc_bit == 1) {
>> + } else
>> ideapad_input_report(priv, vpc_bit);
>> }
>> }
>
> So far I know this event (coming with vpc_bit=1) is for Lenovo PM utility
> on Windows. For most of the machine this event is not implemented in BIOS.
>
> Its ok that we just ignore the event.
>
> I think it will be better if we can let sparse-keymap or any upper level
> application to ignore all unknown scancode or KEY_UNKNOWN but so far I do
> not know a better way then this patch.
I think sparse_keymap_report_event() sends the KEY_UNKNOWN on purpose
as a debugging aid.
We should prevent the call to it in ideapad-laptop. I think the patch
is probably the simplest way.
Thanks,
-kengyu
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] ideapad-laptop: Handle the App-controlled RF event
2011-06-29 13:56 ` Ike Panhc
@ 2011-06-30 10:34 ` Keng-Yü Lin
2011-07-05 7:26 ` Ike Panhc
0 siblings, 1 reply; 13+ messages in thread
From: Keng-Yü Lin @ 2011-06-30 10:34 UTC (permalink / raw)
To: Ike Panhc
Cc: Matthew Garrett, platform-driver-x86, linux-kernel, vanhoof,
kent.lin, sylee
On Wed, Jun 29, 2011 at 2:56 PM, Ike Panhc <ike.pan@canonical.com> wrote:
> On 06/28/2011 09:35 PM, Keng-Yu Lin wrote:
>> Notification with VPC2 bit 5 set is generated when the wireless
>> hotkey is pressed. BIOS fires this to notify a Windows
>> application to handle the RF switch.
>>
>> On Linux, there is no such application. This patch implements
>> a toggle for all RF devices through accessing the EC I/O ports.
>>
>> Without the explicit EC commands, the wifi LED is always on.
>>
>> Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
>> ---
>> drivers/platform/x86/ideapad-laptop.c | 6 +++++-
>> 1 files changed, 5 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
>> index 820f013..5e1e971 100644
>> --- a/drivers/platform/x86/ideapad-laptop.c
>> +++ b/drivers/platform/x86/ideapad-laptop.c
>> @@ -461,7 +461,11 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)
>> if (test_bit(vpc_bit, &vpc1)) {
>> if (vpc_bit == 9)
>> ideapad_sync_rfk_state(adevice);
>> - else if (vpc_bit == 4)
>> + else if (vpc_bit == 13) {
>> + read_ec_data(handle, 0x23, &vpc2);
>> + write_ec_cmd(handle, 0x24, !vpc2);
>> + ideapad_sync_rfk_state(adevice);
>> + } else if (vpc_bit == 4)
>> read_ec_data(handle, 0x12, &vpc2);
>> else if (vpc_bit == 1) {
>> } else
>
> I think its better to implement the changes in ideapad_sync_rfk_state() because we have
> read switch status there. It is not necessary to read the same data twice in an event.
>
>
Current ideapad_sync_rfk_state() code does not really toggle the
hardware swtich (I mean to write_ec_cmd with 0x24 command). It just
assumes that the BIOS or EC is responsible for the wifi switch-on/-off
and reports the state via rfkill_set_hw_state().
In my case, without explicit sending the 0x24 command to turn off the
radio device, the wifi LED is always on.
Though it might not be true or applicable on ideapads, in my last
experience on Dell laptops that to switch off the RF radio in the
driver while the hardware claims to control it can cause some mess-up.
So to be safe I prefer not to move the toggle code in ideapad_sync_rfk_state().
Thanks,
-kengyu
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] ideapad-laptop: Handle the App-controlled RF event
2011-06-30 10:34 ` Keng-Yü Lin
@ 2011-07-05 7:26 ` Ike Panhc
2011-07-05 11:42 ` Keng-Yü Lin
0 siblings, 1 reply; 13+ messages in thread
From: Ike Panhc @ 2011-07-05 7:26 UTC (permalink / raw)
To: Keng-Yü Lin
Cc: Matthew Garrett, platform-driver-x86, linux-kernel, vanhoof,
kent.lin, sylee
On 06/30/2011 06:34 PM, Keng-Yü Lin wrote:
> On Wed, Jun 29, 2011 at 2:56 PM, Ike Panhc <ike.pan@canonical.com> wrote:
>> On 06/28/2011 09:35 PM, Keng-Yu Lin wrote:
>>> Notification with VPC2 bit 5 set is generated when the wireless
>>> hotkey is pressed. BIOS fires this to notify a Windows
>>> application to handle the RF switch.
>>>
>>> On Linux, there is no such application. This patch implements
>>> a toggle for all RF devices through accessing the EC I/O ports.
>>>
>>> Without the explicit EC commands, the wifi LED is always on.
>>>
>>> Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
>>> ---
>>> drivers/platform/x86/ideapad-laptop.c | 6 +++++-
>>> 1 files changed, 5 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
>>> index 820f013..5e1e971 100644
>>> --- a/drivers/platform/x86/ideapad-laptop.c
>>> +++ b/drivers/platform/x86/ideapad-laptop.c
>>> @@ -461,7 +461,11 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)
>>> if (test_bit(vpc_bit, &vpc1)) {
>>> if (vpc_bit == 9)
>>> ideapad_sync_rfk_state(adevice);
>>> - else if (vpc_bit == 4)
>>> + else if (vpc_bit == 13) {
>>> + read_ec_data(handle, 0x23, &vpc2);
>>> + write_ec_cmd(handle, 0x24, !vpc2);
>>> + ideapad_sync_rfk_state(adevice);
>>> + } else if (vpc_bit == 4)
>>> read_ec_data(handle, 0x12, &vpc2);
>>> else if (vpc_bit == 1) {
>>> } else
>>
>> I think its better to implement the changes in ideapad_sync_rfk_state() because we have
>> read switch status there. It is not necessary to read the same data twice in an event.
>>
>>
>
> Current ideapad_sync_rfk_state() code does not really toggle the
> hardware swtich (I mean to write_ec_cmd with 0x24 command). It just
> assumes that the BIOS or EC is responsible for the wifi switch-on/-off
> and reports the state via rfkill_set_hw_state().
>
> In my case, without explicit sending the 0x24 command to turn off the
> radio device, the wifi LED is always on.
>
> Though it might not be true or applicable on ideapads, in my last
> experience on Dell laptops that to switch off the RF radio in the
> driver while the hardware claims to control it can cause some mess-up.
>
> So to be safe I prefer not to move the toggle code in ideapad_sync_rfk_state().
>
> Thanks,
> -kengyu
>
Look twice and I do not think this patch is acceptable.
vpc_bit 13 is soft block key event (Fn+F5) and read_ec_data from 0x23 is
hardware switch status. This patch will mask the key report of inputdev
and to force update switch status in EC (0x24) is not a reasonable solution.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] ideapad-laptop: Handle the App-controlled RF event
2011-07-05 7:26 ` Ike Panhc
@ 2011-07-05 11:42 ` Keng-Yü Lin
0 siblings, 0 replies; 13+ messages in thread
From: Keng-Yü Lin @ 2011-07-05 11:42 UTC (permalink / raw)
To: Ike Panhc
Cc: Matthew Garrett, platform-driver-x86, linux-kernel, vanhoof,
kent.lin, sylee
On Tue, Jul 5, 2011 at 3:26 PM, Ike Panhc <ike.pan@canonical.com> wrote:
> On 06/30/2011 06:34 PM, Keng-Yü Lin wrote:
>> On Wed, Jun 29, 2011 at 2:56 PM, Ike Panhc <ike.pan@canonical.com> wrote:
>>> On 06/28/2011 09:35 PM, Keng-Yu Lin wrote:
>>>> Notification with VPC2 bit 5 set is generated when the wireless
>>>> hotkey is pressed. BIOS fires this to notify a Windows
>>>> application to handle the RF switch.
>>>>
>>>> On Linux, there is no such application. This patch implements
>>>> a toggle for all RF devices through accessing the EC I/O ports.
>>>>
>>>> Without the explicit EC commands, the wifi LED is always on.
>>>>
>>>> Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
>>>> ---
>>>> drivers/platform/x86/ideapad-laptop.c | 6 +++++-
>>>> 1 files changed, 5 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
>>>> index 820f013..5e1e971 100644
>>>> --- a/drivers/platform/x86/ideapad-laptop.c
>>>> +++ b/drivers/platform/x86/ideapad-laptop.c
>>>> @@ -461,7 +461,11 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)
>>>> if (test_bit(vpc_bit, &vpc1)) {
>>>> if (vpc_bit == 9)
>>>> ideapad_sync_rfk_state(adevice);
>>>> - else if (vpc_bit == 4)
>>>> + else if (vpc_bit == 13) {
>>>> + read_ec_data(handle, 0x23, &vpc2);
>>>> + write_ec_cmd(handle, 0x24, !vpc2);
>>>> + ideapad_sync_rfk_state(adevice);
>>>> + } else if (vpc_bit == 4)
>>>> read_ec_data(handle, 0x12, &vpc2);
>>>> else if (vpc_bit == 1) {
>>>> } else
>>>
>>> I think its better to implement the changes in ideapad_sync_rfk_state() because we have
>>> read switch status there. It is not necessary to read the same data twice in an event.
>>>
>>>
>>
>> Current ideapad_sync_rfk_state() code does not really toggle the
>> hardware swtich (I mean to write_ec_cmd with 0x24 command). It just
>> assumes that the BIOS or EC is responsible for the wifi switch-on/-off
>> and reports the state via rfkill_set_hw_state().
>>
>> In my case, without explicit sending the 0x24 command to turn off the
>> radio device, the wifi LED is always on.
>>
>> Though it might not be true or applicable on ideapads, in my last
>> experience on Dell laptops that to switch off the RF radio in the
>> driver while the hardware claims to control it can cause some mess-up.
>>
>> So to be safe I prefer not to move the toggle code in ideapad_sync_rfk_state().
>>
>> Thanks,
>> -kengyu
>>
>
> Look twice and I do not think this patch is acceptable.
>
> vpc_bit 13 is soft block key event (Fn+F5) and read_ec_data from 0x23 is
> hardware switch status. This patch will mask the key report of inputdev
> and to force update switch status in EC (0x24) is not a reasonable solution.
>
In fact quite a few things involved in this:
since we get notified with VPC bit 13 set when Fn+F5 is pressed, I
think that it is ok to be treated as a hardware rfkill
blocking/unblocking.
However it is true that the bit/event is supposed be to be handled by
an application in Windows, it is a soft-killswitch by the definition.
Yet currently there is no such correspondent userspace app/daemon as I
know. This inspired the original intention of the patch, to handle the
app-controlled rfkill in the driver. I think that this is probably
common in other platform-x86 drivers.
I'd rather agree with you that it is a better idea to report a keycode.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] ideapad-laptop: Ignore an unused VPC notification
2011-06-28 13:35 [PATCH 1/2] ideapad-laptop: Ignore an unused VPC notification Keng-Yu Lin
2011-06-28 13:35 ` [PATCH 2/2] ideapad-laptop: Handle the App-controlled RF event Keng-Yu Lin
2011-06-29 14:26 ` [PATCH 1/2] ideapad-laptop: Ignore an unused VPC notification Ike Panhc
@ 2011-07-07 15:10 ` Matthew Garrett
2011-07-11 7:29 ` Keng-Yü Lin
2 siblings, 1 reply; 13+ messages in thread
From: Matthew Garrett @ 2011-07-07 15:10 UTC (permalink / raw)
To: Keng-Yu Lin
Cc: platform-driver-x86, linux-kernel, ike.pan, vanhoof, kent.lin,
sylee
On Tue, Jun 28, 2011 at 02:35:53PM +0100, Keng-Yu Lin wrote:
> BIOS fires notifications in a constant period with VPC bit 1 set when the
> power cord is unplugged.
How frequently? That's going to do bad things to power management. It'd
be nice to find a way to just make it stop doing that.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] ideapad-laptop: Handle the App-controlled RF event
2011-06-28 13:35 ` [PATCH 2/2] ideapad-laptop: Handle the App-controlled RF event Keng-Yu Lin
2011-06-29 13:56 ` Ike Panhc
@ 2011-07-07 15:11 ` Matthew Garrett
2011-07-08 9:52 ` Joey Lee
1 sibling, 1 reply; 13+ messages in thread
From: Matthew Garrett @ 2011-07-07 15:11 UTC (permalink / raw)
To: Keng-Yu Lin
Cc: platform-driver-x86, linux-kernel, ike.pan, vanhoof, kent.lin,
sylee
On Tue, Jun 28, 2011 at 02:35:54PM +0100, Keng-Yu Lin wrote:
> On Linux, there is no such application. This patch implements
> a toggle for all RF devices through accessing the EC I/O ports.
Sure there is. Either the kernel can handle it via rfkill-input, or
rfkilld can look after it. Please don't add your own implementation.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/2] ideapad-laptop: Handle the App-controlled RF event
2011-07-07 15:11 ` Matthew Garrett
@ 2011-07-08 9:52 ` Joey Lee
0 siblings, 0 replies; 13+ messages in thread
From: Joey Lee @ 2011-07-08 9:52 UTC (permalink / raw)
To: kengyu
Cc: ike.pan, kent.lin, sylee, vanhoof, mjg59, linux-kernel,
platform-driver-x86
Hi Keng-Yu,
於 四,2011-07-07 於 16:11 +0100,Matthew Garrett 提到:
> On Tue, Jun 28, 2011 at 02:35:54PM +0100, Keng-Yu Lin wrote:
>
> > On Linux, there is no such application. This patch implements
> > a toggle for all RF devices through accessing the EC I/O ports.
>
> Sure there is. Either the kernel can handle it via rfkill-input, or
> rfkilld can look after it. Please don't add your own implementation.
>
Welcome to use urfkill deaemon:
http://www.freedesktop.org/wiki/Software/urfkill
Thank's a lot!
Joey
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] ideapad-laptop: Ignore an unused VPC notification
2011-07-07 15:10 ` Matthew Garrett
@ 2011-07-11 7:29 ` Keng-Yü Lin
2011-07-11 15:50 ` Matthew Garrett
0 siblings, 1 reply; 13+ messages in thread
From: Keng-Yü Lin @ 2011-07-11 7:29 UTC (permalink / raw)
To: Matthew Garrett
Cc: platform-driver-x86, linux-kernel, ike.pan, vanhoof, kent.lin,
sylee
On Thu, Jul 7, 2011 at 11:10 PM, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> On Tue, Jun 28, 2011 at 02:35:53PM +0100, Keng-Yu Lin wrote:
>> BIOS fires notifications in a constant period with VPC bit 1 set when the
>> power cord is unplugged.
>
> How frequently? That's going to do bad things to power management. It'd
> be nice to find a way to just make it stop doing that.
>
About every 22 seconds.
May 18 13:46:36 ubuntu-Rev-1-0 kernel: [ 1359.734293] keyboard: can't
emulate rawmode for keycode 240
May 18 13:46:36 ubuntu-Rev-1-0 kernel: [ 1359.734324] keyboard: can't
emulate rawmode for keycode 240
May 18 13:46:58 ubuntu-Rev-1-0 kernel: [ 1382.195371] keyboard: can't
emulate rawmode for keycode 240
May 18 13:46:58 ubuntu-Rev-1-0 kernel: [ 1382.195388] keyboard: can't
emulate rawmode for keycode 240
May 18 13:47:21 ubuntu-Rev-1-0 kernel: [ 1404.650451] keyboard: can't
emulate rawmode for keycode 240
May 18 13:47:21 ubuntu-Rev-1-0 kernel: [ 1404.650470] keyboard: can't
emulate rawmode for keycode 240
May 18 13:47:43 ubuntu-Rev-1-0 kernel: [ 1427.103195] keyboard: can't
emulate rawmode for keycode 240
May 18 13:47:43 ubuntu-Rev-1-0 kernel: [ 1427.103214] keyboard: can't
emulate rawmode for keycode 240
May 18 13:48:06 ubuntu-Rev-1-0 kernel: [ 1449.568874] keyboard: can't
emulate rawmode for keycode 240
May 18 13:48:06 ubuntu-Rev-1-0 kernel: [ 1449.568884] keyboard: can't
emulate rawmode for keycode 240
May 18 13:48:28 ubuntu-Rev-1-0 kernel: [ 1472.103599] keyboard: can't
emulate rawmode for keycode 240
May 18 13:48:28 ubuntu-Rev-1-0 kernel: [ 1472.103612] keyboard: can't
emulate rawmode for keycode 240
(skip)
It'd be ideal if we can find the real use of the notification and
assign it a corresponding keycode, but now I am not able to find any.
Since it occurs in a period when AC cord unplugged, I suspect it is
just a notification to the Windows App, probably due to that the App
is badly written and the App does not want to poll the battery
information. In Linux the userspace can access the battery information
in an easier way through the ACPI proc/sysfs and it is probably not
true in Windows. It could be the reason/purpose why this notification
is sent in a period.
If so, it should be safe to filter out.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/2] ideapad-laptop: Ignore an unused VPC notification
2011-07-11 7:29 ` Keng-Yü Lin
@ 2011-07-11 15:50 ` Matthew Garrett
0 siblings, 0 replies; 13+ messages in thread
From: Matthew Garrett @ 2011-07-11 15:50 UTC (permalink / raw)
To: Keng-Yü Lin
Cc: platform-driver-x86, linux-kernel, ike.pan, vanhoof, kent.lin,
sylee
On Mon, Jul 11, 2011 at 03:29:09PM +0800, Keng-Yü Lin wrote:
> On Thu, Jul 7, 2011 at 11:10 PM, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> > On Tue, Jun 28, 2011 at 02:35:53PM +0100, Keng-Yu Lin wrote:
> >> BIOS fires notifications in a constant period with VPC bit 1 set when the
> >> power cord is unplugged.
> >
> > How frequently? That's going to do bad things to power management. It'd
> > be nice to find a way to just make it stop doing that.
> >
>
> About every 22 seconds.
Ok, this seems fair then.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2011-07-11 15:50 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-28 13:35 [PATCH 1/2] ideapad-laptop: Ignore an unused VPC notification Keng-Yu Lin
2011-06-28 13:35 ` [PATCH 2/2] ideapad-laptop: Handle the App-controlled RF event Keng-Yu Lin
2011-06-29 13:56 ` Ike Panhc
2011-06-30 10:34 ` Keng-Yü Lin
2011-07-05 7:26 ` Ike Panhc
2011-07-05 11:42 ` Keng-Yü Lin
2011-07-07 15:11 ` Matthew Garrett
2011-07-08 9:52 ` Joey Lee
2011-06-29 14:26 ` [PATCH 1/2] ideapad-laptop: Ignore an unused VPC notification Ike Panhc
2011-06-30 10:17 ` Keng-Yü Lin
2011-07-07 15:10 ` Matthew Garrett
2011-07-11 7:29 ` Keng-Yü Lin
2011-07-11 15:50 ` Matthew Garrett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox