Score:0

22.04: Strange artifacts and poor performance on Xorg with fractional scaling

se flag

I'm not sure what I did to cause this to happen, but recently after restarting my computer running Ubuntu 22.04, with Xorg I began noticing some strange artifacts around the borders of windows and icons. I had been running Xorg under the same settings, to my knowledge, without issue before this.

Quirk #1: Borders around drawn areas

Sometimes there would be a black border just outside the draw boundaries of a window, precisely outside the shadow effect at the edges of selected windows. A black border would also occasionally pop up around all sorts of elements being drawn to the screen. This might appear as a black border (an unfilled rectangle) surrounding an application icon, or even a rectangle around the tooltip when you hover over one of them (various GUI components sometimes had them). Amazingly, this would even occur to parts of the user interface of Firefox running inside a virtual machine. The borders would remain visible until something got drawn over them. You could move the windows, and parts of the border would remain the same, while other parts were "pushed" away by the window dragging.

The black border lines seemed to go away most of the time when I switched active windows, and trying to take a screenshot would clear them, but they often would come back when I switched back to the window where they formed. They also went away when I switched fractional display scaling off, but that's not really a good option for me since I have more than one screen with different resolutions.

Quirk #2: Flipping between previously drawn images

Other artifacts that happened during this time were that elements drawn to the screen would, on occasion, quickly flip back and forth to some previous value. For example, the time might read 13:47 but then, when 13:48 came, the time would quickly flip back and forth between 13:47 and 13:48. After one more minute, this would even be between 13:47 and 13:49. This would also occur, for example, in a chat application: "Emily and Bob are typing..." would quickly become "Emily is typing..." and back again.

Quirk #3: Performance hit

Another problem I noticed was that resizing windows got very slow as the windows got larger in width and height, which was also strange and made me think there was a driver issue. Also, I certainly was not getting a full 60 FPS, and there was some screen tearing.

Possible causes

What is surprising is that I had been running with Xorg and fractional display scaling successfully (no artifacts at all) since I installed Ubuntu until I rebooted my computer just a few days ago. Then all this all happened, which is strange. Looking back in my dpkg history, it appears that I installed some Mesa drivers for some reason. I thought I originally had "Intel HD Graphics xxx" for my graphics, but now it says "Mesa Intel® Xe Graphics (TGL GT2)" in the About page in Settings.

Switching to Wayland fixed the problems and has noticeably better performance, ignoring the Wayland compatibility quirks with the applications I run.

What do?

Why might these quirks have happened? Is there a way to get "Intel HD Graphics" back, if that might be the reason? Why would Xorg render so slowly?

TL;DR randomly after a restart, Xorg has occasional strange borders around areas that are being drawn on-screen, and flickering between a drawn object and its previous drawing. Wayland seems to fix these, but I want to know why Xorg stopped working for me.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.