tegra-nvpmodel: update nvpmodel.service unit file

* Fix the service type to be oneshot, with RemainAfterExit
  set to true.  Trying to execute nvpmodel multiple times
  leads to spurious failures.

* Add a dependency on nvpower.service, following how Jetson
  Linux does. Evidently the nvpower script now performs some
  setup the nvpmodel needs, which wasn't true in older L4T
  versions.

Signed-off-by: Matt Madison <matt@madison.systems>
This commit is contained in:
Matt Madison
2023-07-15 06:48:22 -07:00
committed by Matt Madison
parent 3c459ad29c
commit 1e589d0223
2 changed files with 5 additions and 5 deletions

View File

@@ -1,13 +1,13 @@
[Unit]
Description=NVIDIA power model daemon
Requires=nvstartup.service
After=nvstartup.service
Requires=nvstartup.service nvpower.service
After=nvstartup.service nvpower.service
Before=graphical.target display-manager.service
[Service]
Type=simple
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/nvpmodel -f /etc/nvpmodel.conf
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@@ -24,4 +24,4 @@ inherit systemd update-rc.d
INITSCRIPT_NAME = "nvpmodel"
INITSCRIPT_PARAMS = "defaults"
SYSTEMD_SERVICE:${PN} = "nvpmodel.service"
RDEPENDS:${PN} = "tegra-nvpmodel-base"
RDEPENDS:${PN} = "tegra-nvpmodel-base tegra-nvpower"