diff options
author | Sylvain Pineau <sylvain.pineau@canonical.com> | 2022-04-12 09:40:54 +0200 |
---|---|---|
committer | Sylvain Pineau <sylvain.pineau@canonical.com> | 2022-04-12 09:40:54 +0200 |
commit | 6cf5876f57aa990e3d6a5257fdc6fee70a8886e1 (patch) | |
tree | a4ff7baf99219129a5c1bf2bf6775cf0a45caf6e /units | |
parent | 8cbb8b6c097e03a068ea2a1c1d1dcaff8e0649a9 (diff) |
units:graphics: Use inxi on wayland sessions to display driver info
graphics_driver.py does not work on wayland since it parses Xorg log files. Fixes: lp:1968641
Diffstat (limited to 'units')
-rw-r--r-- | units/graphics/jobs.pxu | 7 | ||||
-rw-r--r-- | units/graphics/legacy.pxu | 8 | ||||
-rw-r--r-- | units/suspend/suspend-graphics.pxu | 6 |
3 files changed, 19 insertions, 2 deletions
diff --git a/units/graphics/jobs.pxu b/units/graphics/jobs.pxu index d67af9e..185193b 100644 --- a/units/graphics/jobs.pxu +++ b/units/graphics/jobs.pxu @@ -7,7 +7,12 @@ id: graphics/{index}_driver_version_{product_slug} command: # shellcheck disable=SC1091 source graphics_env.sh {driver} {index} - graphics_driver.py + if [[ $XDG_SESSION_TYPE == "wayland" ]] + then + inxi_snapshot -Gazy + else + graphics_driver.py + fi estimated_duration: 0.5 _description: Parses Xorg.0.log and discovers the running X driver and version for the {vendor} {product} graphics card _summary: Test X driver/version for {vendor} {product} diff --git a/units/graphics/legacy.pxu b/units/graphics/legacy.pxu index c2f2b53..14969b0 100644 --- a/units/graphics/legacy.pxu +++ b/units/graphics/legacy.pxu @@ -1,7 +1,13 @@ plugin: shell category_id: com.canonical.plainbox::graphics id: graphics/driver_version -command: graphics_driver.py +command: + if [[ $XDG_SESSION_TYPE == "wayland" ]] + then + inxi_snapshot -Gazy + else + graphics_driver.py + fi estimated_duration: 0.500 _description: Parses Xorg.0.Log and discovers the running X driver and version _summary: Test X driver/version diff --git a/units/suspend/suspend-graphics.pxu b/units/suspend/suspend-graphics.pxu index 22012ec..4095273 100644 --- a/units/suspend/suspend-graphics.pxu +++ b/units/suspend/suspend-graphics.pxu @@ -208,6 +208,12 @@ command: # shellcheck disable=SC1091 source graphics_env.sh {{ driver }} {{ index }} graphics_driver.py + if [[ $XDG_SESSION_TYPE == "wayland" ]] + then + inxi_snapshot -Gazy + else + graphics_driver.py + fi estimated_duration: 0.500 _description: Parses Xorg.0.Log and discovers the running X driver and version after suspend for the {{ vendor }} {{ product }} graphics card _summary: Test X driver/version after suspend for {{ vendor }} {{ product }} |