Summary: | no response when touchpad toggle key was pressed (Fn key) | ||
---|---|---|---|
Product: | [Unmaintained] ktouchpadenabler | Reporter: | Cloud Han <heliumhgy> |
Component: | General | Assignee: | Albert Astals Cid <aacid> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | rockonthemoonfm, Vdragon.Taiwan |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kde-workspace/60b423452be26e0d8c1408e7471f50cf09af28bc | Version Fixed In: | 4.11.0 |
Sentry Crash Report: | |||
Attachments: |
test.pro
main.cpp New main.cpp file |
Description
Cloud Han
2013-05-31 00:10:48 UTC
Can you please run qdbus org.kde.kded /kded loadedModules | grep ktouch to make sure ktouchpadenabler is loaded? (In reply to comment #1) > Can you please run > qdbus org.kde.kded /kded loadedModules | grep ktouch > to make sure ktouchpadenabler is loaded? yes, I got ktouchpadenabler from the command. Ok, can you try this? $ qdbus org.kde.kded /kded unloadModule ktouchpadenabler This unloads ktouchpadenabler, now start xev $ xev and press the the Fn key for togglign the touchpad, you should get something like KeyPress event, serial 37, synthetic NO, window 0x6200001, root 0x9d, subw 0x0, time 7825804, (896,886), root:(899,909), state 0x0, keycode 199 (keysym 0x1008ffa9, XF86TouchpadToggle), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyRelease event, serial 40, synthetic NO, window 0x6200001, root 0x9d, subw 0x0, time 7825868, (896,886), root:(899,909), state 0x0, keycode 199 (keysym 0x1008ffa9, XF86TouchpadToggle), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False (In reply to comment #3) > Ok, can you try this? > > $ qdbus org.kde.kded /kded unloadModule ktouchpadenabler > > This unloads ktouchpadenabler, now start xev > > $ xev > > and press the the Fn key for togglign the touchpad, you should get something > like > > KeyPress event, serial 37, synthetic NO, window 0x6200001, > root 0x9d, subw 0x0, time 7825804, (896,886), root:(899,909), > state 0x0, keycode 199 (keysym 0x1008ffa9, XF86TouchpadToggle), > same_screen YES, > XLookupString gives 0 bytes: > XmbLookupString gives 0 bytes: > XFilterEvent returns: False > > KeyRelease event, serial 40, synthetic NO, window 0x6200001, > root 0x9d, subw 0x0, time 7825868, (896,886), root:(899,909), > state 0x0, keycode 199 (keysym 0x1008ffa9, XF86TouchpadToggle), > same_screen YES, > XLookupString gives 0 bytes: > XFilterEvent returns: False *Before* unload, I got this: KeyPress event, serial 40, synthetic NO, window 0x4e00001, root 0x93, subw 0x0, time 19034173, (540,39), root:(601,625), state 0x10, keycode 199 (keysym 0x1008ffa9, XF86TouchpadToggle), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False After : KeyRelease event, serial 41, synthetic NO, window 0x4e00001, root 0x93, subw 0x0, time 19220282, (641,-15), root:(702,571), state 0x10, keycode 199 (keysym 0x1008ffa9, XF86TouchpadToggle), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False seems in openSUSE, I got a table with two columns of numbers (In reply to comment #4) > (In reply to comment #3) > > Ok, can you try this? > > > > $ qdbus org.kde.kded /kded unloadModule ktouchpadenabler > > > > This unloads ktouchpadenabler, now start xev > > > > $ xev > > > > and press the the Fn key for togglign the touchpad, you should get something > > like > > > > KeyPress event, serial 37, synthetic NO, window 0x6200001, > > root 0x9d, subw 0x0, time 7825804, (896,886), root:(899,909), > > state 0x0, keycode 199 (keysym 0x1008ffa9, XF86TouchpadToggle), > > same_screen YES, > > XLookupString gives 0 bytes: > > XmbLookupString gives 0 bytes: > > XFilterEvent returns: False > > > > KeyRelease event, serial 40, synthetic NO, window 0x6200001, > > root 0x9d, subw 0x0, time 7825868, (896,886), root:(899,909), > > state 0x0, keycode 199 (keysym 0x1008ffa9, XF86TouchpadToggle), > > same_screen YES, > > XLookupString gives 0 bytes: > > XFilterEvent returns: False > > *Before* unload, I got this: > > KeyPress event, serial 40, synthetic NO, window 0x4e00001, > root 0x93, subw 0x0, time 19034173, (540,39), root:(601,625), > state 0x10, keycode 199 (keysym 0x1008ffa9, XF86TouchpadToggle), > same_screen YES, > XLookupString gives 0 bytes: > XmbLookupString gives 0 bytes: > XFilterEvent returns: False > > After : > > KeyRelease event, serial 41, synthetic NO, window 0x4e00001, > root 0x93, subw 0x0, time 19220282, (641,-15), root:(702,571), > state 0x10, keycode 199 (keysym 0x1008ffa9, XF86TouchpadToggle), > same_screen YES, > XLookupString gives 0 bytes: > XFilterEvent returns: False > > > seems in openSUSE, I got a table with two columns of numbers Oh, forgot the press event after unloading: KeyPress event, serial 41, synthetic NO, window 0x4e00001, root 0x93, subw 0x0, time 19220442, (641,-15), root:(702,571), state 0x10, keycode 199 (keysym 0x1008ffa9, XF86TouchpadToggle), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyRelease event, serial 41, synthetic NO, window 0x4e00001, root 0x93, subw 0x0, time 19220442, (641,-15), root:(702,571), state 0x10, keycode 199 (keysym 0x1008ffa9, XF86TouchpadToggle), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False Hmmm, you should not be seeing the keypresses/releases when ktouchpadenabler is loaded, do you see any ktouchpadenabler warning in .xsession-errors? grep ktouchpadenabler .xsession-errors to load it again qdbus org.kde.kded /kded loadModule ktouchpadenabler no, there is no warning about ktouch. I'm kind of out of ideas now. If i give you a simple C++ code to try some stuff on your system, do you think you can compile it and run it? It's a few commands only maybe, I'll try. So, come on, it's late in Asia, 11 p.m. I'm busy preparing the code, maybe it'll take a few hours, just read your email the following days and we can continue, there's no need to do it *now* Well, you mean *simple code*... so got it, I'll when you are done the code. :) Hi there, sorry for the delay, i'll be attaching two files, test.pro and main.cpp, download them both, put them inside a temporary folder and run qmake make ./test and attach the result, you'll need to have the libqt4-dev, libxi-dev, and libx11-dev (package names may vary depending on your distro) Created attachment 80459 [details]
test.pro
Created attachment 80460 [details]
main.cpp
Here I got this: cloud@Cloud:test$ ./test There are 15 devices Device 2 does not have synaptics property Device 3 does not have synaptics property Device 4 does not have synaptics property Device 5 does not have synaptics property Device 6 does not have synaptics property Device 7 does not have synaptics property Device 8 does not have synaptics property Device 9 does not have synaptics property Device 10 does not have synaptics property Device 11 does not have synaptics property Device 12 does not have synaptics property Device 13 does not have synaptics property Device 14 does not have synaptics property Device 15 has synaptics property Device 15 has enabled property Device 16 does not have synaptics property Found touchpad with deviceId 15 Grab successful for 199 1 Grab successful for 200 1 Grab successful for 201 1 X Error: BadAccess (attempt to access private resource denied) 10 Major opcode: 33 (X_GrabKey) Resource id: 0x93 X Error: BadAccess (attempt to access private resource denied) 10 Major opcode: 33 (X_GrabKey) Resource id: 0x93 X Error: BadAccess (attempt to access private resource denied) 10 Major opcode: 33 (X_GrabKey) Resource id: 0x93 Is that with the ktouchpadenabler kded module loaded or not loaded? yes, ktouchpadenabler is loaded. When unloaded, I only got this: There are 15 devices Device 2 does not have synaptics property Device 3 does not have synaptics property Device 4 does not have synaptics property Device 5 does not have synaptics property Device 6 does not have synaptics property Device 7 does not have synaptics property Device 8 does not have synaptics property Device 9 does not have synaptics property Device 10 does not have synaptics property Device 11 does not have synaptics property Device 12 does not have synaptics property Device 13 does not have synaptics property Device 14 does not have synaptics property Device 15 does not have synaptics property Device 16 has synaptics property Device 16 has enabled property Found touchpad with deviceId 16 Grab successful for 199 1 Grab successful for 200 1 Grab successful for 201 1 Ok, giving you a new main.cpp, this one will say what is the touchpad status and if you press the keys should switch between enabling and disabling the touchpad, does this work? (Make sure you unload ktouchpadenabler) Created attachment 80537 [details]
New main.cpp file
Hi, just come to say I have the nearly same issue. I'd previously filed a bug report here: https://bugs.launchpad.net/ubuntu/+source/kde-workspace/+bug/1190685 I'll do the same test when I got free time ;) The version I used is 4.10.4 from Kubuntu Backports PPA, and OS is Ubuntu 12.04LTS x86-32bit version on a ASUS A53S Laptop In VERY RARE cases I can successfully toggle the touchpad, but mostly it just don't work :( Should I disable Synaptiks daemon from autostart or should I keep it? (In reply to comment #20) > Ok, giving you a new main.cpp, this one will say what is the touchpad status > and if you press the keys should switch between enabling and disabling the > touchpad, does this work? (Make sure you unload ktouchpadenabler) Touchpad is enabled Touchpad disabled Touchpad enabled Successfully toggle touchpad status, works prefect, thanks. (In reply to comment #23) > The version I used is 4.10.4 from Kubuntu Backports PPA, and OS is Ubuntu > 12.04LTS x86-32bit version on a ASUS A53S Laptop > > In VERY RARE cases I can successfully toggle the touchpad, but mostly it > just don't work :( > > Should I disable Synaptiks daemon from autostart or should I keep it? Download the two attachments and save to same directory. unload ktouchpadenabler Module: qdbus org.kde.kded /kded unloadModule ktouchpadenabler compile the file: qmake make run the binary: ./test press the FN key and check if it toggle the status now (In reply to comment #25) > (In reply to comment #23) > > The version I used is 4.10.4 from Kubuntu Backports PPA, and OS is Ubuntu > > 12.04LTS x86-32bit version on a ASUS A53S Laptop > > > > In VERY RARE cases I can successfully toggle the touchpad, but mostly it > > just don't work :( > > > > Should I disable Synaptiks daemon from autostart or should I keep it? > > Download the two attachments and save to same directory. > unload ktouchpadenabler Module: > qdbus org.kde.kded /kded unloadModule ktouchpadenabler > > compile the file: > qmake > make > > run the binary: > ./test > > press the FN key and check if it toggle the status now Works as expected. :) Thanks! Well, this is weird since this code is doing exatly what ktouchpadenabler is doing so i have no clue why this would work and ktouchpadenabler would not :-/ I'll leave this open and will try to think about the issue again and come back to you later. i had the same problem with a similar setup, Arch 4.10/4.11 beta 2. ktouchpadenabler daemon was active and toggle-touchpad fn key was correctly mapped according to xev. at first it worked, after it oddly stopped working. today I've found the issue , at least for my case: setting Numlock ON in keyboard kcm. If set to "OFF" or "leave unchanged" ktouchpad enabler works. so the bug is between keyboard KCM settings and ktouchpadenabler daemon. so bug is at least CONFIRMED, hope that it will be marked as FIXED for 4.11 LTS release :) @josephk: Can you attach a screenshot of what you mean with "setting numlock on in keyboard kcm"? ok, after more testing i've found out that ktouchpadenabler doesn't work simply when num lk is active. (Keyboard kcm was just activating/deactivating NumLock). it works again after toggling Numlock off. @josephk: That is an interesting find indeed, are you able to compile the example as explained in comment 25? Does that also only work when numlock is disabled? Or works all the time? ok, patch here works. if numlk is disabled, touchpad toggle behaves correctly, notifications, no console output. if numlk is enabled, touchpad toggle behaves correctly, no notifications, following output: [alex@hobo x]$ ./test There are 12 devices Device 2 does not have synaptics property Device 3 does not have synaptics property Device 4 does not have synaptics property Device 5 does not have synaptics property Device 8 does not have synaptics property Device 6 does not have synaptics property Device 10 does not have synaptics property Device 7 does not have synaptics property Device 9 does not have synaptics property Device 11 does not have synaptics property Device 12 does not have synaptics property Device 13 has synaptics property Device 13 has enabled property Found touchpad with deviceId 13 Grab successful for 199 1 Grab successful for 200 1 Grab successful for 201 1 X Error: BadAccess (attempt to access private resource denied) 10 Major opcode: 33 (X_GrabKey) Resource id: 0x91 X Error: BadAccess (attempt to access private resource denied) 10 Major opcode: 33 (X_GrabKey) Resource id: 0x91 X Error: BadAccess (attempt to access private resource denied) 10 Major opcode: 33 (X_GrabKey) Resource id: 0x91 Touchpad is disabled Touchpad enabled Touchpad disabled Touchpad enabled Touchpad disabled @Albert Astals Cid I got the same result with @josephk, ktouchpadenabler only works when Numlock is not toggled, however the example here works in whatever cases. Ok, thanks. Sadly i don't have a numlock key on my laptop so it's not easy for me to reproduce, i'll have a look to see what can be going on wrong. As far as I know, laptops smaller than 15.6' which come without number pad should also have NumLock key bounded with a Fn key, maybe you can try it :) or you can use an external USB keyboard with NumLock I could try this in a friends laptop this week and can confirm that indeed setting NumLock upsets ktouchpadenabler, unfortunately did not have time to debug it further. Will try to get an external USB keyboard and see if that also causes the problem. Git commit 60b423452be26e0d8c1408e7471f50cf09af28bc by Albert Astals Cid. Committed on 31/07/2013 at 23:09. Pushed by aacid into branch 'KDE/4.11'. Grab the enable/disable/toggle Touchpad keys with any modifier This way it still works even if you have numlock enabled FIXED-IN: 4.11.0 M +1 -1 ktouchpadenabler/ktouchpadenabler_daemon.cpp http://commits.kde.org/kde-workspace/60b423452be26e0d8c1408e7471f50cf09af28bc Let's hope that nobody tries to assign Shift+Touchpad keys for other functions ;) |