Please consider this patch for HP ProBooks, which do not send a key
release for brightness keys, as a result, the brightness keys are not
typematic. This quirk fixes that issue.
This patch was tested by me and found to work on HP ProBooks.
HP ProBooks do not send a key release for brightness keys, as a
result, brightness does not move up/down when the brightness key
is held down. This quirk makes the brightness keys on HP ProBooks
typematic.
Signed-off-by: Manoj Iyer <[email protected]>
---
drivers/input/keyboard/atkbd.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index e05a2e7..b910822 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -951,6 +951,14 @@ static unsigned int atkbd_volume_forced_release_keys[] = {
};
/*
+ * Perform fixup for systems that do not generate key release event
+ * for brightness up/down keys.
+ */
+static unsigned int atkbd_brightness_forced_release_keys[] = {
+ 0x92, 0x97, -1U
+};
+
+/*
* OQO 01+ multimedia keys (64--66) generate e0 6x upon release whereas
* they should be generating e4-e6 (0x80 | code).
*/
@@ -1666,6 +1674,14 @@ static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = {
.driver_data = atkbd_volume_forced_release_keys,
},
{
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "HP ProBook"),
+ },
+ .callback = atkbd_setup_forced_release,
+ .driver_data = atkbd_brightness_forced_release_keys,
+ },
+ {
/* Inventec Symphony */
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "INVENTEC"),
--
1.7.9
On Tue, Feb 28, 2012 at 06:36:10PM -0600, Manoj Iyer wrote:
> HP ProBooks do not send a key release for brightness keys, as a
> result, brightness does not move up/down when the brightness key
> is held down. This quirk makes the brightness keys on HP ProBooks
> typematic.
>
> Signed-off-by: Manoj Iyer <[email protected]>
> ---
> drivers/input/keyboard/atkbd.c | 16 ++++++++++++++++
> 1 files changed, 16 insertions(+), 0 deletions(-)
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read Documentation/stable_kernel_rules.txt
for how to do this properly.
</formletter>
On Tue, Feb 28, 2012 at 04:46:04PM -0800, Greg KH wrote:
> On Tue, Feb 28, 2012 at 06:36:10PM -0600, Manoj Iyer wrote:
> > HP ProBooks do not send a key release for brightness keys, as a
> > result, brightness does not move up/down when the brightness key
> > is held down. This quirk makes the brightness keys on HP ProBooks
> > typematic.
> >
> > Signed-off-by: Manoj Iyer <[email protected]>
> > ---
> > drivers/input/keyboard/atkbd.c | 16 ++++++++++++++++
> > 1 files changed, 16 insertions(+), 0 deletions(-)
>
> <formletter>
>
> This is not the correct way to submit patches for inclusion in the
> stable kernel tree. Please read Documentation/stable_kernel_rules.txt
> for how to do this properly.
>
> </formletter>
Also, this should be handled from userspace by having usev write to
/sys/bus/serio/devices/serioX/force_release attribute on affected boxes.
--
Dmitry
Dimitry,
This quirk helps a few HP ProBooks to make brightness keys typematic. Can
you please tell me why you think its better handling this in user space? I
see other quirks similar to this in atkbd, just trying to understand. Yes,
we did quirk this in udev rules to make brightness keys works as expected.
But thought it might help others who see this issue with HP ProBooks by
quirking it in kernel.
Thanks
Manoj
On Tue, 28 Feb 2012, Dmitry Torokhov wrote:
> On Tue, Feb 28, 2012 at 04:46:04PM -0800, Greg KH wrote:
>> On Tue, Feb 28, 2012 at 06:36:10PM -0600, Manoj Iyer wrote:
>>> HP ProBooks do not send a key release for brightness keys, as a
>>> result, brightness does not move up/down when the brightness key
>>> is held down. This quirk makes the brightness keys on HP ProBooks
>>> typematic.
>>>
>>> Signed-off-by: Manoj Iyer <[email protected]>
>>> ---
>>> drivers/input/keyboard/atkbd.c | 16 ++++++++++++++++
>>> 1 files changed, 16 insertions(+), 0 deletions(-)
>>
>> <formletter>
>>
>> This is not the correct way to submit patches for inclusion in the
>> stable kernel tree. Please read Documentation/stable_kernel_rules.txt
>> for how to do this properly.
>>
>> </formletter>
>
> Also, this should be handled from userspace by having usev write to
> /sys/bus/serio/devices/serioX/force_release attribute on affected boxes.
>
> --
> Dmitry
>
>
--
====================
Manoj Iyer
Ubuntu/Canonical
Hardware Enablement
====================
Hi Manoj,
On Tue, Feb 28, 2012 at 11:56:22PM -0600, Manoj Iyer wrote:
> Dimitry,
>
> This quirk helps a few HP ProBooks to make brightness keys
> typematic. Can you please tell me why you think its better handling
> this in user space?
Because there are too many broken laptops to quirk them all in kernel as
every quirk takes non-swappable kernel memory whereas userspace solution
only takes disk space.
> I see other quirks similar to this in atkbd,
> just trying to understand.
These were added before I implemented support for allowing marking some
of the keys as "force release" via sysfs attribute.
> Yes, we did quirk this in udev rules to
> make brightness keys works as expected. But thought it might help
> others who see this issue with HP ProBooks by quirking it in kernel.
>
If you submit your quirk to udev maintainers you will help others
exactly the same as with kernel patch.
Thanks.
--
Dmitry
P.S. Please do not top post.
> If you submit your quirk to udev maintainers you will help others
> exactly the same as with kernel patch.
Thanks for clarifying, I will pursue this option.
>
> Thanks.
>
> --
> Dmitry
>
> P.S. Please do not top post.
>
>
--
====================
Manoj Iyer
Ubuntu/Canonical
Hardware Enablement
====================