Commit | Line | Data |
---|---|---|
d0ba7ad4 SS |
1 | .. SPDX-License-Identifier: GPL-2.0 |
2 | ||
3 | Set udev rules for PMF Smart PC Builder | |
4 | --------------------------------------- | |
5 | ||
6 | AMD PMF(Platform Management Framework) Smart PC Solution builder has to set the system states | |
7 | like S0i3, Screen lock, hibernate etc, based on the output actions provided by the PMF | |
8 | TA (Trusted Application). | |
9 | ||
10 | In order for this to work the PMF driver generates a uevent for userspace to react to. Below are | |
11 | sample udev rules that can facilitate this experience when a machine has PMF Smart PC solution builder | |
12 | enabled. | |
13 | ||
14 | Please add the following line(s) to | |
15 | ``/etc/udev/rules.d/99-local.rules``:: | |
16 | ||
17 | DRIVERS=="amd-pmf", ACTION=="change", ENV{EVENT_ID}=="0", RUN+="/usr/bin/systemctl suspend" | |
18 | DRIVERS=="amd-pmf", ACTION=="change", ENV{EVENT_ID}=="1", RUN+="/usr/bin/systemctl hibernate" | |
19 | DRIVERS=="amd-pmf", ACTION=="change", ENV{EVENT_ID}=="2", RUN+="/bin/loginctl lock-sessions" | |
20 | ||
21 | EVENT_ID values: | |
22 | 0= Put the system to S0i3/S2Idle | |
23 | 1= Put the system to hibernate | |
24 | 2= Lock the screen |