summaryrefslogtreecommitdiff
diff options
authorPMR <pmr@pmr-lander>2017-11-15 13:15:43 +0000
committerPMR <pmr@pmr-lander>2017-11-15 13:15:43 +0000
commitc998cff9785c5cf41bee57ec02a422a6ce81afff (patch)
tree056edcc77e0b4105c7f8fc89630102ff446a6a13
parent5d3a92c709daa58308c53a571ebf4c24ee5e7212 (diff)
parentd4238c8e0577fcdc32659ddf5147348ee8ba57ba (diff)
Merge #333607 from ~kissiel/plainbox-provider-checkbox:automated-switch-gpu-job
-rw-r--r--units/graphics/jobs.pxu15
1 files changed, 15 insertions, 0 deletions
diff --git a/units/graphics/jobs.pxu b/units/graphics/jobs.pxu
index ee0a938..9a24590 100644
--- a/units/graphics/jobs.pxu
+++ b/units/graphics/jobs.pxu
@@ -524,3 +524,18 @@ estimated_duration: 1.0
command: [ -f $PLAINBOX_SESSION_SHARE/screen-capture-{index}.png ] && base64 $PLAINBOX_SESSION_SHARE/screen-capture-{index}.png
_description: Attaches the simple screen capture file of {vendor} {product}
+unit: template
+template-resource: graphics_card
+category_id: com.canonical.plainbox::graphics
+id: graphics/{index}_auto_switch_card_{product_slug}
+requires:
+ graphics_card.driver in ['nvidia', 'amdgpu-pro']
+_summary: Switch GPU to {vendor} {product} and reboot
+_purpose:
+ Switch GPU to {vendor} {product} and reboot the machine
+plugin: shell
+user: root
+command:
+ {switch_to_cmd}
+ pm_test --silent --checkbox-respawn-cmd $PLAINBOX_SESSION_SHARE/__respawn_checkbox reboot --log-level=debug --log-dir=$PLAINBOX_SESSION_SHARE
+flags: noreturn preserve-locale