Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2048628

Summary: Side volume buttons do not work on HP x360 15 bl000 when folded back
Product: Red Hat Enterprise Linux 8 Reporter: Tiger Kaovilai <tkaovila>
Component: libinputAssignee: Peter Hutterer <peter.hutterer>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 8.5CC: hdegoede, linux, ndegraef
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-31 07:28:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Side volume button for reference. none

Description Tiger Kaovilai 2022-01-31 16:10:43 UTC
Created attachment 1858097 [details]
Side volume button for reference.

Description of problem: When in convertible modes such as tent or presentation mode.. keyboard is disabled as expected but the volume keys on the side are unexpectedly disabled as well.


Version-Release number of selected component (if applicable):


How reproducible: Everytime


Steps to Reproduce:
1. Fold back keyboard
2. Try to use side mounted volume keys

Actual results: No volume changes


Expected results: Volume changes


Additional info:

Comment 1 Tomas Popela 2022-02-01 08:08:09 UTC
@hdegoede any idea to which component this should be moved? kernel?

Comment 2 Hans de Goede 2022-02-01 11:36:18 UTC
Passawit,

I think I know what is going on, please try the following from a terminal, with the device being in normal / laptop mode:

1. "sudo dnf install evemu"

2. "sudo evemu-record"

And then select the "AT Translated Set 2 keyboard" device.

3. Now try pressing the side volume-buttons, do these generate events in evemu-record ?

4. Try pressing the 'Q' key does this generate events ?

5. Now fold the keyboard back

6. Try pressing the side volume-buttons, do these still generate events in evemu-record  ?

7. Try pressing the 'Q' key again, does this still generate events in evemu-record ?


I expect the answers to the questions from 3, 4, 6 and 7 to be:

3. Yes
4. Yes
6. Yes
7. No

What I assume is happening here is that HP has routed the volume-buttons through the standard "AT Translated Set 2 keyboard" device also used by the builtin keyboard.

libinput will ignore events from the builtin keyboard when it detects (1) that the device is in tablet-mode, this is intended to avoid spurious keypresses being reported when the keyboard is folded back. Since the volume button events are coming from the same input-device this causes them to also get ignored.

Assuming that the answer to 7. is "No" then the embedded-controller is taking care of suppressing key-presses of the keyboard itself.

If all my assumptions above are correct then what is necessary to fix this is adding a quirk to libinput telling it to not suspend keyboard events while in tablet mode.

/usr/share/libinput/50-system-hp.quirks

Already has a quirk for this for another HP x360 model:

# The HP stream x360's embedded-controller filters out events form its builtin
# keyboard when in tablet-mode itself; and it has a capacitive home-button
# (windows logo) underneath its display which also sends PS/2 key-events.
# Do not suspend the keyboard when in tablet-mode so that the home button
# keeps working when in tablet-mode.
[HP Stream x360 11]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*:svnHewlett-Packard:pnHPStreamx360ConvertiblePC11:*
ModelTabletModeNoSuspend=1

Adding a similar entry there and then logging out + logging in again should fix this I believe. To find the right string to put in the MatchDMIModalias do:

cat /sys/class/dmi/id/modalias

Note please only use the "svnHewlett-Packard:pn...: part as done for the already existing entry.




1) through SW_TABLET_MODE reported by one of the other devices in evemu-record

Comment 3 Tiger Kaovilai 2022-02-02 08:24:42 UTC
3 Yes
4 Yes
6 Yes
7 No

This is the entry added.
[HP Spectre x360 Convertible 15-bl000]
MatchName=AT Translated Set 2 keyboard
MatchDMIModalias=dmi:*:svnHP:pnHPSpectrex360Convertible15-bl0XX:*
ModelTabletModeNoSuspend=1

Comment 4 Tiger Kaovilai 2022-02-02 08:27:11 UTC
Ok, you're spot on. Issue resolved. Please commit the changes entry to upstream/downstream.

Cheers!

Comment 5 Tiger Kaovilai 2022-02-02 08:32:44 UTC
Made merge request https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/741

Comment 6 Tiger Kaovilai 2022-02-02 08:37:28 UTC
Do you know when changes will arrive downstream?

Comment 7 Peter Hutterer 2022-02-25 03:01:38 UTC
Passawit: you can copy the additions into /etc/libinput/local-overrides.quirks and libinput will pick it up from there. There is no immediate timeframe for this to land in RHEL8.

Comment 11 Norman 2023-07-30 17:07:23 UTC
(In reply to Hans de Goede from comment #2)
> Passawit,
> 
> I think I know what is going on, please try the following from a terminal,
> with the device being in normal / laptop mode:
> 
> 1. "sudo dnf install evemu"
> 
> 2. "sudo evemu-record"
> 
> And then select the "AT Translated Set 2 keyboard" device.
> 
> 3. Now try pressing the side volume-buttons, do these generate events in
> evemu-record ?
> 
> 4. Try pressing the 'Q' key does this generate events ?
> 
> 5. Now fold the keyboard back
> 
> 6. Try pressing the side volume-buttons, do these still generate events in
> evemu-record  ?
> 
> 7. Try pressing the 'Q' key again, does this still generate events in
> evemu-record ?
> 
> 
> I expect the answers to the questions from 3, 4, 6 and 7 to be:
> 
> 3. Yes
> 4. Yes
> 6. Yes
> 7. No
> 
> What I assume is happening here is that HP has routed the volume-buttons
> through the standard "AT Translated Set 2 keyboard" device also used by the
> builtin keyboard.
> 
> libinput will ignore events from the builtin keyboard when it detects (1)
> that the device is in tablet-mode, this is intended to avoid spurious
> keypresses being reported when the keyboard is folded back. Since the volume
> button events are coming from the same input-device this causes them to also
> get ignored.
> 
> Assuming that the answer to 7. is "No" then the embedded-controller is
> taking care of suppressing key-presses of the keyboard itself.
> 
> If all my assumptions above are correct then what is necessary to fix this
> is adding a quirk to libinput telling it to not suspend keyboard events
> while in tablet mode.
> 
> /usr/share/libinput/50-system-hp.quirks
> 
> Already has a quirk for this for another HP x360 model:
> 
> # The HP stream x360's embedded-controller filters out events form its
> builtin
> # keyboard when in tablet-mode itself; and it has a capacitive home-button
> # (windows logo) underneath its display which also sends PS/2 key-events.
> # Do not suspend the keyboard when in tablet-mode so that the home button
> # keeps working when in tablet-mode.
> [HP Stream x360 11]
> MatchName=AT Translated Set 2 keyboard
> MatchDMIModalias=dmi:*:svnHewlett-Packard:pnHPStreamx360ConvertiblePC11:*
> ModelTabletModeNoSuspend=1
> 
> Adding a similar entry there and then logging out + logging in again should
> fix this I believe. To find the right string to put in the MatchDMIModalias
> do:
> 
> cat /sys/class/dmi/id/modalias
> 
> Note please only use the "svnHewlett-Packard:pn...: part as done for the
> already existing entry.
> 
> 
> 
> 
> 1) through SW_TABLET_MODE reported by one of the other devices in
> evemu-record

THis also works for HP Spectre x360  15-ch0xx. Thanks :D

Comment 12 RHEL Program Management 2023-07-31 07:28:12 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.