Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Dark grey/black semi-transparent rectangle covers Gnome Terminal (bug in Enhanced Tiling?)

+0
−0

The bug I'm experiencing is that my (one almighty many-tabbed to multiple screen sessions in other places) Gnome Terminal started acquiring a dark semi-transparent rectangle over it.

I'm using Ubuntu 24.04.2 LTS (noble), and have been using LTS Ubuntu flavours for a long time. The switch from X11 to Wayland didn't trouble me much and I've only just had reason to go delving into the mechanics...

When the bug has triggered, the terminal window has been maximised to full screen, either on the laptop or the external monitor. Also the screensaver has been on, and the bug presents when I unlock. The dark rectangle completely covers the whole of the affected screen.

  1. Sometimes it's mostly transparent, so the window looks greyed out or like there is a colour scheme problem.
  2. I spent a long time trying to adjust the external (native HDMI port) monitor. Then I realised the browser window had normal contrast.
  3. I spent a while adjusting Terminal colour schemes. Then I opened another Terminal window and it was unaffected.
  4. The window can still be dragged around, menus opened from it (they are not affected), and terminal interaction is normal except for visibility.
  5. Tabs detached from the affected window are "cleaned" of the Dreaded Rectangle of Obscurity. It's just a shame I can't insert them into a clean window.
  6. Moving and resizing the affected window shows the black rectangle to keep its size and be anchored about (64,64)px outside the top left of the window.
  7. After looking for an equivalent of xprops to examine this thing, I found the recipe
    1. Open the Run dialog, usually Alt+F2
    2. Enter lg <enter> to invoke the Looking Glass. It seems to be not an executable one can call any other way - I have not read its fine manual.
    3. You're now in an object browser console and can issue it some dialect of JavaScript. Poke around until you understand it, or something breaks properly!
    4. Credit to https://web.archive.org/web/20180402235234/https://fedoraproject.org/wiki/How_to_debug_Wayland_problems via Brian Redbeard's U.SE answer.
    5. Use the crosshair to pick an object. It will appear in the r(n) output results, and methods can be invoked by calling r to reach the old results.
    6. Use the .get_children and .get_parent methods to navigate the tree. The most recent r(n+1) result will get an orange highlight to help you.
  8. I discovered my window had two of these rectangles on it, possibly from multiple invocations of the same bug.
  9. I called .set_height(n), .set_width(n) and .set_opactity(n) on the objects become sure that what I was looking at is the Dreaded Rectangle of Obscurity.

Now I know what these things are, but not how they arrived.

I suspect the "Enhanced Tiling" / "Tiling Popup" may be implicated, as I triggered that a few times before understanding what it is and how to use it.

I suspect the lockscreen is implicated, as I have never seen a Rectangle of Obscurity appear while I was watching.

I haven't figure out what triggers reduced opacity, or looked for a reliable recipe to discover how many rectangles are attached to my window.

I've found other old bug reports of "black rectangle around" but they seem to be some framing error. This looks like the Tiling "grey out the window just placed, while you pick another window for the other tile" got left in place.

Other than waiting for it to recur and poking it again... can you recommend a better debugging approach? A way to load my own code into the lg inspector, or probe it from another interface? Anything to better visualise the stack or surfaces and understand what each of them is doing?

ETA: screenshot, after poking it with lg. Screenshot, gnome-terminal with two manually tweaked Rectangles of Obscurity

Update

I see the similar-enough warning perhaps it's a driver issue. What have I done recently? Connected a different (larger/modern/widescreen) monitor, and possibly upgraded some packages.

The bug struck again, this time on a window which was not maximised.

Navigating Wayland object structure

lg gives among other tools

  • point-and-click access by the inspect(x,y) function and the cross-hair icon, yielding the top ClutterActor object for this bug
  • window browser access, yielding a comprehensible list of windows and their applications, from which you can bring your affected window into the evaluator
    • I used W = [ r(211), r(210) ] for my two Terminal windows, so I can reach them more easily with W[0] etc.
    • The Rectangles of Obscurity are among C = W[1].get_compositor_private().get_children() and this time I have a pile of ten of them, gathered overnight
  • the only copy-paste I found is from the evaluator textbox, so getting information out of this thing is currently tedious
  • the long history of r(n) is persistent, so you can pop in and out of lg to gather stuff

An unaffected window has C containing one MetaSurfaceContainerActorWayland.

The covered window has C containing the MetaSurfaceContainerActorWayland followed by the ClutterActors. Calling C[n].set_width(50*n) and C[n].set_opacity(50) gives a pretty grading of grey across the window, demonstrating that I have the offending objects.

Viewing a collection of info on the array can be done with something like

II = function(a){ return [a, a.get_opacity(), a.get_width(), a.get_flags() ] }
W[1].get_compositor_private().get_children().map(II)

Update - timing and removal

They seem to accrete on the targeted window at a rate of about ten per overnight screensaver lock, or sometimes one or two for an hour or so locked. My impression is it's not a regular timing.

Simplest fix once you have the targeted window in a variable is

W[1].get_compositor_private().get_children()[1].destroy()
History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

0 answers

Sign up to answer this question »