AttributeError in graphics/1_maximum_resolution_* tests on 22.04
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox Provider - Base |
Fix Released
|
Medium
|
Pierre Equoy |
Bug Description
plainbox-
Image: 22.04
DE: Wayland (same result in Xorg)
When running graphics/
When testing, the screen resolution is 3840x2160 (with integer scaling automatically set after installation at 200%).
I guess the Gdk module has been updated in 22.04 and breaks our script.
-------------[ Running job 28 / 55. Estimated time left: unknown ]--------------
---[ Test maximum supported resolution for Intel Corporation PCI ID 0x9a70 ]----
ID: com.canonical.
Category: com.canonical.
PURPOSE:
This test will verify the maximum supported resolution on the Intel Corporation PCI ID 0x9a70 graphics card.
STEPS:
1. Select the Intel Corporation PCI ID 0x9a70 graphics card (a reboot may be necessary)
2. Consult the system's specifications and locate the screen's maximum supported resolution.
3. Click on Test to display the maximum resolution that can be used by Ubuntu on the current display.
VERIFICATION:
Is this the maximum resolution for the display connected to the Intel Corporation PCI ID 0x9a70 graphics card?
Pick an action
=> press ENTER to continue
c => add a comment
s => skip this job
q => save the session and quit
[csq]:
... 8< -------
<string>:1: PyGIWarning: Gdk was imported without specifying a version first. Use gi.require_
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/
return getattr(
File "/usr/lib/
raise AttributeError("%r object has no attribute %r" % (
AttributeError: 'gi.repository.Gdk' object has no attribute 'Screen'
Maximum resolution: 3840x2160
Current resolution: \nPlease switch to the maximum resolution \nfor every graphic tests
-------
Outcome: job needs verification
Please decide what to do next:
outcome: job needs verification
comments: none
Pick an action
c => add a comment
p => set outcome to pass
f => set outcome to fail
s => set outcome to skip
r => re-run this job
=> set suggested outcome [job passed]
$ dpkg -l | grep -i gobject
ii gir1.2-
ii gir1.2-adw-1:amd64 1.1.0-1ubuntu2 amd64 GObject introspection files for libadwaita
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-dee-1.0 1.2.7+17.
ii gir1.2-gck-1:amd64 3.40.0-4 amd64 GObject introspection data for the GCK library
ii gir1.2-gcr-3:amd64 3.40.0-4 amd64 GObject introspection data for the GCR library
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-nm-1.0:amd64 1.36.4-2ubuntu1 amd64 GObject introspection data for the libnm library
ii gir1.2-
ii gir1.2-
ii gir1.2-polkit-1.0 0.105-33 amd64 GObject introspection data for PolicyKit
ii gir1.2-rb-3.0:amd64 3.4.4-5ubuntu1 amd64 GObject introspection data for the rhythmbox music player
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii gir1.2-
ii libcairo-
ii libcairo-
ii libdazzle-
ii libdazzle-common 3.44.0-1 all feature-filled library for GTK+ and GObject (common files)
ii libgee-0.8-2:amd64 0.20.5-2 amd64 GObject based collection and utility library
ii libgexiv2-2:amd64 0.14.0-1build1 amd64 GObject-based wrapper around the Exiv2 library
ii libgirepository
ii libglib-
ii libglib-perl:amd64 3:1.329.3-2build1 amd64 interface to the GLib and GObject libraries
ii libgom-1.0-0:amd64 0.4-1build2 amd64 Object mapper from GObjects to SQLite
ii libgssdp-
ii libgudev-
ii libgupnp-
ii libmanette-
ii libnm0:amd64 1.36.4-2ubuntu1 amd64 GObject-based client library for NetworkManager
ii libpolkit-
ii libudisks2-0:amd64 2.9.4-1ubuntu2 amd64 GObject based library to access udisks2
ii python3-gi 3.42.0-3build1 amd64 Python 3 bindings for gobject-
ii python3-gi-cairo 3.42.0-3build1 amd64 Python 3 Cairo bindings for the GObject library
Related branches
- Sylvain Pineau (community): Approve
-
Diff: 1075 lines (+0/-1064)1 file modifieddev/null (+0/-1064)
- Devices Certification Bot: Needs Fixing
- Sylvain Pineau (community): Approve
-
Diff: 289 lines (+149/-99)4 files modifiedbin/graphics_max_resolution.py (+148/-0)
dev/null (+0/-74)
units/graphics/jobs.pxu (+1/-17)
units/graphics/legacy.pxu (+0/-8)
description: | updated |
tags: | added: jammy-test |
Changed in plainbox-provider-checkbox: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
milestone: | none → 0.65.0 |
tags: | added: ce-qa-concern |
Changed in plainbox-provider-checkbox: | |
status: | Fix Committed → Fix Released |
Summary of my researches so far:
The job is in plainbox- provider- checkbox:
https:/ /git.launchpad. net/plainbox- provider- checkbox/ tree/units/ graphics/ jobs.pxu# n130
1. It sources graphics_env.sh[1] for AMD discrete GPUs
2. It uses xrandr to guess the max resolution from the primary screen output.
3. Then it uses a Python one-liner and Gdk to find the resolution of the current default screen.
I'm not sure if 1. is needed at all for this job.
xrandr cannot be used in Wayland, so we have to replace 2. with either
- a "if wayland then... else if xorg then..." version, so we can use xrandr in one case and gnome-randr in the other drm/*/modes that contain a list of supported resolutions for every monitor available.
- find a more "close to the metal" option that would work in any cases. For instance, access /sys/class/
3. As shown in the bug description, Gdk.Screen has been removed in Gdk 4.0 (it was deprecated in Gdk 3.22). Unfortunately, Gdk 3 and Gdk 4 have different classes and methods to access what we want (the current resolution of the default screen), so it would become quite complicated (but possible) to handle both 20.04 and 22.04 with the same script. Might need to find a better approach to this.
[1] https:/ /git.launchpad. net/plainbox- provider- checkbox/ tree/bin/ graphics_ env.sh