imwheel gets XError: BadAccess when trying to run on 22.04

Bug #1979691 reported by zzarko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu MATE
New
Undecided
Unassigned
imwheel (Ubuntu)
New
Undecided
Unassigned
snapd (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

A few days ago I finally installed 22.04, Mate version, and started to re-install all that I need. One of things is imwheel (I use it for tweaking how internet browsers are used). I copied my settings from old installation (.imwheelrc) and tried to run the program. Since it did not work, I tried debug option and got this at the end of printout:

Grabbing Button 8...
Grabbing Button 9...
starting loop...
XError:
    serial : 12
    error_code : 10
    request_code: 28
    minor_code : 0
    resourceid : 1753
    error string: BadAccess (attempt to access private resource denied)
XError:
    serial : 13
    error_code : 10
    request_code: 28
    minor_code : 0
    resourceid : 1753
    error string: BadAccess (attempt to access private resource denied)

All that I could find regarding this BadAccess error was related to various Qt programs and solutions offered on pages that I found cannot be applied. I also found one advice for moving start of imwheel into systemd service, but that one had the same error in the end.

So, now I have no idea whatsoever as to where to look for solution, as I have no idea what that error means and where to even start to find a solution. All I figured out is that imwheel needs access to something that was freely accessible in 18.04, but now it isn't.
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
BuildID: 20220608170832
CasperMD5CheckResult: pass
CurrentDesktop: MATE
DistroRelease: Ubuntu 22.04
InstallationDate: Installed on 2022-06-21 (2 days ago)
InstallationMedia: Ubuntu-MATE 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
Package: snapd
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 5.15.0-39.42-generic 5.15.35
Profiles:
 Profile1 (Default) - LastVersion=52.6.0/20180118122319 (In use) (Out of date)
 Profile0 - LastVersion=101.0.1/20220608170832 (In use)
Tags: third-party-packages jammy
Uname: Linux 5.15.0-39-generic x86_64
UnreportableReason: This does not seem to be an official Ubuntu package. Please retry after updating the indexes of available packages, if that does not work then remove related third party packages and try again.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True

Revision history for this message
Norbert (nrbrtx) wrote (last edit ):

Please run

apport-collect 1979691

and add details about web-browser(s) in use and its/their installation method.

tags: added: jammy
Revision history for this message
zzarko (zzarko-gmail) wrote : Dependencies.txt

apport information

tags: added: apport-collected third-party-packages
description: updated
Revision history for this message
zzarko (zzarko-gmail) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
zzarko (zzarko-gmail) wrote : ProcEnviron.txt

apport information

Revision history for this message
zzarko (zzarko-gmail) wrote :

On my old installation, after starting imwheel in debug mode and pressing any of reprogrammed buttons I get something like this when browsers aren't started:
----------------------------------------------
ButtonPress:window=4000007(4fb)
resource name ="mate-terminal"
class name ="Mate-terminal"
findWA:button=100
No Match for : win="Terminal" res="mate-terminal" class="Mate-terminal"
ButtonPress
findWA:button=9
Testing: "^Firefox$" ?= "Terminal"
Testing: "^Firefox$" ?= "mate-terminal"
Testing: "^Firefox$" ?= "Mate-terminal"
Window ID doesn't match
input button(9) doesn't match rule-button(8)
Testing: "chromium-browser" ?= "Terminal"
Testing: "chromium-browser" ?= "mate-terminal"
Testing: "chromium-browser" ?= "Mate-terminal"
Window ID doesn't match
input button(9) doesn't match rule-button(8)
No Match for : win="Terminal" res="mate-terminal" class="Mate-terminal"
Taking default action.
doWA:
WinAction (0x7ffc5173bd40):
 Priority : 0
 Window Regex : "Terminal"
 Keysyms Mask (0x7ffc5173bcd0):
 Button : 9
 Keysyms Out (0x7ffc5173bd00) :
  "Button9 "
 Reps: 1
 Rep Delay: 0
 Key Up Delay: 0
rep=0
Ungrab buttons!
Ungrabbing Button 8...
Ungrabbing Button 9...
setbit:n=1,1 val=1
Grab buttons!
Grabbing Button 8...
Grabbing Button 9...
doWA: keyup delay=0
Ungrab buttons!
Ungrabbing Button 8...
Ungrabbing Button 9...
setbit:n=1,1 val=0
Grab buttons!
Grabbing Button 8...
Grabbing Button 9...
----------------------------------------------
So, imwheel got the access to buttons and was able to remap them to other actions and it prints out that it searches for browser windows.

When I start it on my new installation, I only get the error I posted, and pressing one of remapped buttons gives nothing as output. My guess is that imwheel for some reason could not intercept mouse buttons (it looks like it does not have access rights), so it could not even detect presses on them, let alone send anything to browsers.

It looks to me that error does not have anything to do with the programs I'm trying to control with imwheel (I use if for text editors too), but nevertheless I'm using Firefox and Chrome from PPA, and Vivaldi form repository.

Revision history for this message
zzarko (zzarko-gmail) wrote :

Sorry, not Chrome, but Chromium.

Revision history for this message
Alberto Mardegan (mardy) wrote :

Hi zzarko, and thanks for reporting this bug. I haven't been able to reproduce it on my fresh 22.04 installation: I do get the same long output that you report in comment #5.

I'm using Xorg; could be that your installation uses Wayland, and imwheel does not work on it?

Can you please paste the output of

    set | grep XDG

Changed in snapd (Ubuntu):
status: New → Incomplete
no longer affects: firefox (Ubuntu)
Revision history for this message
zzarko (zzarko-gmail) wrote :

I am also using Xorg (XDG_SESSION_TYPE=x11) with Radeon graphics card. But, the funny thing happened... There were some updates, I installed them and restarted the machine and now imwheel works. I haven't changed anything else in my setup.

I'll try to restart again when I get back from work, to check if it still works and report back. Thank you for being so fast in responding!

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.