Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse wheel lockup #4

Closed
ovlx opened this issue Oct 9, 2019 · 58 comments
Closed

Mouse wheel lockup #4

ovlx opened this issue Oct 9, 2019 · 58 comments
Labels
bug Something isn't working

Comments

@ovlx
Copy link

ovlx commented Oct 9, 2019

I have encountered an issue where, if you scroll really up and down using the mouse wheel, all mouse inputs will lockup randomly, no left or right click, pressing space(and otherkeys) on the keyboard interrupts the lock and it continue as normal

running 18.04.3 with lxqt and kernels 5.0/5.2/5.3
disabling any keybinds to the mousewheel had no effect.
setting GDK_CORE_DEVICE_EVENTS=1 had no effect.

mouse is set to 500hz, will update on whether dropping the polling rate to 125hz changes anything.
edit: noeffect
latest git version was compilled using -O2

@ghost
Copy link

ghost commented Nov 5, 2019

I notice it too and I have a hard time troubleshooting this random lockup,
but in my case pointer can move freely but there is no response to any keypresses or mouse buttons for some 10-15 seconds. I see no errors in tty either.

@biopsin
Copy link
Contributor

biopsin commented Feb 15, 2020

Edit: tested running 'xinput test-xi2 --root'
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech Gaming Mouse G402 id=6 [slave pointer (2)]
⎜ ↳ USB Keyboard Consumer Control id=9 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ USB Keyboard id=7 [slave keyboard (3)]
↳ USB Keyboard System Control id=8 [slave keyboard (3)]
↳ USB Keyboard id=10 [slave keyboard (3)]

..and after some provoking scrolling both:

EVENT type 16 (RawButtonRelease)
device: 2 (6)
detail: 1
flags:
valuators:

EVENT type 15 (RawButtonPress)
device: 2 (6)
detail: 3
flags:
valuators:

stop responding until keypress
So far this gets triggered only on client windows..

@biopsin
Copy link
Contributor

biopsin commented Oct 23, 2020

Last comment on this issue; ..and it only triggers for me on a display resolution above 1920x1080 with same config files and so on (tested on two separate pc 4K vs HD).
I've being reading the source, but I'm to dumb to figure out the connection.

Edit: only difference between these systems are on
4K use xf86-input-evdev-2.10.6
HD use xf86-input-libinput-0.30.0

EDIT: it's started to act up on the other pc as well, so monitor size or the input drivers are not the issue.
(pekwm-0.1.18 built with makedepends="libXrender-devel libXft-devel fontconfig-devel"

@pigge2
Copy link

pigge2 commented Nov 30, 2020

i also experiences this but not with Firefox, only with vivaldi, and it appears to have gotten worse since my last system update which did not include pekwm 0.18, but i do run 0.18 compiled from git since 2020-11-24 and i cannot recreate the error on MATE. i think it might be related to Chromium's BrowserView since i can replicate the issue in Slack as well..
the freeze is the same behaviour as ctrl-alt-F in xorg, but you unfreeze it with any keyboard button, (which doesent work with ctrl-alt-F) and for me it happens at other times as well (apart from intentionally invoking it by scrolling in a browserview)

@biopsin
Copy link
Contributor

biopsin commented Feb 5, 2021

@pekdon while testing out branch zombie-14, any recommend tool I should use to trace this issue as well?

@pekdon
Copy link
Member

pekdon commented Feb 5, 2021

To be honest I'm not sure. xev might provide relevant information but it will be for a specific Window and will also produce so much output it will be hard to figure out what is relevant.

Consistent reproduction steps would help but that is easier said than done. Haven't experienced it myself in a long while.

@biopsin
Copy link
Contributor

biopsin commented Feb 5, 2021

~ $ xev -root

Focus and raise window (mouse leftclick)

PropertyNotify event, serial 18, synthetic NO, window 0x6de,
    atom 0x1 (PRIMARY), time 17915423, state PropertyNewValue

ConfigureNotify event, serial 18, synthetic NO, window 0x6de,
    event 0x6de, window 0xc002e9, (640,10), width 2560, height 2140,
    border_width 0, above 0xc002c2, override YES

PropertyNotify event, serial 18, synthetic NO, window 0x6de,
    atom 0x150 (_NET_CLIENT_LIST_STACKING), time 17915423, state PropertyNewValue

PropertyNotify event, serial 18, synthetic NO, window 0x6de,
    atom 0x156 (_NET_ACTIVE_WINDOW), time 17915424, state PropertyNewValue

Scrollwheel up

PropertyNotify event, serial 21, synthetic NO, window 0x6de,
    atom 0x1 (PRIMARY), time 17928415, state PropertyNewValue

PropertyNotify event, serial 21, synthetic NO, window 0x6de,
    atom 0x150 (_NET_CLIENT_LIST_STACKING), time 17928415, state PropertyNewValue

Scrollwheel down

PropertyNotify event, serial 21, synthetic NO, window 0x6de,
    atom 0x1 (PRIMARY), time 17930066, state PropertyNewValue

PropertyNotify event, serial 21, synthetic NO, window 0x6de,
    atom 0x150 (_NET_CLIENT_LIST_STACKING), time 17930066, state PropertyNewValue

but while it locks up so does xev output and a

FocusIn event, serial 21, synthetic NO, window 0x6de,
    mode NotifyGrab, detail NotifyInferior

brakes lockup

@pekdon
Copy link
Member

pekdon commented Feb 6, 2021

@biopsin it would be real interesting to see what happens if you clear out all but the bare minimum of key and mouse bindings, especially the ones on button 4/5 and see if you still can reproduce the issue!

I think I will be adding some trace logging on grab/ungrab operations as well to further be able to understand the issue.

@biopsin
Copy link
Contributor

biopsin commented Feb 6, 2021

@pekdon; Your right I do have set mouse button bindings on 4/5 in Client Actions = "Focus; Raise"
was set to try to compensate the lockups and then got used to it.. :oops
I'll test again a complete default setup with a bare minimum bindings for keys&mouse

@pekdon pekdon added the bug Something isn't working label Feb 8, 2021
@biopsin
Copy link
Contributor

biopsin commented Feb 16, 2021

Testing latest master with --log-file issue.log --log-level trace ; but it's unfortunatly not catched here either..
(log@teknik) - Link expires in 2 days
However it's getting much more difficult to trigger it now then on v0.1.8
hm maybe I spoke to soon, it's very eratic, sometimes I get it serveral times in a row, and then one now and then..??

@pigge2
Copy link

pigge2 commented Feb 17, 2021

i did a rebuild of master, and tried trace -logging as well, and i can't see anything either in the trace-log when the error occurs, but i can provoke the error in a few secconds if i scroll quickly up and down with my trackpad in Slack and Vivaldi, but also some times in RDP sessions (where it appears as if the shift-key is stuck, until i "release" the mouse pointer with a single press on the win-key) i think it might be in Electron apps most notably...

@ovlx
Copy link
Author

ovlx commented Feb 18, 2021

I have also discovered that the bug can also be triggered when just rapidly clicking ui elements (the window decorations for instance) it seems , so its not specifically the mouse wheel.

@pekdon
Copy link
Member

pekdon commented Feb 18, 2021

Seems as if I'll have to try harder to reproduce this locally, thanks for all the information so long. Won't have time to look into until earliest next week.

@maoamid
Copy link

maoamid commented Mar 7, 2021

I had the same issue with initial v0.1.18, but after I compiled the last revision (v0.2.0) the problem doesn't showed up anymore using the same configs... maybe someone can confirm

@pekdon
Copy link
Member

pekdon commented Mar 7, 2021

What is latest? (Githash)

@biopsin
Copy link
Contributor

biopsin commented Mar 7, 2021

Well I run @ [003cab5] and I still have lockups just less frequantly, however I have notice lockups as ovlx mentioned too, something that has not been so obvious as I use theme without decorations.

@pekdon
Copy link
Member

pekdon commented Mar 7, 2021

@biopsin mind trying d7616d3 out, had limited amount of time testing it out but might have improved the situation.

@pekdon
Copy link
Member

pekdon commented Mar 7, 2021

Oh, what are you building on? Verified OK on Ubuntu, NetBSD 9.1, FreeBSD 12 and OpenBSD 6.8

master should always compile fine, so that's an issue. Let me do a quick commit...

@biopsin
Copy link
Contributor

biopsin commented Mar 7, 2021

voidlinux build container

@biopsin
Copy link
Contributor

biopsin commented Mar 7, 2021

cleanup - temperary build fail..

@pekdon
Copy link
Member

pekdon commented Mar 7, 2021

voidlinux build container

pull and try again (should add that to my buildbot setup as well)

@biopsin
Copy link
Contributor

biopsin commented Mar 7, 2021

nope; same error.. all options left to default

configure_args="-DCMAKE_INSTALL_SYSCONFDIR=/etc"
makedepends="libjpeg-turbo-devel libpng-devel libXinerama-devel
libXft-devel libXrender-devel fontconfig-devel libXpm-devel libXrandr-devel"

@biopsin
Copy link
Contributor

biopsin commented Mar 7, 2021

[4f08bc9] build fine again ,tnx!
.. But back on the matter, unfortunatly lockups still happen here..

@pekdon
Copy link
Member

pekdon commented Mar 7, 2021

Do you have any mouse client window mouse bindings for button 4 or 5? Still have set GDK_CORE_DEVICE_EVENTS to 1? If so, try setting to 0 and remove those bindings and see if it still happens.

@pigge2
Copy link

pigge2 commented Mar 7, 2021

i cannot re-produce any lockups either.. i do have some weirdness going on with my mouse, which almost feels like interrupts/dma something, but that might be entirely unrelated to pekwm, i haven't had the time to investigate properly yet
yeah, it disappeared when i disabled picom

@biopsin
Copy link
Contributor

biopsin commented Mar 7, 2021

Sorry @pekdon it does not make any difference.
Tried: removed keybinds for 4&5, flipping GDK.. 0 then 1, I restarted and reloaded pekwm inbetween flips.
@pigge2 can you try a site with many pages, scroll fast down and up couple of times.

@pigge2
Copy link

pigge2 commented Mar 7, 2021

Sorry @pekdon it does not make any difference.
Tried: removed keybinds for 4&5, flipping GDK.. 0 then 1, I restarted and reloaded pekwm inbetween flips.
@pigge2 can you try a site with many pages, scroll fast down and up couple of times.

@biopsin no, i can't get it to lock up no matter what i do to abuse it, i previously could get it to lockup in less than 5 seconds without exception in Slack, now i've scrolled back 3 months in a #general channel with lots of chatter, and tried the archwiki page, all it did was to make my machine hot, but no lock-ups

@biopsin
Copy link
Contributor

biopsin commented Mar 7, 2021

@pigge2 thank you for testing.

@biopsin
Copy link
Contributor

biopsin commented Mar 7, 2021

thing is it happening in any client window, tested now scrolling back in simple terminal and it ain't even using gtk.
Edit: also tested disabling compositor (xcompmgr)

@pekdon
Copy link
Member

pekdon commented Mar 7, 2021

So for you @biopsin it got worse by the latest change, and this being on void linux I guess? (Probably time to get void up and running on my Pi then)

@maoamid
Copy link

maoamid commented Mar 8, 2021

What is latest? (Githash)

Yes, I build it from git yesterday (d7616d3) (with all deps installed, cmake, make, make install ... in Void Linux on a Toshiba laptop, I had some troubles running make with an error "XDestroyImage not declared" but I fixed it installing some devel libs and xwininfo )

Let me explain more, maybe helps (today I just had it happen again with or without compton / picom no matter to me):
It happens if I use a mouse (using touchpad I can't reproduce it yet)

  • How I reproduce it? copy some text from Firefox, paste it somewhere (VSCode), press alt+tab a few times, ctrl+c / ctrl+v / ctr+z after a few fast scrolling it locks up most of the time
  • After a lock up if I push any key all is back normally
  • If after a lock up I go to another view ("Super + n") and back to current view, the lock up is also gone but the window that "caused" the lock up is moved/positioned at other coordinates (very strange, it happens most of the time)

@biopsin
Copy link
Contributor

biopsin commented Mar 8, 2021

So for you @biopsin it got worse by the latest change

No, as mentioned earlier its less frequently, but still happens.
It almost feels like some buffer filling up and then need a purge by a keypress, so it all depends on how much scrolling I do. (..makes no sence :D )

@pekdon
Copy link
Member

pekdon commented Mar 8, 2021

It kind of feels like these actions are being triggered:

        ButtonRelease = "Mod1 4" { Actions = "SendToWorkspace Next; GotoWorkspace Next" }
        ButtonRelease = "Mod1 5" { Actions = "SendToWorkspace Prev; GotoWorkspace Prev" }
        ButtonRelease = "Mod1 Shift 4" { Actions = "SendToWorkspace PrevV; GotoWorkspace PrevV" }
        ButtonRelease = "Mod1 Shift 5" { Actions = "SendToWorkspace NextV; GotoWorkspace NextV" }

I will add some tracing of actions executed in the Action Handler to see if that sheds more light on the issue.

@biopsin
Copy link
Contributor

biopsin commented Mar 8, 2021

EDIT : @pekdon I'm wrong! removing all bindings on 4&5 fixes this woho

@pekdon
Copy link
Member

pekdon commented Mar 8, 2021

Do you include the system configuration (as they have them) or you have all own bindings @biopsin?

@biopsin
Copy link
Contributor

biopsin commented Mar 8, 2021

Se commen above

@biopsin
Copy link
Contributor

biopsin commented Mar 8, 2021

[ Issue resolved for me ]
I can finally confirm

	#ButtonPress = "4" { Actions = "Focus; Raise" }
	#ButtonPress = "5" { Actions = "Focus; Raise" }

this on Client is the culprint, and

	#ButtonPress = "Mod4 4" { Actions = "SendToWorkspace PrevV; Exec $DESKID; GotoWorkspace PrevV" }
	#ButtonPress = "Mod4 5" { Actions = "SendToWorkspace NextV; Exec $DESKID; GotoWorkspace NextV" }

works fine now
EDIT: and actually GDK_CORE_DEVICE_EVENTS=0|1 makes no difference.

@pekdon
Copy link
Member

pekdon commented Mar 10, 2021

@ovlx tried current git master with an updated mouse config to see if fixes the issues for you?

@ovlx
Copy link
Author

ovlx commented Mar 11, 2021

@pekdon
edit: actually let me check something first
edit2: scrolling doesn't seem to trigger it anymore , clicking on the window decorations can still cause it to lock up.

@pekdon
Copy link
Member

pekdon commented Mar 11, 2021

Thanks for testing @ovlx, at least I know where to look now.

@biopsin
Copy link
Contributor

biopsin commented Apr 1, 2021

Had to eventually remove those last ButtonPress 4/5 as well, had sporadically but very very seldom lockups.
After now two weeks of testing I no longer experience it.

Edit: Damnit, it lockedup on clicking issue link #.89..

@stuart-mclaren
Copy link

In case it helps, I'm seeing this too on FreeBSD 13.0: pekwm-0.1.17_5,1
Using the mouse scroll wheel on Chromium reproduces fairly frequently.

@biopsin
Copy link
Contributor

biopsin commented Sep 16, 2021

@stuart-mclaren is this a default install with no custom configuration?

@aeBune9pha5wadu8Thae
Copy link

I can confirm this bug across multiple configurations:

  • pekwm-0.1.17 on FreeBSD 12.2 with custom config
  • pekwm-0.1.17 on FreeBSD 13.0 with custom config
  • pekwm-0.1.18 on OpenBSD 7.0 with default and custom config

Both systems are notebooks, so scrolling is triggered by a touchpad. Otherwise they're fairly different.

The issue is easily reproducible by scrolling in a browser (chromium or firefox). If the bug is triggered, all content on screen stops reacting to mouse events. The cursor can be moved, but no click seems to get through.

As soon as any button on the keyboard is pressed, the mouse starts acting normal again, and some of the "queued" actions are executed, sometimes resulting in unwanted effects.

It seems to be directly related to the frequency of the scroll-events (if the touchpad is set to scroll faster, the issue turns up sooner and more often), and perplexingly also seems to depend on the complexity of the current screen content. This might explain why it is most noticeable in browsers, but can also happen in terminal windows (e.g. xterm), although much more infrequent.

@biopsin
Copy link
Contributor

biopsin commented Mar 5, 2022

After some more frantic scrolltestes on different long sites past days, Im happy to announce this bug is no longer happening for me building against master, so the last refactor of events have a positive effect. Great work!

@pekdon
Copy link
Member

pekdon commented Mar 5, 2022

Unfortunately I'm still able to produce lockups using gvim clicking franticly between the two windows as explained by gammy.

Also, the current master have had some issues for me on Debian 11 amd64 but seems OK on NetBSD 9.2.

Mind trying out the button-events branch and see how that behaves for you @biopsin ?

@biopsin
Copy link
Contributor

biopsin commented Mar 5, 2022

@pekdon but it does not trigger on the wheel so I salute it 👍🏻

@maoamid
Copy link

maoamid commented Mar 7, 2022

🤔 maybe I'm wrong but for me it looks like after a few clicks when the window manager seems frozen, it is behaving very similar when like a key press is required in a key chain sequence

@gammy
Copy link

gammy commented Mar 8, 2022

I concur with @pekdon and @maoamid, my "frantic click" issue persists. I just got back from a holiday and haven't yet had time to "frantically scroll" though. Excited to see some progress regardless!

@biopsin
Copy link
Contributor

biopsin commented Mar 12, 2022

@pekdon & button-events branch : there is something happening for me with the mouse -> Mod4 + [button] where nothing get triggered. Its bit weird as it did work yesterday when testing hmm. I have to switch to debug mode and try again..

@AstoriaFloyd
Copy link
Contributor

After the latest commit with the extra flush removed I have been unable to get pekwm to lock up.

@biopsin
Copy link
Contributor

biopsin commented Jun 13, 2022

I still experience one odd issue; sometimes when selecting on any applications top menubar the dropdownmenu wont expand or its hidden behind the main window, either way a Pekwm restart resolves it.
But else I concur with @AstoriaFloyd

@pekdon
Copy link
Member

pekdon commented Jun 26, 2022

Closing this issue, haven't had the lockups myself. If you're able to reproduce the menubar issue @biopsin, do open a new ticket with notes on how to reproduce it!

@pekdon pekdon closed this as completed Jun 26, 2022
@nwrkbiz
Copy link

nwrkbiz commented Jul 21, 2022

FYI: having the same issue. For me it happens when scrolling fast (using the scrollwheel or touchpad gestures, dragging the scrollbar does no harm). It is easy to reproduce when using chrome. To unblock the WM again I either need to hit the escape button a few times, or switch back and forth between two TTYs using "ctrl + alt + any F key".

I am using the debian stable stock version of pekwm.

@biopsin
Copy link
Contributor

biopsin commented Jul 21, 2022

@nwrkbiz

I am using the debian stable stock version of pekwm.

what output from pekwm --version ?

I guess its solved in master so you will have to build it for the time being.

@nwrkbiz
Copy link

nwrkbiz commented Jul 21, 2022

@nwrkbiz

I am using the debian stable stock version of pekwm.

what output from pekwm --version ?

I guess its solved in master so you will have to build it for the time being.

pekwm: version 0.1.18

O.k. will try.

@AstoriaFloyd
Copy link
Contributor

The debian repo version of pekwm is nearly two years outdated, and you should update to the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants