You are not logged in.

#1 2025-06-24 13:35:32

Tharbad
Member
Registered: 2016-02-27
Posts: 329

[SOLVED] Qt based apps broken after returning from hibernate. Nvidia

Hi all,

I have problems with suspend and hibernate since 11.2024.
It all detailed here:
https://bbs.archlinux.org/viewtopic.php … 4#p2215544

I did try everything suggested there with no success.
I'm currently using driver v550:
https://aur.archlinux.org/packages/nvidia-550xx-dkms
on kernel v6.14 (waiting for the package to be updated).
---

Sometime ago, maybe month or 2, I got myself a strange bug:
Sometimes, when returning from hibernate or suspend, certain applications assume that the left mouse button is always pressed.

List of apps affected: dolphin, LibreOffice, Kwrite, Kate, smplayer, telegram, kde plasma, yakuake
As far as I understand, all of them are qt based, hence the post subject.

Apps not affected: chromium, chrome, firefox, signal, strawberry, discord.

Not all of the affected apps are affected each time, even not all windows of the same app are affected.

In order to solve the issue I kill the app and re-open it.

Ideas?

Thanks

Last edited by Tharbad (2025-06-27 12:36:48)

Offline

#2 2025-06-24 15:29:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,070

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

Sometimes, when returning from hibernate or suspend, certain applications assume that the left mouse button is always pressed.

KDE? Gnome? Wayland? X11? Does the display server make a difference? Are those clients running on https://wiki.archlinux.org/title/Waylan … plications ?
Does "xev -event mouse" think the button is pressed?
What input devices do you have? Mouse? Touchpad? Nipple? Can you try to substitute them all (deactivate built-in devices and attach an external $5 office supply mouse)?

Offline

#3 2025-06-24 15:52:21

Tharbad
Member
Registered: 2016-02-27
Posts: 329

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

seth wrote:

Sometimes, when returning from hibernate or suspend, certain applications assume that the left mouse button is always pressed.

KDE? Gnome? Wayland? X11? Does the display server make a difference? Are those clients running on https://wiki.archlinux.org/title/Waylan … plications ?
Does "xev -event mouse" think the button is pressed?
What input devices do you have? Mouse? Touchpad? Nipple? Can you try to substitute them all (deactivate built-in devices and attach an external $5 office supply mouse)?

1 at a time please.

* KDE on X11
* Mouse, It's a desktop. Tried 2 different mouses.

Had strange behavior with wayland. You say it's time to check again?

will check xev next time it happens.

Offline

#4 2025-06-24 16:15:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,070

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

The idea w/ wayland was that maybe the Qt clients ran on an Xwayland instance.
Might rather be that the button is logically pressed but gtk relies on XI2
Can you "infect" gtk3 clients w/ "export GDK_CORE_DEVICE_EVENTS=1"?
Does toggling the mouse w/ xinput "release" the button?
Does "xdotool mouseup 1"?

Offline

#5 2025-06-24 18:51:44

Tharbad
Member
Registered: 2016-02-27
Posts: 329

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

seth wrote:

The idea w/ wayland was that maybe the Qt clients ran on an Xwayland instance.
Might rather be that the button is logically pressed but gtk relies on XI2
Can you "infect" gtk3 clients w/ "export GDK_CORE_DEVICE_EVENTS=1"?
Does toggling the mouse w/ xinput "release" the button?
Does "xdotool mouseup 1"?

Installed nemo file manger (GTK) and started it with that env var.
Now time to sleep.

Will come back tomorrow and see if there some answer I can supply after resuming.

Offline

#6 2025-06-25 05:36:44

Tharbad
Member
Registered: 2016-02-27
Posts: 329

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

Good Morning.

3 Dolphin windows (out of 5) and telegram woke up with the problem.
xev reports nothing
nemo saw nothing on cmd
xdotool mouseup 1 didn't help

Offline

#7 2025-06-25 06:32:27

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,070

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

nemo saw nothing on cmd

Hein?

xev reports nothing

xev will for sure report something, the main question is whether the MotionNotify event's are state & 0x100 (which is the left button)

3 Dolphin windows (out of 5)

Ok, maybe for clinical diagnoses: what exactly are the symptoms that lead you to the assumption that "certain applications assume that the left mouse button is always pressed"?

Offline

#8 2025-06-25 06:49:44

Tharbad
Member
Registered: 2016-02-27
Posts: 329

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

seth wrote:

nemo saw nothing on cmd

Hein?

xev reports nothing

xev will for sure report something, the main question is whether the MotionNotify event's are state & 0x100 (which is the left button)

nemo is the gtk3 app.

xev:

EnterNotify event, serial 25, synthetic NO, window 0xc000001,
    root 0x1d1, subw 0x0, time 60095760, (0,146), root:(2246,551),
    mode NotifyNormal, detail NotifyAncestor, same_screen YES,
    focus NO, state 8208

MotionNotify event, serial 25, synthetic NO, window 0xc000001,
    root 0x1d1, subw 0x0, time 60095761, (0,146), root:(2246,551),
    state 0x2010, is_hint 0, same_screen YES

MotionNotify event, serial 25, synthetic NO, window 0xc000001,
    root 0x1d1, subw 0x0, time 60095768, (2,152), root:(2248,557),
    state 0x2010, is_hint 0, same_screen YES

MotionNotify event, serial 25, synthetic NO, window 0xc000001,
    root 0x1d1, subw 0x0, time 60095776, (2,157), root:(2248,562),
    state 0x2010, is_hint 0, same_screen YES

MotionNotify event, serial 25, synthetic NO, window 0xc000001,
    root 0x1d1, subw 0x0, time 60095786, (2,163), root:(2248,568),
    state 0x2010, is_hint 0, same_screen YES

MotionNotify event, serial 25, synthetic NO, window 0xc000001,
    root 0x1d1, subw 0x0, time 60095794, (2,167), root:(2248,572),
    state 0x2010, is_hint 0, same_screen YES

MotionNotify event, serial 25, synthetic NO, window 0xc000001,
    root 0x1d1, subw 0x0, time 60095802, (1,173), root:(2247,578),
    state 0x2010, is_hint 0, same_screen YES

MotionNotify event, serial 25, synthetic NO, window 0xc000001,
    root 0x1d1, subw 0x0, time 60095808, (0,179), root:(2246,584),
    state 0x2010, is_hint 0, same_screen YES
seth wrote:

3 Dolphin windows (out of 5)

Ok, maybe for clinical diagnoses: what exactly are the symptoms that lead you to the assumption that "certain applications assume that the left mouse button is always pressed"?

right click doesn't work
left click does the same as double left click.
scrolling doesn't work.

Offline

#9 2025-06-25 07:17:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,070

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

nemo is the gtk3 app.

I know, the question is what "saw nothing on cmd" is supposed to mean.

state 0x2010

0x10 is the numlock - 0x2000 the is the  ButtonMotionMask
That's *not* the left button but "some button" is stuck:

#define Button1MotionMask		(1L<<8)
#define Button2MotionMask		(1L<<9)
#define Button3MotionMask		(1L<<10)
#define Button4MotionMask		(1L<<11)
#define Button5MotionMask		(1L<<12)
#define ButtonMotionMask		(1L<<13)

4 & 5 are the mouse wheel, 2 is the middle, 3 the right button (1 is left)

Offline

#10 2025-06-25 08:26:05

Tharbad
Member
Registered: 2016-02-27
Posts: 329

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

seth wrote:

nemo is the gtk3 app.

I know, the question is what "saw nothing on cmd" is supposed to mean.

export GDK_CORE_DEVICE_EVENTS=1; nemo

(nemo:348564): Nemo-WARNING **: 21:46:54.180: Current gtk theme is not known to have nemo support (Breeze) - checking...

(nemo:348564): Nemo-WARNING **: 21:46:54.207: The theme appears to have no nemo support.  Adding some...

(nemo:348564): Nemo-WARNING **: 21:46:54.258: Action '90_new-launcher.nemo_action' is missing dependency: cinnamon-desktop-editor
seth wrote:
state 0x2010

0x10 is the numlock - 0x2000 the is the  ButtonMotionMask
That's *not* the left button but "some button" is stuck:

#define Button1MotionMask		(1L<<8)
#define Button2MotionMask		(1L<<9)
#define Button3MotionMask		(1L<<10)
#define Button4MotionMask		(1L<<11)
#define Button5MotionMask		(1L<<12)
#define ButtonMotionMask		(1L<<13)

4 & 5 are the mouse wheel, 2 is the middle, 3 the right button (1 is left)

I used https://wiki.archlinux.org/title/Mouse_buttons
and got this:
state 0x10, button 1, same_screen YES
    state 0x110, button 1, same_screen YES
    state 0x10, button 3, same_screen YES
    state 0x410, button 3, same_screen YES
    state 0x10, button 2, same_screen YES
    state 0x210, button 2, same_screen YES
    state 0x10, button 2, same_screen YES
    state 0x210, button 2, same_screen YES
    state 0x10, button 9, same_screen YES
    state 0x10, button 9, same_screen YES

1 - Left click
2 - Middle click and back button configured as middle.
3 - right click
9 - forward button

change dpi button click wasn't registered by xev.

Last edited by Tharbad (2025-06-25 08:26:44)

Offline

#11 2025-06-25 12:27:07

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,070

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

Thanks for the list, but we're looking for whatever 0x2000 is ("ButtonMotionMask")
How many buttons are actually on that mouse and have you tried to jiggle all of them a bit to maybe unstick the troublemaker?

I still don't know what you'tr trying to say wrt nemo - do you mean that

GDK_CORE_DEVICE_EVENTS=1 nemo

doesn't start a nemo instance but just

nemo

does?

Offline

#12 2025-06-25 14:42:55

Tharbad
Member
Registered: 2016-02-27
Posts: 329

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

seth wrote:

Thanks for the list, but we're looking for whatever 0x2000 is ("ButtonMotionMask")
How many buttons are actually on that mouse and have you tried to jiggle all of them a bit to maybe unstick the troublemaker?

5 and yes. didn't work.


seth wrote:

I still don't know what you'tr trying to say wrt nemo - do you mean that

GDK_CORE_DEVICE_EVENTS=1 nemo

doesn't start a nemo instance but just

nemo

does?

I thought that what you meant by "Can you "infect" gtk3 clients w/ "export GDK_CORE_DEVICE_EVENTS=1"?"

Offline

#13 2025-06-25 15:11:36

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,070

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

I meant whether GDK_CORE_DEVICE_EVENTS=1 causes gtk clients to pick up the same behavior.

It's also a bit odd to be a HW issue if

Tried 2 different mouses.

- any chance this is coming from the keyboard?
How do you suspend the system? Shortcut? Power button? Plasma menu entry?
And still: does the mouse have a horizontal wheel?

Offline

#14 2025-06-25 15:42:45

Tharbad
Member
Registered: 2016-02-27
Posts: 329

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

seth wrote:

I meant whether GDK_CORE_DEVICE_EVENTS=1 causes gtk clients to pick up the same behavior.

oh. okay. Then no.

seth wrote:

It's also a bit odd to be a HW issue if

Tried 2 different mouses.

- any chance this is coming from the keyboard?
How do you suspend the system? Shortcut? Power button? Plasma menu entry?
And still: does the mouse have a horizontal wheel?

Scrolling wheel? yes. Both of them have one

I use plasma menu entry. will use systemctl hibernate today and we shall see what happens tomorrow.

Keyboard? Maybe. I assumed it's the mouse because the way it behaves. Could be keyboard too.

Offline

#15 2025-06-26 08:30:04

Tharbad
Member
Registered: 2016-02-27
Posts: 329

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

Good Morning.

systemctl hibernate yielded the same results. (dolphin, kwrite, telegram and plasma)
Also run evtest to see if some button in being presses during hibernate. got nothing (except my own typing).

Offline

#16 2025-06-26 08:46:22

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,070

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

Did you try whether re-attaching
1. your keyboard
2. your mouse
remedies this?

Offline

#17 2025-06-26 12:54:02

Tharbad
Member
Registered: 2016-02-27
Posts: 329

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

Just tried with mouse first and it works (!). But why?
Will try keyboard too tomorrow, just in case.

Offline

#18 2025-06-26 13:01:23

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,070

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

You're resetting the state by re-attaching the device
As a mitigation you can probably achieve the same w/ a sleep/resume hook that xinput dis-/enables the device :\

Offline

#19 2025-06-27 12:36:08

Tharbad
Member
Registered: 2016-02-27
Posts: 329

Re: [SOLVED] Qt based apps broken after returning from hibernate. Nvidia

Thanks. Will try. marking as solved.

Thank you very much!

Offline

Board footer

Powered by FluxBB