canonical / canonical/checkbox
Graphics and monitor jobs have no graphical-session requirement, so they run and fail on server images
- Dominant language
- Python
- Stars
- 52
- Forks
- 81
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 69
Description
## Summary
Four `user-interact-verify` jobs in `providers/base` have no requirement that a
graphical session exists. On an Ubuntu 26.04 **server** image (no X, no Wayland
compositor, no GTK introspection data) they are still offered to the operator,
execute, and fail with missing-binary / missing-typelib / missing-D-Bus-name
errors rather than being skipped.
Affected jobs (all `plugin: user-interact-verify`, from
`providers/base/units/graphics/jobs.pxu` and
`providers/base/units/monitor/jobs.pxu` on `main`):
| Job | `requires:` on main |
|---|---|
| `graphics/cycle_resolution_primary` | *(none — only `environ:`)* |
| `graphics/rotation_primary` | *(none — only `environ:`)* |
| `graphics/maximum_resolution_primary` | `device.category == 'VIDEO'` |
| `monitor/powersaving` | *(none)* |
`device.category == 'VIDEO'` is satisfied on a headless server that has a
display controller, so it does not gate on a usable graphical session.
## Steps to Reproduce
1. Install an Ubuntu Server image with a display controller present but no
desktop stack (verified absent: `xorg`, `x11-utils`, `x11-xserver-utils`,
`gnome-shell`, `ubuntu-desktop`, `gir1.2-gtk-3.0`).
2. Run a test plan that includes the four jobs above.
3. Observe that the jobs are presented and executed instead of skipped.
## Expected Result
On a system with no graphical session, these jobs are skipped as
unsupported — the same way `graphics/index_minimum_resolution_product_slug`
already is (see "Existing mechanism" below).
## Actual Result
All four run and fail:
```
graphics/cycle_resolution_primary
/bin/sh: 1: xrandr: not found
graphics/maximum_resolution_primary
File ".../gi/__init__.py", line 150, in require_version
raise ValueError(f"Namespace {namespace} not available")
ValueError: Namespace Gtk not available
graphics/rotation_primary
File ".../rotation_test.py", line 32, in
gi.require_version("Gdk", "3.0")
ValueError: Namespace Gdk not available
monitor/powersaving
Call failed: The name org.gnome.Shell was not provided by any .service files
```
## Existing mechanism
A resource for exactly this already exists in-tree and appears to be used by
only one job:
- `providers/resource/jobs/resource.pxu` defines `id: desktop_session`
- `providers/resource/bin/desktop_session_resource.py` publishes
`desktop_session` (bool, from `XDG_CURRENT_DESKTOP`) and `session_type`
(from `XDG_SESSION_TYPE`)
- `providers/base/units/graphics/jobs.pxu` uses it in
`graphics/index_minimum_resolution_product_slug`:
```
requires:
desktop_session.desktop_session == 'True'
device.category == 'VIDEO'
```
The four jobs listed above do not carry that requirement. Reporting this as an
observation about existing in-tree precedent, not as a prescribed fix.
## Failure Rate
100% — 4 of 4 jobs, every run on the server image.
## Affected Test Cases
```
com.canonical.certification::graphics/cycle_resolution_primary
com.canonical.certification::graphics/rotation_primary
com.canonical.certification::graphics/maximum_resolution_primary
com.canonical.certification::monitor/powersaving
```
## Additional Information
- Checkbox: `4.1.1.dev578+g72b5dbae9.d20260905`, runtime `checkbox26` rev 164
- Image: `ubuntu-26.04-preinstalled-server-arm64+dragonwing-x05-20260826-32945890183`
- Kernel: `7.0.0-1013-qcom`, arm64
- Platform: Qualcomm Hamoa IoT EVK (X1E80100)
- CID: 202605-38721
Cross-check on the matching **desktop** image (CID 202605-38720, same test
plan): all four of these jobs pass, which supports the reading that the failure
is specific to the absence of a graphical session rather than to the hardware.
The corresponding `after-suspend-graphics/cycle_resolution_primary` and
`after-suspend-graphics/maximum_resolution_primary` jobs were skipped on the
same server run, so the non-suspend variants are the ones being offered.
Contributor guide
Research direction
Start with the four affected jobs in providers/base/units/graphics/jobs.pxu and providers/base/units/monitor/jobs.pxu, then compare their requirements with graphics/index_minimum_resolution_product_slug and the desktop_session resource in providers/resource. Run the listed graphics and monitor test cases on server and desktop images. Done means the jobs are skipped without a graphical session and remain runnable on the desktop image.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 85/100