lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <98ffacc8-d13a-49b6-bcfd-f3cc35224b79@redhat.com>
Date: Mon, 28 Apr 2025 16:10:52 +0200
From: Hans de Goede <hdegoede@...hat.com>
To: Mario Limonciello <superm1@...nel.org>,
 Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Pavel Machek <pavel@....cz>, Shyam Sundar S K <Shyam-sundar.S-k@....com>,
 Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
 "open list:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)..."
 <linux-input@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>,
 "open list:AMD PMF DRIVER" <platform-driver-x86@...r.kernel.org>,
 Mario Limonciello <mario.limonciello@....com>, Armin Wolf <W_Armin@....de>
Subject: Re: [PATCH v4 1/2] Input: Add a Kconfig to emulate KEY_SCREENLOCK
 with META + L

Hi Mario,

On 28-Apr-25 15:50, Mario Limonciello wrote:
> On 4/28/2025 12:51 AM, Dmitry Torokhov wrote:
>> On Sun, Apr 27, 2025 at 10:30:24PM -0700, Dmitry Torokhov wrote:
>>> Apologies for extended absence...
>>>
>>> On Sun, Apr 27, 2025 at 07:15:31AM -0500, Mario Limonciello wrote:
>>>>
>>>>
>>>> On 4/27/25 01:10, Pavel Machek wrote:
>>>>> Hi!
>>>>>
>>>>>>>>>> In the PC industry KEY_SCREENLOCK isn't used as frequently as it used
>>>>>>>>>> to be. Modern versions of Windows [1], GNOME and KDE support "META" + "L"
>>>>>>>>>> to lock the screen. Modern hardware [2] also sends this sequence of
>>>>>>>>>> events for keys with a silkscreen for screen lock.
>>>>>>>>>>
>>>>>>>>>> Introduced a new Kconfig option that will change KEY_SCREENLOCK when
>>>>>>>>>> emitted by driver to META + L.
>>>>>>>>>
>>>>>>>>> Fix gnome and kde, do not break kernel...
>>>>>>>>
>>>>>>>> I'm sorry; fix them to do what exactly?  Switch to KEY_SCREENLOCK?
>>>>>>>>
>>>>>>>> That's going to break modern hardware lockscreen keys.  They've all
>>>>>>>> obviously moved to META+L because that's what hardware today uses.
>>>
>>> Vendors do all kind of weird things. They want to ship their
>>> peripherals here and now and they do not care of shortcuts will change a
>>> few years down the road.
>>>
>>> FWIW there are plenty of external keyboards that use KEY_SCREENLOCK and
>>> do not emit any shortcurts. Anything that is "Woks with Chromebooks"
>>> will use KEY_SCREENLOCK.
>>>
>>>
>>>>>>>
>>>>>>> Gnome / KDE should accept either META+L _or_ KEY_SCREENLOCK to do the
>>>>>>> screen locking, no?
>>>
>>> KDE by default recognizes Meta+L combination (which used to be
>>> Alt+Ctrl+L), Screensaver key, and allows users to define their custom
>>> shortcuts.
>>>
>>> I also wonder how many other DEs beside Gnome do not recognize
>>> KEY_SCREENLOCK.
>>
>> So I poked around Gnome a bit. According to the gnome-settings-daemon
>> source code KEY_SCREENLOCK should be recognized. It is set up as
>> "screensaver-static" key which is hidden and shoudl not be changed by
>> user:
>>
>> https://github.com/GNOME/gnome-settings-daemon/blob/master/data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in#L504
>>
>>      <key name="screensaver-static" type="as">
>>        <default>['XF86ScreenSaver']</default>
>>        <summary>Lock screen</summary>
>>        <description>Static binding to lock the screen.</description>
>>      </key>
>>
>>
>>
>>>
>>>>>>
>>>>>> This was actually the first path I looked down before I even started the
>>>>>> kernel patch direction for this problem.
>>>>>>
>>>>>> GNOME doesn't support assigning more than one shortcut key for an action.
>>
>> It sure does even if it is not shown in UI. Poke around with
>> dconf-editor and look in /org/gnome/settings-daemon/plugins/media-keys/
>> and you will see plenty of "*-static" keys with multiple
>> keycodes/shortcuts assigned.
>>
>> "touchpad-toggle-static" - ['XF86TouchpadToggle', '<Ctrl><Super>XF86TouchpadToggle']
>> "rotate-video-lock-static" - ['<Super>o', 'XF86RotationLockToggle']
>>
>> and so on...
>>
>> Maybe Gnome broke screen lock key in recent release?
>>
>> Thanks.
>>
> 
> Thanks for your feedback and looking into what GNOME is doing.  It sure /sounds/ like this should have worked with no kernel changes and GNOME has a bug with the lock screen key.

My guess is that maybe at some point the lock-key (combo) handling has moved from
gnome-settings-daemon into mutter and maybe things broke at that point ?
 
> I'll abandon the kernel series.

Agreed, the GNOME bug needs to be fixed regardless of AMD PMF use.

Regards,

Hans



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ