X86 platform drivers
 help / color / mirror / Atom feed
From: Mario Limonciello <superm1@kernel.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: mario.limonciello@amd.com, Shyam-sundar.S-k@amd.com,
	hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com,
	Patil.Reddy@amd.com, Armin Wolf <W_Armin@gmx.de>,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH v5] drivers/platform/x86/amd: pmf: Update screen lock actions to KEY_SCREENSAVER
Date: Mon, 28 Apr 2025 17:41:52 -0500	[thread overview]
Message-ID: <1a7ebbbb-f1c5-4233-b0e7-b3aca8b9bc69@kernel.org> (raw)
In-Reply-To: <ycqzbmktzlbxzcfktuoqvswtrlkpbx6yi6hcej5z4zcmausb22@3xqydbuueu57>

On 4/28/2025 5:05 PM, Dmitry Torokhov wrote:
> Hi Mario,
> 
> On Mon, Apr 28, 2025 at 03:03:57PM -0500, Mario Limonciello wrote:
>> From: Mario Limonciello <mario.limonciello@amd.com>
>>
>> Screen lock actions are ignored by popular desktop environments currently.
>> This is because `KEY_SCREENLOCK` is not one of the legacy keys that popular
>> desktop environments listen to by default, `KEY_SCREENSAVER` is.
>>
>> Adjust the PMF driver to use the correct keycode.
>>
>> Cc: Hans de Goede <hdegoede@redhat.com>
>> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>> Cc: Armin Wolf <W_Armin@gmx.de>
>> Fixes: 4c92d448e3e61 ("platform/x86/amd/pmf: Use existing input event codes to update system states")
>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>> ---
>> v5:
>>   * As Dmitry pointed out that GNOME listens to multiple keys even if not advertised
>>     it meant there was a bug either in GNOME or the PMF driver.  Turns out it's in the PMF driver!
>>     Switch key combinations instead of using META+L
> 
> No, KEY_SCREENLOCK is the proper keycode, as you can infer from multiple
> instances of it in the kernel sources and only single KEY_SCREENSAVER in
> the code for an infrared remote controller.
> 
> X for ages mapped keycode 160 (152 KEY_SCREENSAVER/KEY_COFFEE + 8
> evdev offset compared to legacy XKB numbering) to COFFEE aka
> XF86ScreenSaver, and I still see it mapped on my system(s):
> 
> KeyRelease event, serial 42, synthetic NO, window 0x5200001,
>      root 0x4f4, subw 0x0, time 491884600, (89,58), root:(1920,1044),
>      state 0x0, keycode 160 (keysym 0x1008ff2d, XF86ScreenSaver), same_screen YES,
>      XLookupString gives 0 bytes:
>      XFilterEvent returns: False
> 
> And I also see it working in both KDE X11 and KDE Wayland. So again, it
> is either Gnome breakage or something wrong with your system. The change
> to PMF driver should not be necessary.
> 
> Thanks.
> 


OK in that case let me first move over to a newer version of GNOME than 
comes with Ubuntu LTS.

      reply	other threads:[~2025-04-28 22:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-28 20:03 [PATCH v5] drivers/platform/x86/amd: pmf: Update screen lock actions to KEY_SCREENSAVER Mario Limonciello
2025-04-28 22:05 ` Dmitry Torokhov
2025-04-28 22:41   ` Mario Limonciello [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a7ebbbb-f1c5-4233-b0e7-b3aca8b9bc69@kernel.org \
    --to=superm1@kernel.org \
    --cc=Patil.Reddy@amd.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=W_Armin@gmx.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=mario.limonciello@amd.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox