Some pixels don't capture click and hover events at the edge of the screen

This started happening with a fresh install of Ubuntu MATE 22.04. Previously 18.04 didn't have this issue.

It's most noticeable with the terminal when window decorations and the menu bar are disabled. If there are multiple tabs I can see the hover styles flicker as I move the mouse across the top of the screen. When the hover style is not applied then clicks don't register either. This happens for roughly every 1-5 pixels, it's slightly random as well. It's not an issue with Chrome but it seems to be affecting every gtk based app: their menus don't always open when clicking on the top of the screen (window decorations disabled).

When using multiple screens it happens only on the one at the top.

Also, there's a similar (but perhaps unrelated) issue with brisk menu when placed in the bottom left: not all pixels react to clicks. Even clicking on the bottom left corner doesn't open the menu every other time (it varies within the same session too). This happens for pixels along the left edge as well. However the taskbar/window list applet and indicators on the same panel all work fine.

Could this be an issue with marco or perhaps GTK itself? Any ideas how I could start to debug this?

2 Likes

Welcome @BalazsEndresz to the community!

1 Like
Could this be an issue with marco or perhaps GTK itself?

Possibly GTK, Xorg or libinput
Try an application with a name starting with a K (like k3b, which uses Qt) or an X (like xpdf, which uses the motif toolkit).

  • If the problem is not affecting these apps then it is definitely a GTK problem.
  • else it is probably either a libinput or an Xserver problem
1 Like

Thanks for the tips! I've tried all compositor options in mate-tweak and all of them have the same issue.

Most qt apps (and xpdf) have a border at the top, but I've just found quiterss which doesn't. That works fine when I hover over or click tabs at the top.

I've also tried GTK inspector which draws the layout borders as continuous straight lines and it flashes the whole terminal window when enabling the graphic updates or widget resizes options (as it skips a pixel). So I can see clearly that it's happening for only 1px along the edge. Also, for brisk-menu it's only along the left but not the bottom edge.

Since I do not encounter this problem on my equipment, I can't reproduce this GTK bug.

One question though:
Do you have a slightly non-standard screenresolution ?
Mine is 1920x1080, what is yours ?
Maybe I can trigger your bug by using equipment with the same resolution that I might have lying around.

This is on a Thinkpad T480 with a 1440p screen.

I've just downloaded ubuntu-mate-22.04.1-desktop-amd64.iso and booted with a live usb and I get the exact same issues there too.

Also, in addition even with the default layout brisk-menu doesn't always open at the top edge either. To test the terminal tabs I switch to the redmond layout, run
xprop -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS 2 to disable decorations and hide the menu bar from the right click context menu. That skips pixels at the top in exactly same way on this fresh install.

I guess I can try some more distros, and on another machine later to see where else this happens.

Exact same issue on another desktop PC as well. I've also tried mate 18.04, 20.04. 22.10, and all are the same. Somehow I noticed it only after installing 22.04. Now I've also tried the stock Ubuntu 22.04 which had the same issue as well (after installing one or two extensions to hide the top panel, which broke the whole app launcher menu, workspace and app switching but that's besides the point).

Hi,

I tested this on several machines:

The ones that were not affected by this bug:

my desktop (brandless)
MSI MPG X570 Gaming Plus + Ryzen 5 3600 + AMD RX570
Ubuntu-MATE 22.04

HP laptop
intel i7 HQ
Ubuntu-Studio 22.04 (=KDE/Plasma)

The ones that were affected by this bug:

Acer Swift 1
intel Pentium N6000
Ubuntu-MATE 20.04

Thinkpad T420
intel i5
Ubuntu-MATE 22.04

ASUS F3T (build in 2012)
AMD dual Turion + nVidia Gforce Go 7300
Ubuntu-MATE 20.04

1GB Asus eee-pc
AMD C60 (GPU = Radeon HD6290)
Ubuntu-MATE 22.04

The results were regardless of the resolution setting or the native resolution of the monitor c.q. panel.
(example: Both my brandless desktop setup as my Acer laptop do 1920x1080 native resolution. One has the bug, the other not)

Conclusion: This is extremely weird.
I still suspect that this is a GTK bug

Could you test a non-GTK distro and see if that solves the problem ?

2 Likes

That's interesting, thanks for trying it out!

I was able reproduce the mate-terminal issue on Kubuntu as well. (After enabling a keyboard shortcut to hide window borders, which hides the title bar too)

My PC that's also affected was an AMD B550 + 3060TI.

I can't see any bug reports about this for GTK, so I'll just add a new one there.

Thank you very much for the feedback!

2 Likes

Is this issue a duplicate of the following thread?

https://ubuntu-mate.community/t/tip-to-fix-un-clickable-menu-and-show-desktop-buttons/19928

There the solution was to add the line to the file ~/.profile

export GDK_CORE_DEVICE_EVENTS=1

Which can be quickly done with following line:

printf "\n# fix for 1 pixel top row not selectable/responding to mouse click\nexport GDK_CORE_DEVICE_EVENTS=1\n" >> ~/.profile

According to https://github.com/mate-desktop/mate-panel/issues/940

Btw. the docs for that variable state: "If set, GDK makes does not use the XInput extension, and only reacts to core X input events", so the bug appears to be XInput-related.

3 Likes

Hi, @w_m0zart and welcome to the Ubuntu MATE Community!

Thanks! Ubuntu Mate and their community are truly awesome!

1 Like

After some initial rejoicing, the addition of that line in ~/.profile caused the plank dock to crash when moving icons/apps which were placed on the dock itself.

A better solution might be using the fix as shown here: https://ubuntu-mate.community/t/tip-to-fix-un-clickable-menu-and-show-desktop-buttons/19928/3

Maybe the 'Solution' tag above should be taken away?

2 Likes

Thanks for the update! Good to see the root cause fixed there. I've just marked your last comment as the solution. I had no issues at all with GDK_CORE_DEVICE_EVENTS=1 though, so I guess that's still worth a try first.

1 Like