Skip to content

Commit

Permalink
tegra-nvpmodel: update nvpmodel.service unit file
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
madisongh committed Jul 15, 2023
1 parent 7479f93 commit 5b426d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions recipes-bsp/tegra-binaries/tegra-nvpmodel/nvpmodel.service
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion recipes-bsp/tegra-binaries/tegra-nvpmodel_35.3.1.bb
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 5b426d3

Please sign in to comment.