Closed jonchun closed 4 years ago
No, I appreciate you letting me know. Hmmm.. looks like something about the plasmashell is making it difficult for the x11 library to return a top window. It's returning a "BadWindow" error, which sometimes just happens and if I could return a 0 or null value I would, but the BadWindow error tends to crash the open_display() function altogether.
In my testing it did not occur frequently enough to address it, but it look like it is occurring frequently in your usage. I will need to dog food this I guess on another laptop that has Xubuntu on it, but I can install KDE Neon or Kubuntu and see what happens. It seems it doesn't come up on my 2 chromebooks or my VMs enough to have addressed it already.
Sounds good -- I'm finally starting to see why people suck so many hours of their life into using different distros... Every time I think I finally have everything the way I want it... just one little thing breaks to a point where I want to try something else.
Since everything else is working really well, I hereby promise to not reinstall this computer's OS anymore and see if you can get kinto working on KDE Neon first, so feel free to ping me if you need me to check anything on my system to troubleshoot on a different machine.
I also have 90% of everything on my system that I changed documented here. (ignore the fact that its labeled kubuntu. I did it in neon too.) Any undocumented changes are probably related to installing software such as Telegram or minor GUI-level changes, so are unlikely to be the cause of any issues when troubleshooting.
So a little bit more information that might help, but could also be a red herring.
Here are the behaviors I've noticed. Before list them, here was my testing methodology.
Open up app1
Start typing stuff in app1. I used 12121212121231121212...
While continuously mashing the input above, switch window focus to app2.
Switch focus to app1.
Repeat switching focus.
When switching windows between firefox/sublimetext3, there is a noticeable 1-2 second delay before keyboard input starts working. However, none of the input ever seems to get lost. Not sure if this is the same delay/issue you mention in #32 . It just takes a little bit before the input starts showing up.
When switching between telegram/sublimetext3, there is no delay ever and it works perfectly no matter how many times I switch.
When switching between sublimetext3 and Konsole, things get dicey really quickly. Konsole usually freezes up after one or two window switches and won't take any more keyboard input until I either close/restart it, or ONCE IN A WHILE, i can get keyboard input to start working again by switching window focus a few more times. (perhaps it has something to do with the state of the keyswap service)
When switching between sublimetext3 and Dolphin (I tested using the file path area/filter area as my input box), I get similar results as with Konsole. Dolphin ends up freezing/crashing.
SublimeText has not once crashed/frozen up on me. Same with Telegram.
While at first it was just mildly annoying, this has definitely started to impact workflow enough for me to likely need to put KDE Neon on hold. What I might do is pull out a spare SSD I have and temporarily go back to elementary OS and just keep this Neon disk for troubleshooting/once you've had a chance to investigate further.
I just updated the hotfix branch to address the issues you've been having! I apologize that the issue existed at all as it really is something that should have been resolved weeks ago. I just didn't realize how severe this bug was.
I will be merging the hotfix into master and the dev branches momentarily.
I did pretty extensive testing under Manjaro KDE edition (would have tested under KDE Neon but the VM is borked for unknown reasons), and I know for a fact that I was duplicating the very same issue you've been having (hopefully you had none additional on top of what I duplicated, but I knocked out a couple of issues at once and added additional debug output to help address any similar issues faster).
Instead of just seeing this error
fail to get top window: 1
You'll see this
fail to get top window: 1, e.type: 17, last_event: 18, current_app: plasmashell
So even if you or someone is encountering something I have never seen before I can address it quickly. The asynchronicity was making things difficult so I should have had that from the start.
Merged hotfix into master and I will make a new release once I have confirmation that it resolves the issue. https://github.com/rbreaves/kinto/commit/6c46696bd40b7ae6c41139325b0874a95519d0e2
I was also noticing the Konsole sometimes ignores the keyboard input during the creation of the patch as well. I am not sure if that still occurs now that the patch is in place. I had to have 2 or 3 konsole windows open as I added in that patch because yes.. one of 2 of the konsole windows would lose the ability to take input oddly enough.
I think that was related to to buggy code that was causing segmentation faults in xlib. Kinto was looking for child values for non-existing Windows essentially - it no longer does that. If a destroy notify signal has been emitted then Kinto will completely ignore it and move on to the next event. In addition to that I also recheck it before running the actual XQueryTree as well due to the asynchronous nature of Xlib.. it is possible that even with one check to skip over the event that XQueryTree still captures it, so I double check the event type just before executing that function.
So far I cannot cause Kinto to crash under KDE any more.
Insane turnaround time! I'll give it a shot later today and let you know what I find.
later today meant... right away..
Mar 30 18:10:13 jchun-desktop systemd[1430]: keyswap.service: Failed with result 'exit-code'.
Mar 30 18:10:13 jchun-desktop systemd[1430]: Failed to start keyswap for Terminal and GUI.
Mar 30 18:10:38 jchun-desktop systemd[1430]: Started keyswap for Terminal and GUI.
Mar 30 18:10:38 jchun-desktop bash[5460]: ./kintox11: error while loading shared libraries: libjson-c.so.4: cannot open shared object file: No such file or directory
Mar 30 18:10:38 jchun-desktop systemd[1430]: keyswap.service: Main process exited, code=exited, status=127/n/a
Mar 30 18:10:38 jchun-desktop systemd[1430]: keyswap.service: Failed with result 'exit-code'.
Mar 30 18:10:39 jchun-desktop systemd[1430]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 30 18:10:39 jchun-desktop systemd[1430]: keyswap.service: Scheduled restart job, restart counter is at 1.
Mar 30 18:10:39 jchun-desktop systemd[1430]: Stopped keyswap for Terminal and GUI.
Mar 30 18:10:39 jchun-desktop systemd[1430]: Started keyswap for Terminal and GUI.
Mar 30 18:10:39 jchun-desktop bash[5548]: ./kintox11: error while loading shared libraries: libjson-c.so.4: cannot open shared object file: No such file or directory
Mar 30 18:10:39 jchun-desktop systemd[1430]: keyswap.service: Main process exited, code=exited, status=127/n/a
Mar 30 18:10:39 jchun-desktop systemd[1430]: keyswap.service: Failed with result 'exit-code'.
Mar 30 18:10:40 jchun-desktop systemd[1430]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 30 18:10:40 jchun-desktop systemd[1430]: keyswap.service: Scheduled restart job, restart counter is at 2.
Mar 30 18:10:40 jchun-desktop systemd[1430]: Stopped keyswap for Terminal and GUI.
Mar 30 18:10:40 jchun-desktop systemd[1430]: Started keyswap for Terminal and GUI.
Mar 30 18:10:40 jchun-desktop bash[5551]: ./kintox11: error while loading shared libraries: libjson-c.so.4: cannot open shared object file: No such file or directory
Mar 30 18:10:40 jchun-desktop systemd[1430]: keyswap.service: Main process exited, code=exited, status=127/n/a
Mar 30 18:10:40 jchun-desktop systemd[1430]: keyswap.service: Failed with result 'exit-code'.
Mar 30 18:10:42 jchun-desktop systemd[1430]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 30 18:10:42 jchun-desktop systemd[1430]: keyswap.service: Scheduled restart job, restart counter is at 3.
Mar 30 18:10:42 jchun-desktop systemd[1430]: Stopped keyswap for Terminal and GUI.
Mar 30 18:10:42 jchun-desktop systemd[1430]: Started keyswap for Terminal and GUI.
Mar 30 18:10:42 jchun-desktop bash[5556]: ./kintox11: error while loading shared libraries: libjson-c.so.4: cannot open shared object file: No such file or directory
Mar 30 18:10:42 jchun-desktop systemd[1430]: keyswap.service: Main process exited, code=exited, status=127/n/a
Mar 30 18:10:42 jchun-desktop systemd[1430]: keyswap.service: Failed with result 'exit-code'.
Mar 30 18:10:43 jchun-desktop systemd[1430]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 30 18:10:43 jchun-desktop systemd[1430]: keyswap.service: Scheduled restart job, restart counter is at 4.
Mar 30 18:10:43 jchun-desktop systemd[1430]: Stopped keyswap for Terminal and GUI.
Mar 30 18:10:43 jchun-desktop systemd[1430]: Started keyswap for Terminal and GUI.
Mar 30 18:10:43 jchun-desktop bash[5644]: ./kintox11: error while loading shared libraries: libjson-c.so.4: cannot open shared object file: No such file or directory
Mar 30 18:10:43 jchun-desktop systemd[1430]: keyswap.service: Main process exited, code=exited, status=127/n/a
Mar 30 18:10:43 jchun-desktop systemd[1430]: keyswap.service: Failed with result 'exit-code'.
Mar 30 18:10:44 jchun-desktop systemd[1430]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 30 18:10:44 jchun-desktop systemd[1430]: keyswap.service: Scheduled restart job, restart counter is at 5.
Mar 30 18:10:44 jchun-desktop systemd[1430]: Stopped keyswap for Terminal and GUI.
Mar 30 18:10:44 jchun-desktop systemd[1430]: keyswap.service: Start request repeated too quickly.
Mar 30 18:10:44 jchun-desktop systemd[1430]: keyswap.service: Failed with result 'exit-code'.
Mar 30 18:10:44 jchun-desktop systemd[1430]: Failed to start keyswap for Terminal and GUI.
lines 9234-9273/9273 (END)
I might try to build from source/resolve later if there's nothing you can do on your end to use an older version of libjson. Looks like it is not available for Neon/18.04. https://packages.ubuntu.com/search?keywords=libjson-c4
Oh crap o.o, I compiled it on the wrong OS. I should have known that would occur. One sec!!
@Jonchun Ok both master and dev now have the proper binary compiled.
I should have noticed the binary had dropped in size by like 200kb, my code by itself is only like 50kb - which is actually double of where it was a month or 2 ago. The json-c library needs to be linked statically and it was pain to get setup right and I forgot to reduplicate the static linking when dev'ing under KDE (since json-c was already installed).
And truth be told this issue was on my radar once before, but I really thought that it was insignificant then because it didn't impact me on Gnome or XFCE hardly at all and I had not been dog fooding it on KDE like I should have been. Overall this update will help make the application a lot more stable across all DE's, and the new output should tell me with a lot more clarity of what it is that is causing a crash well enough that I may not even need to run the same programs or duplicate the issue exactly to fix it.
I had a feeling you just built it incorrectly which is why I didn't bother. It is MUCH more stable than before, but it looks like your extended logging didn't get picked up. It crashed once for me after a little bit of use.
Mar 30 18:35:18 jchun-desktop bash[14835]: firefox: Firefox
Mar 30 18:35:21 jchun-desktop bash[14835]: gui: systemsettings
Mar 30 18:35:22 jchun-desktop bash[14835]: firefox: Firefox
Mar 30 18:35:27 jchun-desktop bash[14835]: term: konsole
Mar 30 18:35:29 jchun-desktop bash[14835]: firefox: Firefox
Mar 30 18:35:31 jchun-desktop bash[14835]: term: konsole
Mar 30 18:35:39 jchun-desktop bash[14835]: firefox: Firefox
Mar 30 18:35:43 jchun-desktop bash[14835]: gui: albert
Mar 30 18:35:46 jchun-desktop bash[14835]: X11 error: type=0, serial=3177, code=3
Mar 30 18:35:46 jchun-desktop bash[14835]: fail to get top window: 1
Mar 30 18:35:46 jchun-desktop systemd[1430]: keyswap.service: Main process exited, code=exited, status=1/FAILURE
Mar 30 18:35:46 jchun-desktop systemd[1430]: keyswap.service: Failed with result 'exit-code'.
Mar 30 18:35:47 jchun-desktop systemd[1430]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 30 18:35:47 jchun-desktop systemd[1430]: keyswap.service: Scheduled restart job, restart counter is at 1.
Mar 30 18:35:47 jchun-desktop systemd[1430]: Stopped keyswap for Terminal and GUI.
Mar 30 18:35:47 jchun-desktop systemd[1430]: Started keyswap for Terminal and GUI.
Mar 30 18:35:47 jchun-desktop bash[21403]: Importing user_config.json...
Mar 30 18:35:47 jchun-desktop bash[21403]: Data from user_config.json imported successfully.
Mar 30 18:35:47 jchun-desktop bash[21403]: Starting keyswap...
Mar 30 18:35:47 jchun-desktop bash[21403]: First window name: systemsettings
Mar 30 18:35:47 jchun-desktop bash[21403]: gui: systemsettings
Mar 30 18:35:51 jchun-desktop bash[21403]: term: konsole
Mar 30 18:35:54 jchun-desktop bash[21403]: gui: systemsettings
Mar 30 18:35:55 jchun-desktop bash[21403]: term: konsole
Mar 30 18:35:57 jchun-desktop bash[21403]: gui: systemsettings
Mar 30 18:35:57 jchun-desktop bash[21403]: term: konsole
My git log says I'm on commit 564360e9fa53af7ebff66fb5bd35e2104afd3551
Well that is bizarre.. surely that is from an earlier log or something? The extended code is only in there once and I know it got compiled in.. there shouldn't be any other way for a "fail to get top window" to appear without all of it.
if(xerror){
printf("fail to get top window: %ld, e.type: %d, last_event: %d, current_app: %s\n",w,etype,last_event, current_app);
break;
}
I've got albert configured on a couple of chromebooks so I will test them out real quick with the new code release and see if it crashes for me or not.
I think you provided an old log, but yes albert is capable of causing segmentation faults sometimes right away and other times after much toggling. Will look at encapsulating the get window focus function the same way I did with get top window and I think that'll address it.
Also you can get live info via this.
journalctl -f --user-unit=keyswap.service -b
Mar 30 18:08:02 gos-ac720 systemd[969]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 30 18:08:02 gos-ac720 systemd[969]: keyswap.service: Scheduled restart job, restart counter is at 1.
Mar 30 18:08:02 gos-ac720 systemd[969]: Stopped keyswap for Terminal and GUI.
Mar 30 18:08:02 gos-ac720 systemd[969]: Started keyswap for Terminal and GUI.
Mar 30 18:08:03 gos-ac720 bash[10070]: Importing user_config.json...
Mar 30 18:08:03 gos-ac720 bash[10070]: Data from user_config.json imported successfully.
Mar 30 18:08:03 gos-ac720 bash[10070]: Starting keyswap...
Mar 30 18:08:03 gos-ac720 bash[10070]: First window name: Chromium-browser
Mar 30 18:08:03 gos-ac720 bash[10070]: chrome: Chromium-browser
Mar 30 18:08:04 gos-ac720 bash[10070]: gui: albert
Mar 30 18:08:05 gos-ac720 bash[10070]: chrome: Chromium-browser
Mar 30 18:08:06 gos-ac720 bash[10070]: term: konsole
Mar 30 18:08:17 gos-ac720 bash[10070]: gui: albert
Mar 30 18:08:18 gos-ac720 bash[10070]: /home/rbreaves/.config/kinto/xactive.sh: line 4: 10072 Segmentation fault (core dumped) ./kintox11
Mar 30 18:08:18 gos-ac720 systemd[969]: keyswap.service: Main process exited, code=exited, status=139/n/a
Mar 30 18:08:18 gos-ac720 systemd[969]: keyswap.service: Failed with result 'exit-code'.
Mar 30 18:08:19 gos-ac720 systemd[969]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 30 18:08:19 gos-ac720 systemd[969]: keyswap.service: Scheduled restart job, restart counter is at 2.
@Jonchun Sure enough, you were right. Somehow I compiled a different set of code from what was in the source/current branch. I have no idea how that happened, so that fix you ran was only partial of the complete fix.
What is in the source is now fully in the binary -.-. Sorry about that.
I did not even bother with changing anything about the focus window function, it appears to be fine as is.
Also I have tested it with Albert under Gnome, KDE and XFCE. There are slight differences in how it logs between the 3. Gnome never shows albert in the logs at all.. that is fine I guess, but I think it just means the DE has less XEvents attached to it when opened via hotkey. KDE almost always shows Albert in the log, again that is fine and XFCE always appears to show albert in the log.
From what I can tell the binary is properly compiled with the source I had uploaded earlier and I can't seem to generate crashes, but please let me know if your results differ. I've also gone ahead with making it a full release now, and given the severity of the bug I've incremented it to 1.0.6. Normally I reserve those increments for features, but I really want people to update. https://github.com/rbreaves/kinto/releases/tag/1.0.6
Awesome, I'll give it another shot soon! A bit late to the party since you already figured it out, but yea I was 99% sure it was not an old log since I could see the failures from the libjsonc stuff in between my old logs and the new ones.
I can still duplicate the bug with Konsole not picking up on input, it is more rare I think now and switch apps seems to fix it immediately, but that seems to indicate to me that the problem has something to do with xkb. Going to see if I can find info out there of others noticing a problem.
Once I hear back from you on this one though I will close this ticket. I will open a separate ticket for Konsole however and you can comment in or watch that ticket.
Got it to run on my end! However, only the master branch. I'll leave this here in case it's helpful but the dev branch blew my DE up.
Mar 30 21:13:47 jchun-desktop bash[26480]: firefox: Firefox
Mar 30 21:13:49 jchun-desktop bash[26480]: term: konsole
Mar 30 21:14:08 jchun-desktop systemd[1430]: Stopping keyswap for Terminal and GUI...
Mar 30 21:14:08 jchun-desktop systemd[1430]: Stopped keyswap for Terminal and GUI.
Mar 30 21:14:52 jchun-desktop systemd[1430]: Started keyswap for Terminal and GUI.
Mar 30 21:14:56 jchun-desktop systemd[1430]: Stopping keyswap for Terminal and GUI...
Mar 30 21:14:56 jchun-desktop systemd[1430]: Stopped keyswap for Terminal and GUI.
Mar 30 21:14:56 jchun-desktop systemd[1430]: Started keyswap for Terminal and GUI.
Mar 30 21:14:56 jchun-desktop bash[28225]: Importing user_config.json...
Mar 30 21:14:56 jchun-desktop bash[28225]: Data from user_config.json imported successfully.
Mar 30 21:14:56 jchun-desktop bash[28225]: Starting keyswap...
Mar 30 21:14:56 jchun-desktop bash[28225]: First window name: konsole
Mar 30 21:14:56 jchun-desktop bash[28225]: term: konsole
Mar 30 21:15:00 jchun-desktop bash[28225]: XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
Mar 30 21:15:00 jchun-desktop bash[28225]: after 140 requests (140 known processed) with 0 events remaining.
Mar 30 21:15:00 jchun-desktop bash[28225]: firefox: Firefox
Mar 30 21:15:00 jchun-desktop bash[28225]: XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
Mar 30 21:15:00 jchun-desktop bash[28225]: after 29 requests (29 known processed) with 0 events remaining.
Mar 30 21:15:00 jchun-desktop systemd[1430]: keyswap.service: Main process exited, code=exited, status=1/FAILURE
Mar 30 21:15:00 jchun-desktop systemd[1430]: keyswap.service: Failed with result 'exit-code'.
Mar 30 21:15:02 jchun-desktop systemd[1430]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 30 21:15:02 jchun-desktop systemd[1430]: keyswap.service: Scheduled restart job, restart counter is at 1.
Mar 30 21:15:02 jchun-desktop systemd[1430]: Stopped keyswap for Terminal and GUI.
Mar 30 21:15:02 jchun-desktop systemd[1430]: Started keyswap for Terminal and GUI.
Mar 30 21:15:02 jchun-desktop bash[28510]: /home/jchun/.config/kinto/xactive.sh: line 10: 28512 Segmentation fault ./kintox11
Mar 30 21:15:02 jchun-desktop systemd[1430]: keyswap.service: Main process exited, code=exited, status=139/n/a
Mar 30 21:15:02 jchun-desktop systemd[1430]: keyswap.service: Failed with result 'exit-code'.
Mar 30 21:15:03 jchun-desktop systemd[1430]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 30 21:15:03 jchun-desktop systemd[1430]: keyswap.service: Scheduled restart job, restart counter is at 2.
Mar 30 21:15:03 jchun-desktop systemd[1430]: Stopped keyswap for Terminal and GUI.
Mar 30 21:15:03 jchun-desktop systemd[1430]: Started keyswap for Terminal and GUI.
Mar 30 21:15:03 jchun-desktop systemd[1430]: Stopping keyswap for Terminal and GUI...
Mar 30 21:15:03 jchun-desktop bash[28584]: Invalid MIT-MAGIC-COOKIE-1 keyCannot open display ":0"
Mar 30 21:15:03 jchun-desktop gsettings[28587]: failed to commit changes to dconf: Error spawning command line “dbus-launch --autolaunch=840b76d3a71f49b89f25603b91d1180e --binary-syntax --close-stderr”: Child process exited with code 1
Mar 30 21:15:03 jchun-desktop gsettings[28591]: failed to commit changes to dconf: Error spawning command line “dbus-launch --autolaunch=840b76d3a71f49b89f25603b91d1180e --binary-syntax --close-stderr”: Child process exited with code 1
Mar 30 21:15:03 jchun-desktop bash[28569]: Invalid MIT-MAGIC-COOKIE-1 key
Might have spoken too soon. I'm getting segfaults even on master. seems related to Konsole.
-- Reboot --
Mar 30 22:16:48 jchun-desktop systemd[1455]: Started keyswap for Terminal and GUI.
Mar 30 22:16:48 jchun-desktop bash[2779]: Importing user_config.json...
Mar 30 22:16:48 jchun-desktop bash[2779]: Data from user_config.json imported successfully.
Mar 30 22:16:48 jchun-desktop bash[2779]: Starting keyswap...
Mar 30 22:16:48 jchun-desktop bash[2779]: First window name: polkit-kde-authentication-agent-1
Mar 30 22:16:48 jchun-desktop bash[2779]: gui: polkit-kde-authentication-agent-1
Mar 30 22:16:50 jchun-desktop bash[2779]: discover
Mar 30 22:16:51 jchun-desktop bash[2779]: term: konsole
Mar 30 22:16:54 jchun-desktop bash[2779]: /home/jchun/.config/kinto/xactive.sh: line 4: 2781 Segmentation fault ./kintox11
Mar 30 22:16:54 jchun-desktop systemd[1455]: keyswap.service: Main process exited, code=exited, status=139/n/a
Mar 30 22:16:54 jchun-desktop systemd[1455]: keyswap.service: Failed with result 'exit-code'.
Mar 30 22:16:55 jchun-desktop systemd[1455]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 30 22:16:55 jchun-desktop systemd[1455]: keyswap.service: Scheduled restart job, restart counter is at 1.
Mar 30 22:16:55 jchun-desktop systemd[1455]: Stopped keyswap for Terminal and GUI.
Mar 30 22:16:55 jchun-desktop systemd[1455]: Started keyswap for Terminal and GUI.
Mar 30 22:16:56 jchun-desktop bash[3049]: Importing user_config.json...
Mar 30 22:16:56 jchun-desktop bash[3049]: Data from user_config.json imported successfully.
Mar 30 22:16:56 jchun-desktop bash[3049]: Starting keyswap...
Mar 30 22:16:56 jchun-desktop bash[3049]: First window name: discover
Mar 30 22:16:56 jchun-desktop bash[3049]: gui: discover
Mar 30 22:16:56 jchun-desktop bash[3049]: term: konsole
Mar 30 22:17:00 jchun-desktop bash[3049]: gui: discover
Mar 30 22:17:02 jchun-desktop bash[3049]: term: konsole
Mar 30 22:17:29 jchun-desktop bash[3049]: gui: discover
Mar 30 22:17:31 jchun-desktop bash[3049]: TelegramDesktop
Mar 30 22:17:32 jchun-desktop bash[3049]: discover
Mar 30 22:17:38 jchun-desktop bash[3049]: polkit-kde-authentication-agent-1
Mar 30 22:17:41 jchun-desktop bash[3049]: discover
Mar 30 22:18:06 jchun-desktop bash[3049]: systemsettings
Mar 30 22:18:08 jchun-desktop bash[3049]: albert
Mar 30 22:18:11 jchun-desktop bash[3049]: systemsettings
Mar 30 22:18:11 jchun-desktop bash[3049]: term: konsole
Mar 30 22:18:19 jchun-desktop bash[3049]: firefox: Firefox
Mar 30 22:18:20 jchun-desktop bash[3049]: term: konsole
Mar 30 22:18:27 jchun-desktop bash[3049]: firefox: Firefox
Mar 30 22:18:32 jchun-desktop bash[3049]: term: konsole
Odd.. I have not been experiencing seg faults from Konsole at all.. I did just resolve the intermittent input issue though with Konsole and am about to merge it into master. It was actually a pretty simple fix in the json file, just took out my setxkbmap command. If I was to guess it probably wasn't always fully executing before xkbcomp did and so it confused some apps and not others for some reason.
I just got another one.
Mar 30 22:28:09 jchun-desktop systemd[3715]: Started keyswap for Terminal and GUI.
Mar 30 22:28:10 jchun-desktop bash[5907]: Importing user_config.json...
Mar 30 22:28:10 jchun-desktop bash[5907]: Data from user_config.json imported successfully.
Mar 30 22:28:10 jchun-desktop bash[5907]: Starting keyswap...
Mar 30 22:28:10 jchun-desktop bash[5907]: First window name: plasmashell
Mar 30 22:28:10 jchun-desktop bash[5907]: gui: plasmashell
Mar 30 22:28:18 jchun-desktop bash[5907]: dolphin
Mar 30 22:28:20 jchun-desktop bash[5907]: TelegramDesktop
Mar 30 22:28:22 jchun-desktop bash[5907]: plasmashell
Mar 30 22:28:22 jchun-desktop bash[5907]: TelegramDesktop
Mar 30 22:28:24 jchun-desktop bash[5907]: plasmashell
Mar 30 22:28:24 jchun-desktop bash[5907]: TelegramDesktop
Mar 30 22:28:26 jchun-desktop bash[5907]: plasmashell
Mar 30 22:28:27 jchun-desktop bash[5907]: dolphin
Mar 30 22:28:30 jchun-desktop bash[5907]: TelegramDesktop
Mar 30 22:28:31 jchun-desktop bash[5907]: plasmashell
Mar 30 22:28:35 jchun-desktop bash[5907]: TelegramDesktop
Mar 30 22:28:35 jchun-desktop bash[5907]: kcmshell5
Mar 30 22:28:42 jchun-desktop bash[5907]: TelegramDesktop
Mar 30 22:28:44 jchun-desktop bash[5907]: plasmashell
Mar 30 22:28:46 jchun-desktop bash[5907]: TelegramDesktop
Mar 30 22:28:47 jchun-desktop bash[5907]: dolphin
Mar 30 22:28:51 jchun-desktop bash[5907]: TelegramDesktop
Mar 30 22:28:54 jchun-desktop bash[5907]: dolphin
Mar 30 22:29:10 jchun-desktop bash[5907]: /home/jchun/.config/kinto/xactive.sh: line 4: 5909 Segmentation fault ./kintox11
Mar 30 22:29:10 jchun-desktop systemd[3715]: keyswap.service: Main process exited, code=exited, status=139/n/a
Mar 30 22:29:10 jchun-desktop systemd[3715]: keyswap.service: Failed with result 'exit-code'.
Mar 30 22:29:11 jchun-desktop systemd[3715]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 30 22:29:11 jchun-desktop systemd[3715]: keyswap.service: Scheduled restart job, restart counter is at 1.
Mar 30 22:29:11 jchun-desktop systemd[3715]: Stopped keyswap for Terminal and GUI.
Mar 30 22:29:11 jchun-desktop systemd[3715]: Started keyswap for Terminal and GUI.
Mar 30 22:29:12 jchun-desktop bash[6156]: Importing user_config.json...
Mar 30 22:29:12 jchun-desktop bash[6156]: Data from user_config.json imported successfully.
Mar 30 22:29:12 jchun-desktop bash[6156]: Starting keyswap...
Mar 30 22:29:12 jchun-desktop bash[6156]: First window name: dolphin
Mar 30 22:29:12 jchun-desktop bash[6156]: gui: dolphin
Mar 30 22:29:14 jchun-desktop bash[6156]: plasmashell
Mar 30 22:29:19 jchun-desktop bash[6156]: TelegramDesktop
Mar 30 22:29:20 jchun-desktop bash[6156]: plasmashell
Mar 30 22:29:22 jchun-desktop bash[6156]: dolphin
Mar 30 22:29:29 jchun-desktop bash[6156]: TelegramDesktop
Mar 30 22:29:31 jchun-desktop bash[6156]: dolphin
Mar 30 22:29:32 jchun-desktop bash[6156]: TelegramDesktop
Mar 30 22:29:34 jchun-desktop bash[6156]: Sublime_text
Mar 30 22:29:37 jchun-desktop bash[6156]: term: konsole
Mar 30 22:29:41 jchun-desktop bash[6156]: gui: albert
Mar 30 22:29:44 jchun-desktop bash[6156]: term: konsole
This time on Dolphin? Am I reading the logs right?
Yea it looks like some sort of seg fault. Were you closing dolphin or just switching windows?
I wish I could tell you with more accuracy. I've just been doing a bunch of things messing around and whenever my keyboard feels laggy/slow I type "kintojournal" to check it out 😂
I've had to run it enough times that I got lazy haha
jchun ~ cat .bash_it/custom/custom.aliases.bash
alias kintostatus='systemctl --user status keyswap'
alias kintorestart='systemctl --user status keyswap'
alias kintojournal='journalctl --user -u keyswap'
lol nice, and you're still on KDE Neon or did you switch back to Kubuntu?
This is KDE Neon still.
Been using it for ~30 minutes now after a fresh cold boot, and haven't run into the issue again. I wonder if a restart magically fixed it/made it rare enough so that I'm able to use Neon without having it freeze up on me all the time.
Cool deal!! I appreciate you sticking with me while I worked through it with you!
Also I just realized that the kde-init shortcut fix has not been getting set right. I fixed that and the ibus install logic in master and dev. I didn't use your pull request though because I believe manjaro needed both to be there, it handles that ls command differently than other OS's and for some reason if it is set to ls == "" then it will never trigger the ibus install (if the other directories don't exist).
The latest commit with the fixes. https://github.com/rbreaves/kinto/commit/997d2dd39fb342baf19d4e75bde1fc6293307578
Well closing this ticket, but you are welcomed to reply in here again if another crash comes up, but I think this really does address the DestroyNotify bug that has existed in Kinto for a little bit - it just wasn't nearly as apparent under Gnome or xfce for whatever reason. I knew it'd crash once in awhile, but it was never enough to break my own workflow.
It is WAY more stable and awesome now, but I managed to break it again while looking into how to restart plasma without a full restart.
Here are the commands I run:
kwin_x11 --replace > /dev/null 2>&1 &
sleep 0.5
kintorestart > /dev/null 2>&1 &
Mar 31 11:08:33 jchun-desktop systemd[1421]: Started keyswap for Terminal and GUI.
Mar 31 11:08:33 jchun-desktop bash[5284]: Importing user_config.json...
Mar 31 11:08:33 jchun-desktop bash[5284]: Data from user_config.json imported successfully.
Mar 31 11:08:33 jchun-desktop bash[5284]: Starting keyswap...
Mar 31 11:08:33 jchun-desktop bash[5284]: First window name: konsole
Mar 31 11:08:33 jchun-desktop bash[5284]: term: konsole
Mar 31 11:08:45 jchun-desktop bash[5284]: gui: Sublime_text
Mar 31 11:08:54 jchun-desktop bash[5284]: term: konsole
Mar 31 11:08:56 jchun-desktop bash[5284]: firefox: Firefox
Mar 31 11:09:11 jchun-desktop bash[5284]: term: konsole
Mar 31 11:09:12 jchun-desktop bash[5284]: firefox: Firefox
Mar 31 11:09:16 jchun-desktop bash[5284]: gui: Sublime_text
Mar 31 11:09:25 jchun-desktop bash[5284]: firefox: Firefox
Mar 31 11:09:30 jchun-desktop bash[5284]: term: konsole
Mar 31 11:09:30 jchun-desktop bash[5284]: /home/jchun/.config/kinto/xactive.sh: line 4: 5286 Segmentation fault ./kintox11
Mar 31 11:09:30 jchun-desktop systemd[1421]: keyswap.service: Main process exited, code=exited, status=139/n/a
Mar 31 11:09:30 jchun-desktop systemd[1421]: keyswap.service: Failed with result 'exit-code'.
Mar 31 11:09:31 jchun-desktop systemd[1421]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 31 11:09:31 jchun-desktop systemd[1421]: keyswap.service: Scheduled restart job, restart counter is at 5.
Mar 31 11:09:31 jchun-desktop systemd[1421]: Stopped keyswap for Terminal and GUI.
Mar 31 11:09:31 jchun-desktop systemd[1421]: Started keyswap for Terminal and GUI.
Mar 31 11:09:31 jchun-desktop bash[6590]: /home/jchun/.config/kinto/xactive.sh: line 4: 6592 Segmentation fault ./kintox11
Mar 31 11:09:31 jchun-desktop systemd[1421]: keyswap.service: Main process exited, code=exited, status=139/n/a
Mar 31 11:09:31 jchun-desktop systemd[1421]: keyswap.service: Failed with result 'exit-code'.
Mar 31 11:09:33 jchun-desktop systemd[1421]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 31 11:09:33 jchun-desktop systemd[1421]: keyswap.service: Scheduled restart job, restart counter is at 6.
Mar 31 11:09:33 jchun-desktop systemd[1421]: Stopped keyswap for Terminal and GUI.
Mar 31 11:09:33 jchun-desktop systemd[1421]: Started keyswap for Terminal and GUI.
Mar 31 11:09:33 jchun-desktop bash[6601]: /home/jchun/.config/kinto/xactive.sh: line 4: 6603 Segmentation fault ./kintox11
Mar 31 11:09:33 jchun-desktop systemd[1421]: keyswap.service: Main process exited, code=exited, status=139/n/a
Mar 31 11:09:33 jchun-desktop systemd[1421]: keyswap.service: Failed with result 'exit-code'.
Mar 31 11:09:34 jchun-desktop systemd[1421]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 31 11:09:34 jchun-desktop systemd[1421]: keyswap.service: Scheduled restart job, restart counter is at 7.
Mar 31 11:09:34 jchun-desktop systemd[1421]: Stopped keyswap for Terminal and GUI.
Mar 31 11:09:34 jchun-desktop systemd[1421]: Started keyswap for Terminal and GUI.
Mar 31 11:09:34 jchun-desktop bash[6612]: /home/jchun/.config/kinto/xactive.sh: line 4: 6614 Segmentation fault ./kintox11
Mar 31 11:09:34 jchun-desktop systemd[1421]: keyswap.service: Main process exited, code=exited, status=139/n/a
Mar 31 11:09:34 jchun-desktop systemd[1421]: keyswap.service: Failed with result 'exit-code'.
Mar 31 11:09:35 jchun-desktop systemd[1421]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 31 11:09:35 jchun-desktop systemd[1421]: keyswap.service: Scheduled restart job, restart counter is at 8.
Mar 31 11:09:35 jchun-desktop systemd[1421]: Stopped keyswap for Terminal and GUI.
Mar 31 11:09:35 jchun-desktop systemd[1421]: Started keyswap for Terminal and GUI.
Mar 31 11:09:35 jchun-desktop bash[6621]: /home/jchun/.config/kinto/xactive.sh: line 4: 6623 Segmentation fault ./kintox11
Mar 31 11:09:35 jchun-desktop systemd[1421]: keyswap.service: Main process exited, code=exited, status=139/n/a
Mar 31 11:09:35 jchun-desktop systemd[1421]: keyswap.service: Failed with result 'exit-code'.
Mar 31 11:09:36 jchun-desktop systemd[1421]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 31 11:09:36 jchun-desktop systemd[1421]: keyswap.service: Scheduled restart job, restart counter is at 9.
Mar 31 11:09:36 jchun-desktop systemd[1421]: Stopped keyswap for Terminal and GUI.
Mar 31 11:09:36 jchun-desktop systemd[1421]: Started keyswap for Terminal and GUI.
Mar 31 11:09:36 jchun-desktop bash[6633]: /home/jchun/.config/kinto/xactive.sh: line 4: 6635 Segmentation fault ./kintox11
Mar 31 11:09:36 jchun-desktop systemd[1421]: keyswap.service: Main process exited, code=exited, status=139/n/a
Mar 31 11:09:36 jchun-desktop systemd[1421]: keyswap.service: Failed with result 'exit-code'.
Mar 31 11:09:38 jchun-desktop systemd[1421]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 31 11:09:38 jchun-desktop systemd[1421]: keyswap.service: Scheduled restart job, restart counter is at 10.
Mar 31 11:09:38 jchun-desktop systemd[1421]: Stopped keyswap for Terminal and GUI.
Mar 31 11:09:38 jchun-desktop systemd[1421]: keyswap.service: Start request repeated too quickly.
Mar 31 11:09:38 jchun-desktop systemd[1421]: keyswap.service: Failed with result 'exit-code'.
Mar 31 11:09:38 jchun-desktop systemd[1421]: Failed to start keyswap for Terminal and GUI.
Check the display variable.. I used to didn’t set that but in some distros it’s required.
echo $DISPLAY
systemctl --user status keyswap
# nano or vi keyswap.service make sure DISPLAY is set right.
Should mention that I can't get kinto to work on KDE Neon without uncommenting that lin in the first place, so it's already set.
cat .config/systemd/user/keyswap.service
[Unit]
Description=keyswap for Terminal and GUI
PartOf=graphical-session.target
[Service]
Type=simple
Restart=always
# eg DISPLAY=:0.0
Environment=DISPLAY=:0
RestartSec=1
WorkingDirectory=/home/jchun/.config/kinto
ExecStart=/bin/bash -c "/home/jchun/.config/kinto/xactive.sh carrots"
ExecStop=/bin/bash /home/jchun/.config/kinto/cleanup.sh
[Install]
WantedBy=default.target
The latest master branch does uncomment that line by default now btw. Fixed that yesterday. (Most OS’s that had issues w/ needing it set had 0.0 as the display var, KDE May be the only one where 0 still needs to be set manually. It doesn’t hurt to have it set but multi user sessions could get hairy if set.)
Also I’m not sure about your method of restarting kde. I use screen & run this command & then detach.
kquitapp5 kglobalaccel && sleep 2s && kglobalaccel5 &
Although that’s what I do to refresh hotkeys.. might not be a complete DE reload. I know whatever I’ve done in the past looks more like that though lol.
Google shows me this.
In KDE 5 use:
killall plasmashell #to stop it kstart plasmashell #to restart it
In KDE > 5.10 use:
kquitapp5 plasmashell kstart5 plasmashell
Ok -- I'll give it a shot later, although I'm pretty sure I tried restarting KDE with that, it didn't fix my issues. (Once in a while, after my I've been using my computer for a while, I notice screen tearing if my compositor is set to OpenGL. A full reboot or the command I run above does seem to fix the tearing though.
That being said, I think my problem is just that my sleep wasn't long enough. I tried changing it to 5s and it seems to work. I'll play with the setting to see how low of a delay I can get away with.
For future reference, I resolved it with a .desktop file as documented in this reddit thread.
[Desktop Entry]
Comment=Restart Plasma
Exec=kwin_x11 --replace; plasmashell --replace;
GenericName=Restart Plasma Shell and KWin
Icon=view-refresh
Name=Restart Plasma Shell and Kwin
NoDisplay=false
Path[$e]=
StartupNotify=true
Terminal=0
TerminalOptions=
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=
The added bonus to the above solution is I can also restart plasma from within Albert now which is convenient.
I left kinto alone because I'm not sure what was going on when I was force restarting it, but it seems to just handle it better if I leave it alone, let it crash (or not sometimes) and auto restart if it does crash.
@rbreaves FYI the command I was using is apparently new in Plasma 5.13 which is why you weren't familiar with it.
Looks like the problem is back with a passion on my laptop. Baremetal KDE Neon
Mar 31 22:38:01 jchun-Aspire5 bash[23647]: gui: plasmashell
Mar 31 22:38:03 jchun-Aspire5 bash[23647]: /home/jchun/.config/kinto/xactive.sh: line 4: 23649 Segmentation fault ./kintox11
Mar 31 22:38:03 jchun-Aspire5 systemd[897]: keyswap.service: Main process exited, code=exited, status=139/n/a
Mar 31 22:38:03 jchun-Aspire5 systemd[897]: keyswap.service: Failed with result 'exit-code'.
Mar 31 22:38:04 jchun-Aspire5 systemd[897]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 31 22:38:04 jchun-Aspire5 systemd[897]: keyswap.service: Scheduled restart job, restart counter is at 5.
Mar 31 22:38:04 jchun-Aspire5 systemd[897]: Stopped keyswap for Terminal and GUI.
Mar 31 22:38:04 jchun-Aspire5 systemd[897]: Started keyswap for Terminal and GUI.
Mar 31 22:38:04 jchun-Aspire5 bash[27265]: Importing user_config.json...
Mar 31 22:38:04 jchun-Aspire5 bash[27265]: Data from user_config.json imported successfully.
Mar 31 22:38:04 jchun-Aspire5 bash[27265]: Starting keyswap...
Mar 31 22:38:04 jchun-Aspire5 bash[27265]: First window name: Firefox
Mar 31 22:38:04 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:38:09 jchun-Aspire5 bash[27265]: gui: plasmashell
Mar 31 22:38:11 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:38:15 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:38:17 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:38:18 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:38:43 jchun-Aspire5 bash[27265]: term: konsole
Mar 31 22:38:54 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:39:15 jchun-Aspire5 bash[27265]: term: konsole
Mar 31 22:39:19 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:39:22 jchun-Aspire5 bash[27265]: term: konsole
Mar 31 22:39:26 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:39:26 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:39:27 jchun-Aspire5 bash[27265]: term: konsole
Mar 31 22:39:36 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:39:36 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:39:37 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:39:38 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:39:41 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:39:42 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:39:53 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:39:55 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:40:00 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:40:06 jchun-Aspire5 bash[27265]: gui: Sublime_text
Mar 31 22:40:08 jchun-Aspire5 bash[27265]: Ulauncher
Mar 31 22:40:16 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:40:23 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:40:26 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:40:35 jchun-Aspire5 bash[27265]: gui: Sublime_text
Mar 31 22:40:36 jchun-Aspire5 bash[27265]: Ulauncher
Mar 31 22:40:41 jchun-Aspire5 bash[27265]: Sublime_text
Mar 31 22:40:45 jchun-Aspire5 bash[27265]: term: konsole
Mar 31 22:40:49 jchun-Aspire5 bash[27265]: gui: Sublime_text
Mar 31 22:40:49 jchun-Aspire5 bash[27265]: term: konsole
Mar 31 22:40:51 jchun-Aspire5 bash[27265]: gui: Sublime_text
Mar 31 22:40:53 jchun-Aspire5 bash[27265]: Ulauncher
Mar 31 22:40:53 jchun-Aspire5 bash[27265]: Sublime_text
Mar 31 22:40:53 jchun-Aspire5 bash[27265]: Ulauncher
Mar 31 22:41:07 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:41:10 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:41:25 jchun-Aspire5 bash[27265]: term: konsole
Mar 31 22:41:36 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:41:47 jchun-Aspire5 bash[27265]: term: konsole
Mar 31 22:41:51 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:41:53 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:41:57 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:42:00 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:42:02 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:42:02 jchun-Aspire5 bash[27265]: gui: Sublime_text
Mar 31 22:42:05 jchun-Aspire5 bash[27265]: Ulauncher
Mar 31 22:42:08 jchun-Aspire5 bash[27265]: Sublime_text
Mar 31 22:42:13 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:42:18 jchun-Aspire5 bash[27265]: term: konsole
Mar 31 22:42:32 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:42:33 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:42:40 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:42:43 jchun-Aspire5 bash[27265]: term: konsole
Mar 31 22:42:46 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:42:47 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:42:48 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:42:49 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:43:31 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:43:56 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:44:12 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:44:17 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:44:18 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:44:34 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:44:48 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:44:53 jchun-Aspire5 bash[27265]: gui: Sublime_text
Mar 31 22:44:55 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:45:00 jchun-Aspire5 bash[27265]: gui: Sublime_text
Mar 31 22:45:03 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:45:04 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:45:10 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:45:16 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:45:38 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:45:48 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:46:26 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:47:33 jchun-Aspire5 bash[27265]: gui: Ulauncher
Mar 31 22:47:46 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:47:47 jchun-Aspire5 bash[27265]: gui: Sublime_text
Mar 31 22:47:49 jchun-Aspire5 bash[27265]: term: konsole
Mar 31 22:47:59 jchun-Aspire5 bash[27265]: gui: Sublime_text
Mar 31 22:48:01 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:49:21 jchun-Aspire5 bash[27265]: term: konsole
Mar 31 22:49:22 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:49:24 jchun-Aspire5 bash[27265]: gui: plasmashell
Mar 31 22:49:28 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:55:21 jchun-Aspire5 bash[27265]: gui: Sublime_text
Mar 31 22:55:24 jchun-Aspire5 bash[27265]: firefox: Firefox
Mar 31 22:56:29 jchun-Aspire5 systemd[897]: keyswap.service: Main process exited, code=exited, status=139/n/a
Mar 31 22:56:29 jchun-Aspire5 bash[27265]: /home/jchun/.config/kinto/xactive.sh: line 4: 27267 Segmentation fault ./kintox11
Mar 31 22:56:29 jchun-Aspire5 systemd[897]: keyswap.service: Failed with result 'exit-code'.
Mar 31 22:56:30 jchun-Aspire5 systemd[897]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 31 22:56:30 jchun-Aspire5 systemd[897]: keyswap.service: Scheduled restart job, restart counter is at 6.
Mar 31 22:56:30 jchun-Aspire5 systemd[897]: Stopped keyswap for Terminal and GUI.
Mar 31 22:56:30 jchun-Aspire5 systemd[897]: Started keyswap for Terminal and GUI.
Mar 31 22:56:30 jchun-Aspire5 bash[10312]: Importing user_config.json...
Mar 31 22:56:30 jchun-Aspire5 bash[10312]: Data from user_config.json imported successfully.
Mar 31 22:56:30 jchun-Aspire5 bash[10312]: Starting keyswap...
Mar 31 22:56:30 jchun-Aspire5 bash[10312]: First window name: Firefox
Mar 31 22:56:30 jchun-Aspire5 bash[10312]: firefox: Firefox
Mar 31 22:57:07 jchun-Aspire5 bash[10312]: term: konsole
Mar 31 22:57:15 jchun-Aspire5 bash[10312]: firefox: Firefox
Mar 31 22:57:25 jchun-Aspire5 bash[10312]: term: konsole
Mar 31 22:57:28 jchun-Aspire5 bash[10312]: firefox: Firefox
Mar 31 22:57:31 jchun-Aspire5 bash[10312]: term: konsole
Mar 31 22:57:33 jchun-Aspire5 bash[10312]: firefox: Firefox
Mar 31 22:57:37 jchun-Aspire5 bash[10312]: term: konsole
Mar 31 22:57:38 jchun-Aspire5 bash[10312]: firefox: Firefox
Mar 31 22:57:42 jchun-Aspire5 bash[10312]: term: konsole
Mar 31 22:57:52 jchun-Aspire5 bash[10312]: firefox: Firefox
Mar 31 22:57:57 jchun-Aspire5 bash[10312]: term: konsole
Mar 31 22:58:02 jchun-Aspire5 bash[10312]: firefox: Firefox
Mar 31 22:58:07 jchun-Aspire5 bash[10312]: term: konsole
Mar 31 22:58:17 jchun-Aspire5 bash[10312]: firefox: Firefox
Mar 31 22:58:33 jchun-Aspire5 bash[10312]: term: konsole
Mar 31 22:58:37 jchun-Aspire5 bash[10312]: firefox: Firefox
Mar 31 22:58:47 jchun-Aspire5 bash[10312]: gui: Sublime_text
Mar 31 22:58:49 jchun-Aspire5 bash[10312]: firefox: Firefox
Mar 31 22:58:57 jchun-Aspire5 bash[10312]: gui: Sublime_text
Mar 31 22:59:01 jchun-Aspire5 bash[10312]: term: konsole
Mar 31 22:59:02 jchun-Aspire5 bash[10312]: gui: Sublime_text
Mar 31 22:59:03 jchun-Aspire5 bash[10312]: term: konsole
Mar 31 22:59:09 jchun-Aspire5 bash[10312]: firefox: Firefox
Mar 31 22:59:14 jchun-Aspire5 bash[10312]: gui: Sublime_text
Mar 31 22:59:22 jchun-Aspire5 bash[10312]: term: konsole
Mar 31 22:59:26 jchun-Aspire5 bash[10312]: firefox: Firefox
Mar 31 22:59:32 jchun-Aspire5 bash[10312]: term: konsole
Mar 31 22:59:41 jchun-Aspire5 bash[10312]: gui: plasmashell
Mar 31 22:59:42 jchun-Aspire5 bash[10312]: term: konsole
Mar 31 22:59:44 jchun-Aspire5 bash[10312]: gui: albert
Mar 31 22:59:45 jchun-Aspire5 bash[10312]: term: konsole
Mar 31 22:59:46 jchun-Aspire5 bash[10312]: gui: albert
Mar 31 22:59:46 jchun-Aspire5 bash[10312]: term: konsole
Mar 31 22:59:47 jchun-Aspire5 bash[10312]: gui: albert
Mar 31 23:00:22 jchun-Aspire5 bash[10312]: term: konsole
Mar 31 23:00:22 jchun-Aspire5 bash[10312]: gui: albert
Mar 31 23:00:23 jchun-Aspire5 bash[10312]: /home/jchun/.config/kinto/xactive.sh: line 4: 10314 Segmentation fault ./kintox11
Mar 31 23:00:23 jchun-Aspire5 systemd[897]: keyswap.service: Main process exited, code=exited, status=139/n/a
Mar 31 23:00:23 jchun-Aspire5 systemd[897]: keyswap.service: Failed with result 'exit-code'.
Mar 31 23:00:24 jchun-Aspire5 systemd[897]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 31 23:00:24 jchun-Aspire5 systemd[897]: keyswap.service: Scheduled restart job, restart counter is at 7.
Mar 31 23:00:24 jchun-Aspire5 systemd[897]: Stopped keyswap for Terminal and GUI.
Mar 31 23:00:24 jchun-Aspire5 systemd[897]: Started keyswap for Terminal and GUI.
Mar 31 23:00:25 jchun-Aspire5 bash[16745]: Importing user_config.json...
Mar 31 23:00:25 jchun-Aspire5 bash[16745]: Data from user_config.json imported successfully.
Mar 31 23:00:25 jchun-Aspire5 bash[16745]: Starting keyswap...
Installed from master 997d2dd39fb342baf19d4e75bde1fc6293307578
I guess what I may do is update the other 2 of the 3 functions that makes calls to xlib and add in the extended logging that get top window has, as well as seeing about implementing a debug arg so you can run kintox11 with additional output as well that can really help me knock that out.
@Jonchun If you checkout the latest on the master or dev branch there is a new debug parameter that will output a lot more info. To activate it just edit the xactive.sh file and add -d or --debug.
vi ~/.config/kinto/xactive.sh
#!/bin/bash
./caret_status.sh &
./kintox11 --debug
After that you should get output that looks like this.
gui: Sublime_text
run: xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen
Running de gui command: gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['<Ctrl>Space']"
event: CreateNotify 16
duration: 10670ms
get focus window
-Sublime_text: event: 16, window_id: 71303172
get top window
-Sublime_text: event: 16, window_id: 71303172
-Sublime_text: event: 16, window_id: 71303171
-Sublime_text: event: 16, window_id: 25166791
get named window
-Sublime_text: event: 16, window_id: 71303171
event: DestroyNotify 17
duration: 181ms
get focus window
-Sublime_text: event: 22, window_id: 46137354
get top window
-Sublime_text: event: 22, window_id: 46137354
get named window
-Sublime_text: event: 22, window_id: 46137354
term: Gnome-terminal
run: xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep -v XF86FullScreen
Running de term command: gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['<Control><Shift>Space']"
event: CreateNotify 16
duration: 1997ms
get focus window
-Gnome-terminal: event: 16, window_id: 46137355
get top window
-Gnome-terminal: event: 16, window_id: 46137355
-Gnome-terminal: event: 16, window_id: 46137354
get named window
-Gnome-terminal: event: 16, window_id: 46137354
event: DestroyNotify 17
duration: 143ms
get focus window
-Gnome-terminal: event: 22, window_id: 71303171
get top window
-Gnome-terminal: event: 22, window_id: 71303171
-Gnome-terminal: event: 22, window_id: 25166791
get named window
-Gnome-terminal: event: 22, window_id: 71303171
gui: Sublime_text
run: xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY 2>&1 | grep -v XF86FullScreen
Running de gui command: gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['<Ctrl>Space']"
event: CreateNotify 16
duration: 55608ms
get focus window
-Sublime_text: event: 16, window_id: 71303172
Sweet. I'm updated on my desktop. Will do laptop later. I was able to successfully get debug messages in the log so will post if I get more crashes.
Not sure if this is helpful, but here is a segfault.
Apr 01 10:49:28 jchun-desktop bash[9759]: -Slack: event: 16, window_id: 100663297
Apr 01 10:49:28 jchun-desktop bash[9759]: event: MapNotify 19
Apr 01 10:49:28 jchun-desktop bash[9759]: duration: 1ms
Apr 01 10:49:28 jchun-desktop bash[9759]: get focus window
Apr 01 10:49:28 jchun-desktop bash[9759]: -Slack: event: 19, window_id: 100663297
Apr 01 10:49:28 jchun-desktop bash[9759]: get top window
Apr 01 10:49:28 jchun-desktop bash[9759]: -Slack: event: 19, window_id: 100663297
Apr 01 10:49:28 jchun-desktop bash[9759]: -Slack: event: 19, window_id: 41946140
Apr 01 10:49:28 jchun-desktop bash[9759]: -Slack: event: 19, window_id: 41946139
Apr 01 10:49:28 jchun-desktop bash[9759]: get named window
Apr 01 10:49:28 jchun-desktop bash[9759]: -Slack: event: 19, window_id: 100663297
Apr 01 10:49:28 jchun-desktop bash[9759]: event: CreateNotify 16
Apr 01 10:49:28 jchun-desktop bash[9759]: duration: 1ms
Apr 01 10:49:28 jchun-desktop bash[9759]: get focus window
Apr 01 10:49:28 jchun-desktop bash[9759]: -Slack: event: 16, window_id: 100663297
Apr 01 10:49:28 jchun-desktop bash[9759]: get top window
Apr 01 10:49:28 jchun-desktop bash[9759]: -Slack: event: 16, window_id: 100663297
Apr 01 10:49:28 jchun-desktop bash[9759]: -Slack: event: 16, window_id: 41946140
Apr 01 10:49:28 jchun-desktop bash[9759]: -Slack: event: 16, window_id: 41946139
Apr 01 10:49:28 jchun-desktop bash[9759]: get named window
Apr 01 10:49:28 jchun-desktop bash[9759]: -Slack: event: 16, window_id: 100663297
Apr 01 10:49:28 jchun-desktop bash[9759]: event: MapNotify 19
Apr 01 10:49:28 jchun-desktop bash[9759]: duration: 0ms
Apr 01 10:49:28 jchun-desktop bash[9759]: get focus window
Apr 01 10:49:28 jchun-desktop bash[9759]: -Slack: event: 19, window_id: 100663297
Apr 01 10:49:28 jchun-desktop bash[9759]: get top window
Apr 01 10:49:28 jchun-desktop bash[9759]: -Slack: event: 19, window_id: 100663297
Apr 01 10:49:28 jchun-desktop bash[9759]: -Slack: event: 19, window_id: 41946140
Apr 01 10:49:28 jchun-desktop bash[9759]: -Slack: event: 19, window_id: 41946139
Apr 01 10:49:28 jchun-desktop bash[9759]: get named window
Apr 01 10:49:28 jchun-desktop bash[9759]: -Slack: event: 19, window_id: 100663297
Apr 01 10:49:28 jchun-desktop bash[9759]: event: ConfigureNotify 22
Apr 01 10:49:28 jchun-desktop bash[9759]: duration: 0ms
Apr 01 10:49:28 jchun-desktop bash[9759]: get focus window
Apr 01 10:49:28 jchun-desktop bash[9759]: -Slack: event: 22, window_id: 100663297
Apr 01 10:44:11 jchun-desktop bash[2340]: -Firefox: event: 19, window_id: 41943150
Apr 01 10:44:11 jchun-desktop bash[2340]: -Firefox: event: 19, window_id: 41943149
Apr 01 10:44:11 jchun-desktop bash[2340]: get named window
Apr 01 10:44:11 jchun-desktop bash[2340]: -Firefox: event: 19, window_id: 62914604
Apr 01 10:44:13 jchun-desktop bash[2340]: get focus window
Apr 01 10:44:13 jchun-desktop bash[2340]: -Firefox: event: 16, window_id: 62914609
Apr 01 10:44:13 jchun-desktop bash[2340]: get top window
Apr 01 10:44:13 jchun-desktop bash[2340]: -Firefox: event: 16, window_id: 62914609
Apr 01 10:44:13 jchun-desktop bash[2340]: -Firefox: event: 16, window_id: 62914604
Apr 01 10:44:13 jchun-desktop bash[2340]: -Firefox: event: 16, window_id: 41943150
Apr 01 10:44:13 jchun-desktop bash[2340]: -Firefox: event: 16, window_id: 41943149
Apr 01 10:44:13 jchun-desktop bash[2340]: get named window
Apr 01 10:44:13 jchun-desktop bash[2340]: -Firefox: event: 16, window_id: 62914604
Apr 01 10:45:01 jchun-desktop bash[2340]: get focus window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 16, window_id: 62914609
Apr 01 10:45:01 jchun-desktop bash[2340]: get top window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 16, window_id: 62914609
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 16, window_id: 62914604
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 16, window_id: 41943150
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 16, window_id: 41943149
Apr 01 10:45:01 jchun-desktop bash[2340]: get named window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 16, window_id: 62914604
Apr 01 10:45:01 jchun-desktop bash[2340]: get focus window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 22, window_id: 62914609
Apr 01 10:45:01 jchun-desktop bash[2340]: get top window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 22, window_id: 62914609
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 22, window_id: 62914604
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 22, window_id: 41943150
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 22, window_id: 41943149
Apr 01 10:45:01 jchun-desktop bash[2340]: get named window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 22, window_id: 62914604
Apr 01 10:45:01 jchun-desktop bash[2340]: get focus window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 33, window_id: 62914609
Apr 01 10:45:01 jchun-desktop bash[2340]: get top window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 33, window_id: 62914609
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 33, window_id: 62914604
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 33, window_id: 41943150
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 33, window_id: 41943149
Apr 01 10:45:01 jchun-desktop bash[2340]: get named window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 33, window_id: 62914604
Apr 01 10:45:01 jchun-desktop bash[2340]: get focus window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 19, window_id: 62914609
Apr 01 10:45:01 jchun-desktop bash[2340]: get top window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 19, window_id: 62914609
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 19, window_id: 62914604
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 16, window_id: 62914604
Apr 01 10:45:01 jchun-desktop bash[2340]: get focus window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 22, window_id: 62914609
Apr 01 10:45:01 jchun-desktop bash[2340]: get top window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 22, window_id: 62914609
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 22, window_id: 62914604
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 22, window_id: 41943150
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 22, window_id: 41943149
Apr 01 10:45:01 jchun-desktop bash[2340]: get named window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 22, window_id: 62914604
Apr 01 10:45:01 jchun-desktop bash[2340]: get focus window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 33, window_id: 62914609
Apr 01 10:45:01 jchun-desktop bash[2340]: get top window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 33, window_id: 62914609
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 33, window_id: 62914604
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 33, window_id: 41943150
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 33, window_id: 41943149
Apr 01 10:45:01 jchun-desktop bash[2340]: get named window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 33, window_id: 62914604
Apr 01 10:45:01 jchun-desktop bash[2340]: get focus window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 19, window_id: 62914609
Apr 01 10:45:01 jchun-desktop bash[2340]: get top window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 19, window_id: 62914609
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 19, window_id: 62914604
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 19, window_id: 41943150
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 19, window_id: 41943149
Apr 01 10:45:01 jchun-desktop bash[2340]: get named window
Apr 01 10:45:01 jchun-desktop bash[2340]: -Firefox: event: 19, window_id: 62914604
Apr 01 10:46:42 jchun-desktop bash[2340]: /home/jchun/.config/kinto/xactive.sh: line 4: 2343 Segmentation fault ./kintox11 --debug
Apr 01 10:46:42 jchun-desktop systemd[1503]: keyswap.service: Main process exited, code=exited, status=139/n/a
Apr 01 10:46:42 jchun-desktop systemd[1503]: keyswap.service: Failed with result 'exit-code'.
Apr 01 10:46:43 jchun-desktop systemd[1503]: keyswap.service: Service hold-off time over, scheduling restart.
Apr 01 10:46:43 jchun-desktop systemd[1503]: keyswap.service: Scheduled restart job, restart counter is at 1.
Apr 01 10:46:43 jchun-desktop systemd[1503]: Stopped keyswap for Terminal and GUI.
Apr 01 10:46:43 jchun-desktop systemd[1503]: Started keyswap for Terminal and GUI.
Apr 01 10:46:43 jchun-desktop bash[9759]: Running in debug mode
Apr 01 10:46:43 jchun-desktop bash[9759]: Importing user_config.json...
Apr 01 10:46:43 jchun-desktop bash[9759]: Data from user_config.json imported successfully.
Apr 01 10:46:43 jchun-desktop bash[9759]: Starting keyswap...
Apr 01 10:46:43 jchun-desktop bash[9759]: get focus window
After I finish some work I can play around with it on my laptop as well.
@Jonchun If you can post more logs with the crash that would be helpful. At the moment I don't know why event code 19, MapNotify would cause a segmentation fault. I am hoping to see a pattern before attempting a fix.
Perhaps there is a specific action, pop-up window or modal in Firefox that causes the fault? I would have expected a more obvious issue in the log though.
Sure thing. Like I mentioned though, it is definitely way more stable, so I'm having a hard time noticing it sometimes (obviously a good thing). I do feel like my keys get stuck in Konsole sometimes, but I could just be imagining it.
I took all the journal output since my previous report and there have only been 2 segfaults total.
~ less journal_output.txt | grep fault | wc -l
2
I haven't looked into the other issues though such as not being able to get windows or w/e. Here are the journal logs from shortly after I installed the new debug stuff until now.
Out of curiosity I checked before/after. HUGE improvements! ha!
jchun ~ less journal_output.txt | grep "Failed" | wc -l
2
jchun ~ less journal | grep "Failed" | wc -l
728
Well I am glad it makes it go unnoticed for the most part, but yea if you're still having Konsole key input issues let me know. I know not running setxkbmap -option seemed to rid the issue for me, but maybe it isn't gone 100%.
I guess for the most part it sounds like "constant" crashing is resolved so I will close this particular issue, but please add on to this ticket as you need to or if you find a specific/separate scenario that reliably crashes it then create a new ticket.
Also I just did another update that streamlines the debug output for top windows a bit more. I am collapsing the window_id's all into a single line now.
get top window
-Gnome-terminal: event: 16, window_id: 46137355,46137354
Apr 01 15:25:58 rbreaves-VirtualBox bash[6926]: term: Gnome-terminal
Apr 01 15:25:58 rbreaves-VirtualBox bash[6926]: run: xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.term $DISPLAY 2>&1 | grep
Apr 01 15:25:58 rbreaves-VirtualBox bash[6926]: Running de term command: gsettings set org.gnome.desktop.wm.keybindings panel-
Apr 01 15:25:59 rbreaves-VirtualBox bash[6926]: event: CreateNotify 16
Apr 01 15:25:59 rbreaves-VirtualBox bash[6926]: duration: 4709ms
Apr 01 15:25:59 rbreaves-VirtualBox bash[6926]: get focus window
Apr 01 15:25:59 rbreaves-VirtualBox bash[6926]: -Gnome-terminal: event: 16, window_id: 46137355
Apr 01 15:25:59 rbreaves-VirtualBox bash[6926]: get top window
Apr 01 15:25:59 rbreaves-VirtualBox bash[6926]: -Gnome-terminal: event: 16, window_id: 46137355,46137354
Apr 01 15:25:59 rbreaves-VirtualBox bash[6926]: get named window
Apr 01 15:25:59 rbreaves-VirtualBox bash[6926]: -Gnome-terminal: event: 16, window_id: 46137354
Apr 01 15:26:01 rbreaves-VirtualBox bash[6926]: event: DestroyNotify 17
Apr 01 15:26:01 rbreaves-VirtualBox bash[6926]: duration: 135ms
Apr 01 15:26:01 rbreaves-VirtualBox bash[6926]: get focus window
Apr 01 15:26:01 rbreaves-VirtualBox bash[6926]: -Gnome-terminal: event: 16, window_id: 46137355
Apr 01 15:26:01 rbreaves-VirtualBox bash[6926]: get top window
Apr 01 15:26:01 rbreaves-VirtualBox bash[6926]: -Gnome-terminal: event: 16, window_id: 46137355,46137354
Apr 01 15:26:01 rbreaves-VirtualBox bash[6926]: get named window
Apr 01 15:26:01 rbreaves-VirtualBox bash[6926]: -Gnome-terminal: event: 16, window_id: 46137354
Hmm. Might have spoken too soon.
~ journalctl --since yesterday --user -u keyswap > journal
~ cat journal | grep "Failed" | wc -l
78
Is it impacting your day to day work/workflow any?
In response to your log I have decided to filter everything down to event type 22. You can checkout the latest hotfix branch to test it.
https://github.com/rbreaves/kinto/commit/25ce34a2fced30cdeea516f8741bd1ff8d948ea3
It appears that ConfigureNotify (event type 22) is the only one that matters when switching windows.. that might resolve most of it, but I am seeing some segfaults with VirtualBox and event type 22 still, so there might be some segfaults still. Please let me know.
Yea, a bit. I checked back in on the log because I had started noticing that I would try to copy/paste into sublime or terminal and it would not do what I expected (because it wasn't being remapped it would like pull up a menu or something instead of copying)
I'll download the new commit and see how that goes
So I thought I've been running the latest commit (I'm pretty? sure I am), but my logging output doesn't look like yours.
I just did a git pull right now so i'm 100% sure I'm on the latest. I can keep you posted. Currently on e34ff1c86e285703764d4c94a8b2658d8e624e0c.
Some things I've noticed during my last few days of testing. Nothing so major that I immediately uninstalled it, but definitely considering living without it for a little bit until it becomes more as it is JUST on the brink of providing enough mental relief with the hotkeys and annoying enough because it keeps dying.
~ less journal | grep Fail | wc -l
42
As always, some logs. Attached last 2 days of journalctl. journal.tar.gz
@Jonchun Thank you for the detailed info and log report. It would make some sense that FF or even Chrome could create some instability. I probably need to find a better way of implementing the code that checks for the input field status in Chrome and FF.
And you just need to re-enable debug again if you want your logs to be more detailed.
vi ~/.config/kinto/xactive.sh
./kintox11 -d
This is where I suspect the issue is btw. XNextEvent is a blocking function, so XNextEventTimeout is used instead so that I can mostly wait for a Window change, but also check for the input status of a field every half second. It really is not the solution I want - these two activities - waiting for a window change or an input field change need to be rewritten to be 2 asynchronous events instead. That would solve the problem.
During my testing I noticed a timeout below .5 definitely created instability that was immediately noticeable so that is also why I am pretty certain about this. I have not written an asynchronous function in C yet so that's part of the issue. 😅
while(XNextEventTimeout(d, &e, .5, event_ts, last_event, &event_ts, &last_event)){
if(check_caret() && ran_onInput == 0){
if(debug == true){
printf("run_onInput: %s\n",run_onInput);
}
system(run_onInput);
ran_onInput = 1;
}
else if(!check_caret() && ran_onInput == 1){
if(debug == true){
printf("run_offInput: %s\n",run_offInput);
}
system(run_offInput);
ran_onInput = 0;
}
I probably need to extract out the caret checking and use something like this to handle it instead. That ought to bring stability to it I'd think, and the only time the async function would run is if FF or chrome is the active window.
https://github.com/naasking/async.h
Also I am not sure what would still be causing input issues for you in Konsole. I don't see any setxkboptions commands left.. and that was the only thing I could verify as causing the problem, but perhaps x11 segfaults are the cause still and once the Timeout function is removed it'll bring stability to the input always working with Konsole as well.
And you just need to re-enable debug again if you want your logs to be more detailed.
Doh... Well, it's enabled now.
check for the input status of a field every half second
This certainly sounds suspicious and could be causing the problems I'm noticing. Especially since I'm probably switching windows quite frequently. That being said, I don't quite understand what is causing the slowness. Restarting the kinto service almost always completely fixes it for a bit, making me wonder if there's a leak somewhere.
Also I am not sure what would still be causing input issues for you in Konsole. I don't see any setxkboptions commands left.. and that was the only thing I could verify as causing the problem, but perhaps x11 segfaults are the cause still and once the Timeout function is removed it'll bring stability to the input always working with Konsole as well.
Yea, I really wish I had better data. I can say that after a while, I had definitely accidentally trained myself to get used to a slight delay/general lagginess within konsole and other apps when using the hotkeys because whenever I switch back to my mac for a bit, I keep finding myself surprised at how snappy/responsive it is. I definitely don't think it's my imagination. Don't know if there's much value in taking a video or anything either. I'll cross my fingers that it improves alongside the timeout stuff.
Update: Ran sudo journalctl --user --vacuum-time="1s" -u keyswap
to give my journalctl a completely fresh start. Here are a few segfaullts to look at with the nicer logging from this morning.
journal.tar.gz
I also just realized another thing that you might be able to clear up -- my primary machine is on an nvidia gpu and I know that there are frequently issues with nvidia/drivers, so I was wondering if maybe it could be causing issues with getting the active window?
I know I said I'll stick with Kubuntu... but I couldn't resist and tried out Neon. So sorry for spamming the issues on this repo...
Install Type: Bare Metal Distro: KDE Neon DE: KDE Branch: master
The problem
Constant crashing of the keyswap service. I' m unable to type anything while it is restarting. It's pretty annoying. I finally have everything exactly the way I want it, and then I found out kinto doesn't like Neon :(