mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
d0ba7ad438
PMF driver based on the output actions from the TA can request to update the system states like entering s0i3, lock screen etc. by generating an uevent. Based on the udev rules set in the userspace the event id matching the uevent shall get updated accordingly using the systemctl. Sample udev rules under Documentation/admin-guide/pmf.rst. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Link: https://lore.kernel.org/r/20231212014705.2017474-9-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
25 lines
1016 B
ReStructuredText
25 lines
1016 B
ReStructuredText
.. SPDX-License-Identifier: GPL-2.0
|
|
|
|
Set udev rules for PMF Smart PC Builder
|
|
---------------------------------------
|
|
|
|
AMD PMF(Platform Management Framework) Smart PC Solution builder has to set the system states
|
|
like S0i3, Screen lock, hibernate etc, based on the output actions provided by the PMF
|
|
TA (Trusted Application).
|
|
|
|
In order for this to work the PMF driver generates a uevent for userspace to react to. Below are
|
|
sample udev rules that can facilitate this experience when a machine has PMF Smart PC solution builder
|
|
enabled.
|
|
|
|
Please add the following line(s) to
|
|
``/etc/udev/rules.d/99-local.rules``::
|
|
|
|
DRIVERS=="amd-pmf", ACTION=="change", ENV{EVENT_ID}=="0", RUN+="/usr/bin/systemctl suspend"
|
|
DRIVERS=="amd-pmf", ACTION=="change", ENV{EVENT_ID}=="1", RUN+="/usr/bin/systemctl hibernate"
|
|
DRIVERS=="amd-pmf", ACTION=="change", ENV{EVENT_ID}=="2", RUN+="/bin/loginctl lock-sessions"
|
|
|
|
EVENT_ID values:
|
|
0= Put the system to S0i3/S2Idle
|
|
1= Put the system to hibernate
|
|
2= Lock the screen
|