Gtk-WARNING ... drawing failure for widget ... invalid value (typically too big) [using three 4K monitors]

Bug #2004533 reported by zach m
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GTK+
New
Unknown
cairo (Ubuntu)
Triaged
Medium
Unassigned
gtk+3.0 (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

A tiny sample of of my logs starting with the subject of this thread:
gnome-shell[15376]: Can't update stage views actor [:0x564e0cfc0900] is on because it needs an allocation.
others
gnome-shell[15376]: DING: (gjs:23748): Gtk-WARNING **: 19:23:18.003: drawing failure for widget 'GtkImage': invalid value (typically too big) for the size of the input (surface, pattern, etc.)
gnome-shell[15376]: DING: (gjs:23748): Gtk-WARNING **: 19:23:17.986: infinite surface size not supported
gnome-shell[15376]: DING: (gjs:23748): Gtk-WARNING **: 19:23:17.970: drawing failure for widget 'GtkImage': invalid value (typically too big) for the size of the input (surface, pattern, etc.)
Feb 1 19:23:17 gnome-shell[15376]: DING: (gjs:23748): Gtk-WARNING **: 19:23:17.970: drawing failure for widget 'GtkBox': invalid value (typically too big) for the size of the input (surface, pattern, etc.)
Feb 1 19:23:17 gnome-shell[15376]: DING: (gjs:23748): Gtk-WARNING **: 19:23:17.970: drawing failure for widget 'GtkEventBox': invalid value (typically too big) for the size of the input (surface, pattern, etc.)
Feb 1 19:23:17 gnome-shell[15376]: DING: (gjs:23748): Gtk-WARNING **: 19:23:17.970: drawing failure for widget 'GtkEventBox': invalid value (typically too big) for the size of the input (surface, pattern, etc.)
Feb 1 19:23:17 gnome-shell[15376]: DING: (gjs:23748): Gtk-WARNING **: 19:23:17.970: drawing failure for widget 'GtkBox': invalid value (typically too big) for the size of the input (surface, pattern, etc.)
Feb 1 19:23:17 gnome-shell[15376]: DING: (gjs:23748): Gtk-WARNING **: 19:23:17.970: drawing failure for widget 'GtkFixed': invalid value (typically too big) for the size of the input (surface, pattern, etc.)
Feb 1 19:23:17 gnome-shell[15376]: DING: (gjs:23748): Gtk-WARNING **: 19:23:17.970: drawing failure for widget 'GtkEventBox': invalid value (typically too big) for the size of the input (surface, pattern, etc.)
Feb 1 19:23:17 gnome-shell[15376]: DING: (gjs:23748): Gtk-WARNING **: 19:23:17.970: drawing failure for widget 'GtkApplicationWindow': invalid value (typically too big) for the size of the input (surface, pattern, etc.)
st_widget_get_theme_node called on the widget [0x564e28a187d0 StBoxLayout ("…")] which is not in the stage.
gnome-shell[15376]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x3a00004
Feb 1 19:02:01 gnome-control-c[19519]: Finalizing AdwPreferencesPage 0x556a2f5a5b70, but it still has children left:
Feb 1 19:02:01 gnome-control-c[19519]: - GtkCenterBox 0x556a2f5b2300
Feb 1 19:02:03 gnome-shell[15376]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x3a00018

ProblemType: Bug
DistroRelease: Ubuntu 22.10
Package: gnome-shell 43.1-0ubuntu1
ProcVersionSignature: Ubuntu 5.19.0-29.30-generic 5.19.17
Uname: Linux 5.19.0-29-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.23.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Wed Feb 1 23:40:47 2023
DisplayManager: gdm3
GsettingsChanges:
 b'org.gnome.shell' b'disable-user-extensions' b'true'
 b'org.gnome.desktop.input-sources' b'sources' b"[('xkb', 'us')]"
InstallationDate: Installed on 2021-01-17 (745 days ago)
InstallationMedia: Ubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
ProcEnviron:
 LANGUAGE=en_CA:en
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
RelatedPackageVersions: mutter-common 43.0-1ubuntu4
SourcePackage: gnome-shell
UpgradeStatus: Upgraded to kinetic on 2023-01-05 (27 days ago)

Revision history for this message
zach m (plahpoy) wrote :
summary: very unstable desktop, icons vanish, cannot control windows, cannot
resize or scale multi monitors easily. Oddly today I looked under
- settings and the Gnome version says 'unknown' while cli shows 43.1
+ settings and the Gnome version says 'unknown' while cli shows 43.1.
+ Started immediately after upgrading from 22.04 to 22.10
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: very unstable desktop, icons vanish, cannot control windows, cannot resize or scale multi monitors easily. Oddly today I looked under settings and the Gnome version says 'unknown' while cli shows 43.1. Started immediately after upgrading from 22.04 to 22.10

Thanks for the bug report.

Please run these commands:

  gsettings list-recursively org.gnome.shell > gssettings.txt
  lspci.txt -k > lspcik.txt
  dpkg -l > packages.txt
  journalctl -b0 > journal.txt

and attach the resulting text files here.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please also choose just one issue for this bug to be about. If you suspect one issue is causing the others then we should focus on that one first.

summary: very unstable desktop, icons vanish, cannot control windows, cannot
- resize or scale multi monitors easily. Oddly today I looked under
- settings and the Gnome version says 'unknown' while cli shows 43.1.
- Started immediately after upgrading from 22.04 to 22.10
+ resize or scale multi monitors easily.
Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Changed in gnome-shell-extension-desktop-icons-ng (Ubuntu):
status: New → Incomplete
Revision history for this message
zach m (plahpoy) wrote : Re: very unstable desktop, icons vanish, cannot control windows, cannot resize or scale multi monitors easily.

let's just change it to desktop gnome instability?

Revision history for this message
zach m (plahpoy) wrote :
Revision history for this message
zach m (plahpoy) wrote :
Revision history for this message
zach m (plahpoy) wrote :
Revision history for this message
zach m (plahpoy) wrote :

Let me know if there is anything else you need me to do thanks!

zach m (plahpoy)
Changed in gnome-shell (Ubuntu):
status: Incomplete → New
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Two suggestions:

1. Delete all locally installed extensions (like <email address hidden>):

   cd ~/.local/share/gnome-shell/
   rm -rf extensions

   and then log in again.

2. If the problem still isn't solved then try disabling desktop icons:

   gnome-extensions disable <email address hidden>

   and log in again.

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
zach m (plahpoy) wrote :

I had already disabled all my extensions.

Now I have deleted them and my dock bar is gone (still comes up when i hit the windows key).

logged out and logged back in same issue.

#2:
# gnome-extensions disable <email address hidden>
Failed to connect to GNOME Shell

yet without the extension specified:
# gnome-extensions disable
gnome-extensions: No UUID given

Usage:
  gnome-extensions disable [OPTION…] UUID

Disable an extension

Application Options:
  -q, --quiet Do not print error messages

I should also note that ANY full screen video is extremely slow, sluggish framerate etc.

Revision history for this message
zach m (plahpoy) wrote :

Ok, I used the extension manager and have disabled the icons.

I now have no icons and no dock, it says my dock is on, but it is no longer visible on the desktop

Revision history for this message
zach m (plahpoy) wrote :

My desktop is still buggy, I have attached a pic of what the window controls look like on browser, file/folder windows.

Revision history for this message
zach m (plahpoy) wrote :
Download full text (3.5 KiB)

some of my logs:

Gtk-WARNING **: 15:40:57.974: drawing failure for widget 'GtkBox': invalid value (typically too big) for the size of the input (surface, pattern, etc.)

(firefox-aurora:221704): Gtk-WARNING **: 15:40:57.974: drawing failure for widget 'GtkPaned': invalid value (typically too big) for the size of the input (surface, pattern, etc.)

(firefox-aurora:221704): Gtk-WARNING **: 15:40:57.974: drawing failure for widget 'GtkBox': invalid value (typically too big) for the size of the input (surface, pattern, etc.)

(firefox-aurora:221704): Gtk-WARNING **: 15:40:57.974: drawing failure for widget 'GtkFileChooserWidget': invalid value (typically too big) for the size of the input (surface, pattern, etc.)

(firefox-aurora:221704): Gtk-WARNING **: 15:40:57.974: drawing failure for widget 'GtkBox': invalid value (typically too big) for the size of the input (surface, pattern, etc.)

(firefox-aurora:221704): Gtk-WARNING **: 15:40:57.974: drawing failure for widget 'GtkFileChooserDialog': invalid value (typically too big) for the size of the input (surface, pattern, etc.)

(firefox-aurora:221704): Gtk-WARNING **: 15:40:59.735: infinite surface size not supported

(firefox-aurora:221704): Gtk-WARNING **: 15:40:59.735: drawing failure for widget 'GtkImage': invalid value (typically too big) for the size of the input (surface, pattern, etc.)

(firefox-aurora:221704): Gtk-WARNING **: 15:40:59.735: drawing failure for widget 'GtkButton': invalid value (typically too big) for the size of the input (surface, pattern, etc.)

(firefox-aurora:221704): Gtk-WARNING **: 15:40:59.735: drawing failure for widget 'GtkPathBar': invalid value (typically too big) for the size of the input (surface, pattern, etc.)

(firefox-aurora:221704): Gtk-WARNING **: 15:40:59.735: drawing failure for widget 'GtkBox': invalid value (typically too big) for the size of the input (surface, pattern, etc.)

(firefox-aurora:221704): Gtk-WARNING **: 15:40:59.735: drawing failure for widget 'GtkStack': invalid value (typically too big) for the size of the input (surface, pattern, etc.)

(firefox-aurora:221704): Gtk-WARNING **: 15:40:59.735: drawing failure for widget 'GtkBox': invalid value (typically too big) for the size of the input (surface, pattern, etc.)

(firefox-aurora:221704): Gtk-WARNING **: 15:40:59.735: drawing failure for widget 'GtkRevealer': invalid value (typically too big) for the size of the input (surface, pattern, etc.)

(firefox-aurora:221704): Gtk-WARNING **: 15:40:59.735: drawing failure for widget 'GtkBox': invalid value (typically too big) for the size of the input (surface, pattern, etc.)

(firefox-aurora:221704): Gtk-WARNING **: 15:40:59.735: drawing failure for widget 'GtkPaned': invalid value (typically too big) for the size of the input (surface, pattern, etc.)

(firefox-aurora:221704): Gtk-WARNING **: 15:40:59.735: drawing failure for widget 'GtkBox': invalid value (typically too big) for the size of the input (surface, pattern, etc.)

(firefox-aurora:221704): Gtk-WARNING **: 15:40:59.735: drawing failure for widget 'GtkFileChooserWidget': invalid value (typically too big) for the size of the input (surface, pattern, etc.)

(firefox-aurora:221704): Gt...

Read more...

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Interesting Firefox has similar warnings as DING had before. That suggests the bug is either in GTK or the graphics driver. Rather than being a DING or a Firefox problem.

As for the screenshot in comment #12, make sure you're never suspending the system, switching users or even switching VTs. Because all of those can cause the Nvidia driver to lose textures, which is covered by bug 1876632.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The fact that you have 3 x 4K monitors connected makes me think all those GTK warnings are some kind of texture size limit being exceeded. Although even basic GPUs should support textures up to 16K in size. Perhaps this is a GTK-specific problem where it tries to internally allocate something that the full desktop resolution and fails.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It looks like you're using Xorg fractional scaling, so yes that will take the texture requirements past the limit supported by the GPU if you do it across multiple 4K monitors. Some parts of the desktop will cope and other parts (GTK) might not cope.

To confirm this, please run:

  xrandr --verbose > xrandr.txt

and attach the resulting text file here.

Possible workarounds (you only need one):

  * Only use integer scaling
  * Only use Wayland sessions
  * Use fewer monitors

affects: gnome-shell (Ubuntu) → gtk+3.0 (Ubuntu)
affects: gtk+3.0 (Ubuntu) → ubuntu
affects: ubuntu → nvidia-graphics-drivers-525 (Ubuntu)
affects: gnome-shell-extension-desktop-icons-ng (Ubuntu) → gtk+3.0 (Ubuntu)
tags: added: xrandr-scaling
no longer affects: nvidia-graphics-drivers-525 (Ubuntu)
summary: - very unstable desktop, icons vanish, cannot control windows, cannot
- resize or scale multi monitors easily.
+ Gtk-WARNING **: ...: drawing failure for widget '...': invalid value
+ (typically too big)
summary: - Gtk-WARNING **: ...: drawing failure for widget '...': invalid value
- (typically too big)
+ Gtk-WARNING ... drawing failure for widget ... invalid value (typically
+ too big)
Revision history for this message
zach m (plahpoy) wrote : Re: Gtk-WARNING ... drawing failure for widget ... invalid value (typically too big)

Hi Daniel,

It worked flawlessly for about a year, and only started doing this (immediately) after the update to 22.10. I used fractional scaling for the past year as well with no issues.

I have already tried changing the resolution back to just plain 100% 4k and it's the exact same with all kinds of instabilities and missing icons.

Any other ideas?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes this sounds like a GTK-only bug, probably new in Ubuntu 22.10. But potentially related to that, please run:

  xrandr --verbose > xrandr.txt

and attach the resulting text file here.

Also remember one of the issues you mentioned earlier is likely to be bug 1876632 so please read that.

Revision history for this message
zach m (plahpoy) wrote :

attached

Revision history for this message
zach m (plahpoy) wrote :

I can also confirm that the problem persists after a fresh boot, turning off 2 screens, and only using the main screen at 100% scale.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think this is a consequence of your desktop being 18432 pixels wide. Each 4K monitor is 6144 logical pixels wide because of a custom Xrandr scaling factor of 1.6.

Turning off screens wouldn't fix it, only unplugging them might. But still this sounds like a GTK bug because modern Nvidia GPUs like yours should be fine with an 18K desktop.

Changed in gtk+3.0 (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

To achieve a scaling factor of 1.6 I suspect the logic is to render at 8x resolution (92K!!!) and then downscale 5x (because 8/5 = 1.6). And GTK has internal size limits of 65535 in each dimension, I think. So the maximum window size is 65535 / 8 = 8191. That should be enough to have two 4K (3840 px) monitors scaling 1.6x, but not three. So try unplugging one monitor and positioning the remaining two next to each other.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Another suggestion is to use a scaling factor of 1.5 instead of 1.6. That might simplify the required quotient to 3/2 (initially rendering at 3x resolution instead of 8x), so might be enough to have all three monitors working.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Out of curiosity, how did you configure a scaling factor of 1.6?

Changed in gtk+3.0 (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
zach m (plahpoy) wrote :

Very odd, I'm only using a scale of 1.25

Revision history for this message
zach m (plahpoy) wrote :

would it be bad to enable developer updates / proposed kinetic updates?

Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

> would it be bad to enable developer updates / proposed kinetic updates?

Yes that would be bad. You would get untested updates across all packages. Doing so usually breaks your system after a while.

> Very odd, I'm only using a scale of 1.25

Ah you are right. Setting 125% I also see Xorg using a transform scale of 1.6x. Perhaps I got my maths wrong or perhaps Xorg fractional scaling is buggy. But the general idea for fixing this is still the same:

  * Turn OFF fractional scaling; or
  * Unplug some monitors

While this is a software bug in GTK 3.x, the developers have moved on to GTK 4.x so I would not expect any significant changes to the design of 3.x that would fix this.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

After you turn off fractional scaling you can still adjust font sizes using the gnome-tweaks app.

Revision history for this message
zach m (plahpoy) wrote :

will gtk4 come with 23.04?

Should I wait or just bite the bullet and reinstall (what a pain) as it worked flawlessly on 22.04?

Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

GTK4 is already in Ubuntu and the GNOME developers are planning GTK5. The bigger issue here is that apps haven't moved away from GTK3 yet. For you that includes Desktop Icons NG, Firefox and Thunderbird.

If 22.04 worked then yes please do go back to that. It's also supported for much longer:
https://wiki.ubuntu.com/Releases

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Although this suggests the bug was in 20.04 as well:

https://gitlab.gnome.org/GNOME/gtk/-/issues/3050

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

And I just realized the message "invalid value (typically too big)" is from the Cairo library. It's the description for CAIRO_STATUS_INVALID_SIZE.

Changed in cairo (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
zach m (plahpoy) wrote :

what does that mean for me?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It doesn't really help. I was just searching the code for an explanation of the message.

Changed in gtk:
status: Unknown → New
summary: Gtk-WARNING ... drawing failure for widget ... invalid value (typically
- too big)
+ too big) [using three 4K monitors]
tags: added: nvidia
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.