QT issue with current Ubuntu LTS

I recently upgraded from an older version of Ubuntu to the current LTS 26.04. I noticed pencil2D was not recognizing the input from my drawing tablet and I thought it might just be an issue with pencil2D but Krita was also having the same issue. I looked it up and apparently the issue is in new versions of XWayland so it won’t effect every distro.

Running this command when starting pencil2D fixes it:

QT_QPA_PLATFORM=wayland pencil2d

Hopefully this helps anybody who has the same issue I ran into.

I have something else to add to this issue. So my drawing tablet is working now but I can’t add a new layer. Nothing happens when I click the button. I am thinking about just switching to a different distro or possibly trying to downgrade to a previous version of XWayland.

I want to say that this is not just an issue with pencil2D. It also effects krita. I think it probably has to due with a lot of vibe coded updates to Ubuntu that no one at canonical is testing.

UPDATE: After some more testing, I discovered that new layers can be created from the menu. I now have access to everything.