rbreaves / kinto

Mac-style shortcut keys for Linux & Windows.
http://kinto.sh
GNU General Public License v2.0
4.42k stars 213 forks source link

[Dev Branch] Cmd+Tab crashes desktop environment on Elementary OS 5.1 #67

Closed jonchun closed 4 years ago

jonchun commented 4 years ago

Install Type: Bare Metal Distro: Elementary OS 5.1 Hera DE: Pantheon Branch: dev

I thought I'd give the dev branch a shot as per https://github.com/Jonchun/ubuntu2macOS/issues/1. I hit "yes" on the prompt to enable system wide hotkeys (i forget what the exact prompt was). I then remapped my window switcher back to default (real alt+tab) [super key+tab with kinto]. However, my desktop environment seems to crash whenever I try switching Windows. Not sure if I correctly captured everything, but here is the last parts of my journalctl before I swapped back over to the master branch and overwrote alt+tab with ctrl+tab.

Mar 28 17:50:59 jchun-desktop systemd[1420]: Started keyswap for Terminal and GUI.
Mar 28 17:50:59 jchun-desktop bash[30910]: Importing user_config.json...
Mar 28 17:50:59 jchun-desktop bash[30910]: Data from user_config.json imported successfully.
Mar 28 17:50:59 jchun-desktop bash[30910]: Running init command: gsettings set org.gnome.mutter overlay-key ''
Mar 28 17:50:59 jchun-desktop bash[30910]: Starting keyswap...
Mar 28 17:50:59 jchun-desktop bash[30910]: First window name: Firefox
Mar 28 17:50:59 jchun-desktop bash[30910]: firefox: Firefox
# I think I must have rebooted here into windows dual boot. not sure why journalctl didn't log the reboot.
Mar 28 20:20:43 jchun-desktop bash[30910]: /home/jchun/.config/kinto/xactive.sh: line 12: 30912 Segmentation fault      ./kintox11
Mar 28 20:20:44 jchun-desktop systemd[1420]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 28 20:20:44 jchun-desktop systemd[1420]: keyswap.service: Scheduled restart job, restart counter is at 73.
Mar 28 20:20:44 jchun-desktop systemd[1420]: Stopped keyswap for Terminal and GUI.
Mar 28 20:20:44 jchun-desktop systemd[1420]: Starting keyswap for Terminal and GUI...
Mar 28 20:20:49 jchun-desktop systemd[1420]: Started keyswap for Terminal and GUI.
Mar 28 20:20:50 jchun-desktop bash[31385]: Importing user_config.json...
Mar 28 20:20:50 jchun-desktop bash[31385]: Data from user_config.json imported successfully.
Mar 28 20:20:50 jchun-desktop bash[31385]: Running init command: gsettings set org.gnome.mutter overlay-key ''
Mar 28 20:20:50 jchun-desktop bash[31385]: Starting keyswap...
Mar 28 20:20:50 jchun-desktop bash[31385]: First window name: Firefox
Mar 28 20:20:50 jchun-desktop bash[31385]: firefox: Firefox
Mar 28 20:23:56 jchun-desktop bash[31385]: gui: TelegramDesktop
Mar 28 20:24:01 jchun-desktop bash[31385]: firefox: Firefox
Mar 28 20:25:26 jchun-desktop bash[31385]: gui: TelegramDesktop
Mar 28 20:25:31 jchun-desktop bash[31385]: firefox: Firefox
Mar 28 20:25:52 jchun-desktop bash[31385]: sh: 1: 1: Too many open files
Mar 28 20:25:52 jchun-desktop bash[31385]: Aborted
Mar 28 20:25:53 jchun-desktop bash[31385]: /home/jchun/.config/kinto/xactive.sh: line 12: 31387 Segmentation fault      ./kintox11
Mar 28 20:25:54 jchun-desktop systemd[1420]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 28 20:25:54 jchun-desktop systemd[1420]: keyswap.service: Scheduled restart job, restart counter is at 74.
Mar 28 20:25:54 jchun-desktop systemd[1420]: Stopped keyswap for Terminal and GUI.
Mar 28 20:25:54 jchun-desktop systemd[1420]: Starting keyswap for Terminal and GUI...
Mar 28 20:25:59 jchun-desktop systemd[1420]: Started keyswap for Terminal and GUI.
Mar 28 20:25:59 jchun-desktop bash[31829]: Importing user_config.json...
Mar 28 20:25:59 jchun-desktop bash[31829]: Data from user_config.json imported successfully.
Mar 28 20:25:59 jchun-desktop bash[31829]: Running init command: gsettings set org.gnome.mutter overlay-key ''
Mar 28 20:25:59 jchun-desktop bash[31829]: Starting keyswap...
Mar 28 20:25:59 jchun-desktop bash[31829]: First window name: Firefox
Mar 28 20:25:59 jchun-desktop bash[31829]: firefox: Firefox
Mar 28 20:26:09 jchun-desktop bash[31829]: gui: albert
Mar 28 20:26:12 jchun-desktop bash[31829]: X11 error: type=0, serial=82, code=3
Mar 28 20:26:12 jchun-desktop bash[31829]: fail to get top window: 1
Mar 28 20:26:14 jchun-desktop systemd[1420]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 28 20:26:14 jchun-desktop systemd[1420]: keyswap.service: Scheduled restart job, restart counter is at 75.
Mar 28 20:26:14 jchun-desktop systemd[1420]: Stopped keyswap for Terminal and GUI.
Mar 28 20:26:14 jchun-desktop systemd[1420]: Starting keyswap for Terminal and GUI...
Mar 28 20:26:19 jchun-desktop systemd[1420]: Started keyswap for Terminal and GUI.
Mar 28 20:26:19 jchun-desktop bash[31938]: Importing user_config.json...
Mar 28 20:26:19 jchun-desktop bash[31938]: Data from user_config.json imported successfully.
Mar 28 20:26:19 jchun-desktop bash[31938]: Running init command: gsettings set org.gnome.mutter overlay-key ''
Mar 28 20:26:19 jchun-desktop bash[31938]: Starting keyswap...
Mar 28 20:26:19 jchun-desktop bash[31938]: First window name: Io.elementary.switchboard
Mar 28 20:26:19 jchun-desktop bash[31938]: gui: Io.elementary.switchboard
Mar 28 20:26:31 jchun-desktop bash[31938]: firefox: Firefox
Mar 28 20:26:31 jchun-desktop bash[31938]: gui: Io.elementary.switchboard
Mar 28 20:26:40 jchun-desktop bash[31938]: term: Io.elementary.terminal
Mar 28 20:26:45 jchun-desktop bash[31938]: gui: TelegramDesktop
Mar 28 20:26:48 jchun-desktop bash[31938]: firefox: Firefox
Mar 28 20:26:59 jchun-desktop bash[31938]: term: Io.elementary.terminal
Mar 28 20:27:59 jchun-desktop systemd[1420]: Stopping keyswap for Terminal and GUI...
Mar 28 20:27:59 jchun-desktop systemd[1420]: Stopped keyswap for Terminal and GUI.
Mar 28 20:28:35 jchun-desktop systemd[1420]: Started keyswap for Terminal and GUI.
Mar 28 20:28:35 jchun-desktop bash[955]: Importing user_config.json...
Mar 28 20:28:35 jchun-desktop bash[955]: Data from user_config.json imported successfully.
Mar 28 20:28:35 jchun-desktop bash[955]: Running init command: gsettings set org.gnome.mutter overlay-key ''
Mar 28 20:28:35 jchun-desktop bash[955]: Starting keyswap...
Mar 28 20:28:35 jchun-desktop bash[955]: First window name: Io.elementary.terminal
Mar 28 20:28:35 jchun-desktop bash[955]: term: Io.elementary.terminal
Mar 28 20:28:39 jchun-desktop bash[955]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
Mar 28 20:28:39 jchun-desktop bash[955]:       after 140 requests (140 known processed) with 0 events remaining.
Mar 28 20:28:39 jchun-desktop bash[955]: gui: discord
Mar 28 20:28:39 jchun-desktop bash[955]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
Mar 28 20:28:39 jchun-desktop bash[955]:       after 22 requests (22 known processed) with 0 events remaining.
Mar 28 20:28:39 jchun-desktop systemd[1420]: keyswap.service: Main process exited, code=exited, status=1/FAILURE
Mar 28 20:28:39 jchun-desktop systemd[1420]: keyswap.service: Failed with result 'exit-code'.
Mar 28 20:28:40 jchun-desktop systemd[1420]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 28 20:28:40 jchun-desktop systemd[1420]: keyswap.service: Scheduled restart job, restart counter is at 1.
Mar 28 20:28:40 jchun-desktop systemd[1420]: Stopped keyswap for Terminal and GUI.
Mar 28 20:28:40 jchun-desktop systemd[1420]: Started keyswap for Terminal and GUI.
Mar 28 20:29:41 jchun-desktop bash[1237]: Invalid MIT-MAGIC-COOKIE-1 keyImporting user_config.json...
Mar 28 20:29:41 jchun-desktop bash[1237]: Data from user_config.json imported successfully.
Mar 28 20:29:41 jchun-desktop bash[1237]: Running init command: gsettings set org.gnome.mutter overlay-key ''
Mar 28 20:29:41 jchun-desktop bash[1237]: fail to open X server display...
Mar 28 20:29:41 jchun-desktop bash[1237]: fail to open X server display...
Mar 28 20:29:41 jchun-desktop bash[1237]: fail to open X server display for 1 minute...
Mar 28 20:29:41 jchun-desktop bash[1237]: Kintox11 is now exiting...
Mar 28 20:29:41 jchun-desktop systemd[1420]: keyswap.service: Main process exited, code=exited, status=1/FAILURE
Mar 28 20:29:41 jchun-desktop systemd[1420]: keyswap.service: Failed with result 'exit-code'.
-- Reboot --
Mar 28 20:30:51 jchun-desktop systemd[1461]: Started keyswap for Terminal and GUI.
Mar 28 20:30:51 jchun-desktop bash[2051]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
Mar 28 20:30:51 jchun-desktop bash[2051]:       after 140 requests (140 known processed) with 0 events remaining.
Mar 28 20:30:51 jchun-desktop bash[2051]: Importing user_config.json...
Mar 28 20:30:51 jchun-desktop bash[2051]: Data from user_config.json imported successfully.
Mar 28 20:30:51 jchun-desktop bash[2051]: Running init command: gsettings set org.gnome.mutter overlay-key ''
Mar 28 20:30:51 jchun-desktop bash[2051]: Starting keyswap...
Mar 28 20:30:51 jchun-desktop bash[2051]: First window name: TelegramDesktop
Mar 28 20:30:51 jchun-desktop bash[2051]: gui: TelegramDesktop
Mar 28 20:30:51 jchun-desktop bash[2051]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
Mar 28 20:30:51 jchun-desktop bash[2051]:       after 16 requests (16 known processed) with 0 events remaining.
Mar 28 20:30:51 jchun-desktop systemd[1461]: keyswap.service: Main process exited, code=exited, status=1/FAILURE
Mar 28 20:30:51 jchun-desktop systemd[1461]: keyswap.service: Failed with result 'exit-code'.
Mar 28 20:30:52 jchun-desktop systemd[1461]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 28 20:30:52 jchun-desktop systemd[1461]: keyswap.service: Scheduled restart job, restart counter is at 1.
Mar 28 20:30:52 jchun-desktop systemd[1461]: Stopped keyswap for Terminal and GUI.
Mar 28 20:30:52 jchun-desktop systemd[1461]: Started keyswap for Terminal and GUI.
Mar 28 21:28:47 jchun-desktop bash[2149]: Invalid MIT-MAGIC-COOKIE-1 keyImporting user_config.json...
Mar 28 21:28:47 jchun-desktop bash[2149]: Data from user_config.json imported successfully.
Mar 28 21:28:47 jchun-desktop bash[2149]: Running init command: gsettings set org.gnome.mutter overlay-key ''
Mar 28 21:28:47 jchun-desktop bash[2149]: fail to open X server display...
Mar 28 21:28:47 jchun-desktop bash[2149]: fail to open X server display...
Mar 28 21:28:47 jchun-desktop bash[2149]: fail to open X server display for 1 minute...
Mar 28 21:28:47 jchun-desktop bash[2149]: Kintox11 is now exiting...
Mar 28 21:28:47 jchun-desktop systemd[1461]: keyswap.service: Main process exited, code=exited, status=1/FAILURE
Mar 28 21:28:47 jchun-desktop systemd[1461]: keyswap.service: Failed with result 'exit-code'.
Mar 28 21:28:48 jchun-desktop systemd[1461]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 28 21:28:48 jchun-desktop systemd[1461]: keyswap.service: Scheduled restart job, restart counter is at 2.
Mar 28 21:28:48 jchun-desktop systemd[1461]: Stopped keyswap for Terminal and GUI.
Mar 28 21:28:48 jchun-desktop systemd[1461]: Started keyswap for Terminal and GUI.
Mar 28 21:28:48 jchun-desktop bash[2972]: Importing user_config.json...
Mar 28 21:28:48 jchun-desktop bash[2972]: Data from user_config.json imported successfully.
Mar 28 21:28:48 jchun-desktop bash[2972]: Running init command: gsettings set org.gnome.mutter overlay-key ''
Mar 28 21:28:48 jchun-desktop bash[2972]: Starting keyswap...
Mar 28 21:28:48 jchun-desktop bash[2972]: First window name: Io.elementary.terminal
Mar 28 21:28:48 jchun-desktop bash[2972]: term: Io.elementary.terminal
Mar 28 21:29:41 jchun-desktop bash[2972]: X11 error: type=0, serial=51, code=3
Mar 28 21:29:41 jchun-desktop bash[2972]: fail to get top window: 1
Mar 28 21:29:41 jchun-desktop systemd[1461]: keyswap.service: Main process exited, code=exited, status=1/FAILURE
Mar 28 21:29:41 jchun-desktop systemd[1461]: keyswap.service: Failed with result 'exit-code'.
Mar 28 21:29:42 jchun-desktop systemd[1461]: keyswap.service: Service hold-off time over, scheduling restart.
Mar 28 21:29:42 jchun-desktop systemd[1461]: keyswap.service: Scheduled restart job, restart counter is at 3.
Mar 28 21:29:42 jchun-desktop systemd[1461]: Stopped keyswap for Terminal and GUI.
Mar 28 21:29:42 jchun-desktop systemd[1461]: Started keyswap for Terminal and GUI.
Mar 28 21:29:42 jchun-desktop bash[4186]: Importing user_config.json...
Mar 28 21:29:42 jchun-desktop bash[4186]: Data from user_config.json imported successfully.
Mar 28 21:29:42 jchun-desktop bash[4186]: Running init command: gsettings set org.gnome.mutter overlay-key ''
Mar 28 21:29:42 jchun-desktop bash[4186]: Starting keyswap...
Mar 28 21:29:42 jchun-desktop bash[4186]: First window name: Io.elementary.terminal
Mar 28 21:29:42 jchun-desktop bash[4186]: term: Io.elementary.terminal
rbreaves commented 4 years ago

hmmm.. well that is not good. I guess I've not tested dev nearly enough under ElementaryOS. I'll spin it up now and see what happens.

I am really curious about what caused this.

sh: 1: 1: Too many open files

Perhaps running this would tell you if the caret script is running more than once? It shouldn't be, but want to make sure. As long as the service crashes and restarts automatically or manually the caret script should follow afaik.

ps -aux | grep caret

And I am not sure what would cause the DE side of things to crash yet, maybe the new keymapping is causing xkb to wig out in some way that I haven't seen before. And I can't speculate on what is causing the display server to be unavailable.

Mar 28 20:30:51 jchun-desktop bash[2051]: XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
Mar 28 20:30:51 jchun-desktop bash[2051]:       after 140 requests (140 known processed) with 0 events remaining.
rbreaves commented 4 years ago

Well the only thing I that I noted that was odd when I stuck elementaryOS on dev was that I had to run the installer twice instead of once for some reason, second time I specified I wanted the system level shortcuts installed with a Y instead of blank, even though the installer should default to Y if nothing is provided. (The 1st time didn't remap the Alt+Tab to Cmd+Tab like expected)

Also had to manually startup Kinto the first time, but that was probably due to the timer being setup for the first time after Kinto not using any timer. Although I feel like the setup.py and sh file should have taken care of that properly already. Any ways between restarting the keyswap service and re-runing the dev setup again it all went fine.

systemctl --user restart keyswap
# kinto directory
./setup.py

My log didn't really indicate a problem while app switching using Cmd+Tab, even installed the same Telegram and Firefox app as you to see if that had any impact, sometimes specific apps can cause x11 to do weird things.

Mar 28 21:19:46 rbreaves-VirtualBox systemd[1011]: Started keyswap for Terminal and GUI.
Mar 28 21:19:46 rbreaves-VirtualBox bash[4418]: Importing user_config.json...
Mar 28 21:19:46 rbreaves-VirtualBox bash[4418]: Data from user_config.json imported successfully.
Mar 28 21:19:46 rbreaves-VirtualBox bash[4418]: Running init command: gsettings set org.gnome.mutter overlay-key ''
Mar 28 21:19:46 rbreaves-VirtualBox bash[4418]: Starting keyswap...
Mar 28 21:19:46 rbreaves-VirtualBox bash[4418]: First window name: Io.elementary.terminal
Mar 28 21:19:46 rbreaves-VirtualBox bash[4418]: term: Io.elementary.terminal
Mar 28 21:20:23 rbreaves-VirtualBox bash[4418]: chrome: Epiphany
Mar 28 21:20:26 rbreaves-VirtualBox bash[4418]: term: Io.elementary.terminal
Mar 28 21:20:35 rbreaves-VirtualBox bash[4418]: chrome: Epiphany
Mar 28 21:20:37 rbreaves-VirtualBox bash[4418]: term: Io.elementary.terminal
Mar 28 21:20:59 rbreaves-VirtualBox bash[4418]: gui: Wingpanel
Mar 28 21:21:04 rbreaves-VirtualBox bash[4418]: term: Io.elementary.terminal
Mar 28 21:21:04 rbreaves-VirtualBox bash[4418]: gui: Io.elementary.appcenter
Mar 28 21:21:10 rbreaves-VirtualBox bash[4418]:      Plank
Mar 28 21:21:10 rbreaves-VirtualBox bash[4418]:      Io.elementary.appcenter
Mar 28 21:21:13 rbreaves-VirtualBox bash[4418]:      Io.elementary.desktop.agent-polkit
Mar 28 21:21:24 rbreaves-VirtualBox bash[4418]:      Plank
Mar 28 21:21:40 rbreaves-VirtualBox bash[4418]: term: Io.elementary.terminal
Mar 28 21:22:02 rbreaves-VirtualBox bash[4418]: gui: Wingpanel
Mar 28 21:22:06 rbreaves-VirtualBox bash[4418]:      Io.elementary.appcenter
Mar 28 21:22:14 rbreaves-VirtualBox bash[4418]:      Plank
Mar 28 21:22:44 rbreaves-VirtualBox bash[4418]:      Io.elementary.appcenter
Mar 28 21:22:50 rbreaves-VirtualBox bash[4418]:      Wingpanel
Mar 28 21:22:53 rbreaves-VirtualBox bash[4418]:      Io.elementary.appcenter
Mar 28 21:22:56 rbreaves-VirtualBox bash[4418]: firefox: Firefox
Mar 28 21:23:09 rbreaves-VirtualBox bash[4418]: gui: Wingpanel
Mar 28 21:23:17 rbreaves-VirtualBox bash[4418]: firefox: Firefox
Mar 28 21:23:18 rbreaves-VirtualBox bash[4418]: gui: TelegramDesktop
Mar 28 21:23:23 rbreaves-VirtualBox bash[4418]: term: Io.elementary.terminal
Mar 28 21:23:25 rbreaves-VirtualBox bash[4418]: chrome: Epiphany
Mar 28 21:23:26 rbreaves-VirtualBox bash[4418]: term: Io.elementary.terminal
Mar 28 21:23:29 rbreaves-VirtualBox bash[4418]: gui: TelegramDesktop
Mar 28 21:23:31 rbreaves-VirtualBox bash[4418]: term: Io.elementary.terminal
Mar 28 21:23:34 rbreaves-VirtualBox bash[4418]: chrome: Epiphany
Mar 28 21:23:35 rbreaves-VirtualBox bash[4418]: term: Io.elementary.terminal
jonchun commented 4 years ago

I'll give it another shot in a bit. I definitely didn't run the setup.py twice, so that could be it.

Not 100% sure I want to stick on ElementaryOS though so this issue might end up fizzling out. While the on-boarding process was super pretty and great, there are little things about it that are starting to annoy the hell out of me (like the design decisions). I'm also starting to miss the global menu a lot more than I thought. I'll give it one more swing and if it doesn't work right away I'll just drop it for now. Busy testing if KDE will work for me.

jonchun commented 4 years ago

Perhaps running this would tell you if the caret script is running more than once? It shouldn't be, but want to make sure. As long as the service crashes and restarts automatically or manually the caret script should follow afaik.

Ha! interesting...

ps -aux | grep caret
jchun    18244  0.0  0.0  38500  3120 ?        S    22:31   0:00 /bin/bash ./caret_status.sh
jchun    18262  0.0  0.0  38500   256 ?        S    22:31   0:00 /bin/bash ./caret_status.sh
jchun    18376  0.0  0.0  40044  1036 pts/0    S+   22:34   0:00 grep --color=auto caret
rbreaves commented 4 years ago

I just checked mine as well and having that process in there twice like that is actually normal. It is one process still so that is fine. @Jonchun

I guess when it is in there 3 or 4 times that will cause problems as they are both trying to write to the same file - and that really has only ever occurred under my earlier development of the caret indicator script. No one has ever reported it running multiple times to me thankfully. As far as I know unless you are deving it like I am it won't happen lol.

rbreaves commented 4 years ago

The Alt+Tab being mapped to Cmd+Tab appears to be inconsistent under ElementaryOS with the dev branch. Not sure why that would be.

Hmmm.. something in elementaryOS must have reset the shortcut keys, but I have no idea what.. why would a service or something reset shortcuts after they've been set and not even wait for a reboot either. That is bizarre.. at any rate re-running these commands fixes it for me..

# You can check the values first
gsettings get org.gnome.desktop.wm.keybindings switch-applications
gsettings get org.gnome.desktop.wm.keybindings panel-main-menu
gsettings get org.gnome.desktop.wm.keybindings panel-main-menu

gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Primary>F13','<Primary><Shift>F13','<Alt>Tab']"
gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "['<Primary>F14','<Primary><Shift>F14','<Alt><Shift>Tab']"
gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['<Control><Shift>Space','<Super>Space']"

# Check the values again to make sure they are right
gsettings get org.gnome.desktop.wm.keybindings switch-applications
gsettings get org.gnome.desktop.wm.keybindings panel-main-menu
gsettings get org.gnome.desktop.wm.keybindings panel-main-menu
rbreaves commented 4 years ago

Alt+Tab does not have to be left in place tbh, but I've been leaving it in place under Gnome since it supports multiple shortcut keys just fine and users may not realize that the macOS style keys are available under dev.

jonchun commented 4 years ago

Interestingly enough, perhaps it's because I've changed something that you left stock in Elementary OS (Not really sure what it would be since I didn't change too much), but whenever I try to install from dev, it messes everything up and my desktop environment starts crashing.

I just did a dry run of my KDE environment in a VM and am happy-ish with it. I'll probably lose this Elementary OS environment as I switch. However, here's a journalctl showing you the weirdness:

Mar 29 02:45:20 jchun-desktop systemd[1576]: Started keyswap for Terminal and GUI.
Mar 29 02:45:20 jchun-desktop bash[4581]: Importing user_config.json...
Mar 29 02:45:20 jchun-desktop bash[4581]: Data from user_config.json imported successfully.
Mar 29 02:45:20 jchun-desktop bash[4581]: Running init command: gsettings set org.gnome.mutter overlay-key ''
Mar 29 02:45:20 jchun-desktop bash[4581]: Starting keyswap...
Mar 29 02:45:20 jchun-desktop bash[4581]: First window name: Sublime_text
Mar 29 02:45:20 jchun-desktop bash[4581]: gui: Sublime_text
Mar 29 02:45:24 jchun-desktop bash[4581]: term: Io.elementary.terminal
Mar 29 02:45:40 jchun-desktop bash[4581]: gui: Sublime_text
Mar 29 02:45:43 jchun-desktop bash[4581]: term: Io.elementary.terminal
Mar 29 02:46:17 jchun-desktop systemd[1576]: Stopping keyswap for Terminal and GUI...
Mar 29 02:46:17 jchun-desktop systemd[1576]: Stopped keyswap for Terminal and GUI.
Mar 29 02:46:40 jchun-desktop systemd[1576]: Started keyswap for Terminal and GUI.
Mar 29 02:46:40 jchun-desktop bash[5328]: Importing user_config.json...
Mar 29 02:46:40 jchun-desktop bash[5328]: Data from user_config.json imported successfully.
Mar 29 02:46:40 jchun-desktop bash[5328]: Running init command: gsettings set org.gnome.mutter overlay-key ''
Mar 29 02:46:40 jchun-desktop bash[5328]: Starting keyswap...
Mar 29 02:46:40 jchun-desktop bash[5328]: First window name: Io.elementary.terminal
Mar 29 02:46:40 jchun-desktop bash[5328]: term: Io.elementary.terminal
-- Reboot --
Mar 29 02:48:08 jchun-desktop systemd[1594]: Started keyswap for Terminal and GUI.
-- Reboot --
Mar 29 02:48:58 jchun-desktop systemd[1620]: Started keyswap for Terminal and GUI.
-- Reboot --
Mar 29 02:52:03 jchun-desktop systemd[1526]: Started keyswap for Terminal and GUI.
Mar 29 02:52:03 jchun-desktop bash[2606]: Importing user_config.json...
Mar 29 02:52:03 jchun-desktop bash[2606]: Data from user_config.json imported successfully.
Mar 29 02:52:03 jchun-desktop bash[2606]: Starting keyswap...
Mar 29 02:52:03 jchun-desktop bash[2606]: First window name: Io.elementary.terminal
Mar 29 02:52:03 jchun-desktop bash[2606]: term: Io.elementary.terminal

Note how there are multiple reboots.

-- Reboot --
Mar 29 02:48:08 jchun-desktop systemd[1594]: Started keyswap for Terminal and GUI.
-- Reboot --
Mar 29 02:48:58 jchun-desktop systemd[1620]: Started keyswap for Terminal and GUI.
-- Reboot --

These reboots are because my desktop went into a frozen state or black screen (one or the other) and I did a physical button reboot. Here was my syslog from an example time period (nothing interesting)

Mar 29 02:48:05 jchun-desktop systemd-timesyncd[1074]: Synchronized to time server 91.189.91.157:123 (ntp.ubuntu.com).
Mar 29 02:48:08 jchun-desktop io.elementary.f[2691]: Application.vala:50: Report any issues/bugs you might find to https://github.com/elementary/files/issues
Mar 29 02:48:08 jchun-desktop dbus-daemon[1653]: [session uid=1000 pid=1653] Activating service name='io.elementary.files.db' requested by ':1.107' (uid=1000 pid=2691 comm="io.elementary.files " label="unconfined")
Mar 29 02:48:08 jchun-desktop io.elementary.f[2698]: marlind-tagging.vala:77: Database path: /home/jchun/.config/marlin/marlin.db 
Mar 29 02:48:08 jchun-desktop dbus-daemon[1653]: [session uid=1000 pid=1653] Successfully activated service 'io.elementary.files.db'
Mar 29 02:48:08 jchun-desktop dbus-daemon[1653]: [session uid=1000 pid=1653] Activating via systemd: service name='org.gtk.vfs.UDisks2VolumeMonitor' unit='gvfs-udisks2-volume-monitor.service' requested by ':1.107' (uid=1000 pid=2691 comm="
io.elementary.files " label="unconfined")
Mar 29 02:48:08 jchun-desktop systemd[1594]: Started keyswap for Terminal and GUI.
Mar 29 02:48:08 jchun-desktop systemd[1594]: Starting Virtual filesystem service - disk device monitor...
Mar 29 02:48:08 jchun-desktop dbus-daemon[1653]: [session uid=1000 pid=1653] Successfully activated service 'org.gtk.vfs.UDisks2VolumeMonitor'
Mar 29 02:48:08 jchun-desktop systemd[1594]: Started Virtual filesystem service - disk device monitor.
Mar 29 02:48:08 jchun-desktop dbus-daemon[1653]: [session uid=1000 pid=1653] Activating via systemd: service name='org.gtk.vfs.MTPVolumeMonitor' unit='gvfs-mtp-volume-monitor.service' requested by ':1.107' (uid=1000 pid=2691 comm="io.eleme
ntary.files " label="unconfined")
Mar 29 02:48:08 jchun-desktop systemd[1594]: Starting Virtual filesystem service - Media Transfer Protocol monitor...
Mar 29 02:48:08 jchun-desktop dbus-daemon[1653]: [session uid=1000 pid=1653] Successfully activated service 'org.gtk.vfs.MTPVolumeMonitor'
Mar 29 02:48:08 jchun-desktop systemd[1594]: Started Virtual filesystem service - Media Transfer Protocol monitor.
Mar 29 02:48:08 jchun-desktop dbus-daemon[1653]: [session uid=1000 pid=1653] Activating via systemd: service name='org.gtk.vfs.GPhoto2VolumeMonitor' unit='gvfs-gphoto2-volume-monitor.service' requested by ':1.107' (uid=1000 pid=2691 comm="io.elementary.files " label="unconfined")
Mar 29 02:48:08 jchun-desktop systemd[1594]: Starting Virtual filesystem service - digital camera monitor...
Mar 29 02:48:08 jchun-desktop dbus-daemon[1653]: [session uid=1000 pid=1653] Successfully activated service 'org.gtk.vfs.GPhoto2VolumeMonitor'
Mar 29 02:48:08 jchun-desktop systemd[1594]: Started Virtual filesystem service - digital camera monitor.
Mar 29 02:48:08 jchun-desktop dbus-daemon[1653]: [session uid=1000 pid=1653] Activating via systemd: service name='org.gtk.vfs.AfcVolumeMonitor' unit='gvfs-afc-volume-monitor.service' requested by ':1.107' (uid=1000 pid=2691 comm="io.elementary.files " label="unconfined")
Mar 29 02:48:08 jchun-desktop systemd[1594]: Starting Virtual filesystem service - Apple File Conduit monitor...
Mar 29 02:48:08 jchun-desktop gvfs-afc-volume-monitor[2743]: Volume monitor alive
Mar 29 02:48:08 jchun-desktop dbus-daemon[1653]: [session uid=1000 pid=1653] Successfully activated service 'org.gtk.vfs.AfcVolumeMonitor'
Mar 29 02:48:08 jchun-desktop systemd[1594]: Started Virtual filesystem service - Apple File Conduit monitor.
Mar 29 02:48:08 jchun-desktop dbus-daemon[1653]: [session uid=1000 pid=1653] Activating via systemd: service name='org.gtk.vfs.GoaVolumeMonitor' unit='gvfs-goa-volume-monitor.service' requested by ':1.107' (uid=1000 pid=2691 comm="io.elementary.files " label="unconfined")
Mar 29 02:48:08 jchun-desktop systemd[1594]: Starting Virtual filesystem service - GNOME Online Accounts monitor...
Mar 29 02:48:08 jchun-desktop dbus-daemon[1653]: [session uid=1000 pid=1653] Successfully activated service 'org.gtk.vfs.GoaVolumeMonitor'
Mar 29 02:48:08 jchun-desktop systemd[1594]: Started Virtual filesystem service - GNOME Online Accounts monitor.
Mar 29 02:48:42 jchun-desktop systemd-modules-load[494]: Inserted module 'lp'
Mar 29 02:48:42 jchun-desktop systemd-modules-load[494]: Inserted module 'ppdev'

another:

Mar 29 02:48:55 jchun-desktop telegram-desktop_telegram-desktop.desktop[1981]: nmReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.85\" (uid=1000 pid=1981 comm=\"t
elegram-desktop -- \" label=\"snap.telegram-desktop.telegram-desktop (enforce)\") interface=\"org.freedesktop.NetworkManager\" member=\"GetDevices\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\
" (uid=0 pid=1163 comm=\"/usr/sbin/NetworkManager --no-daemon \" label=\"unconfined\")"
Mar 29 02:48:55 jchun-desktop telegram-desktop_telegram-desktop.desktop[1981]: "Object path cannot be empty"
Mar 29 02:48:55 jchun-desktop kernel: [   18.439216] audit: type=1107 audit(1585464535.902:45): pid=1134 uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/Networ
kManager" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name="org.freedesktop.NetworkManager" pid=1981 label="snap.telegram-desktop.telegram-desktop" peer_pid=1163 peer_label="unconfined"
Mar 29 02:48:55 jchun-desktop kernel: [   18.439216]  exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
Mar 29 02:48:55 jchun-desktop telegram-desktop_telegram-desktop.desktop[1981]: error: : cannot open
Mar 29 02:48:55 jchun-desktop telegram-desktop_telegram-desktop.desktop[1981]: message repeated 2 times: [ error: : cannot open]
Mar 29 02:48:56 jchun-desktop rtkit-daemon[1595]: Supervising 4 threads of 2 processes of 2 users.
Mar 29 02:48:57 jchun-desktop rtkit-daemon[1595]: message repeated 5 times: [ Supervising 4 threads of 2 processes of 2 users.]
Mar 29 02:48:57 jchun-desktop dbus-daemon[1678]: apparmor="DENIED" operation="dbus_method_call"  bus="session" path="/org/freedesktop/ScreenSaver" interface="org.freedesktop.ScreenSaver" member="GetSessionIdleTime" mask="send" name="org.fr
eedesktop.ScreenSaver" pid=1981 label="snap.telegram-desktop.telegram-desktop" peer_pid=2028 peer_label="unconfined"
Mar 29 02:48:58 jchun-desktop systemd[1620]: Started keyswap for Terminal and GUI.
Mar 29 02:49:09 jchun-desktop pulseaudio[1922]: [pulseaudio] bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.bluez': timed out (service_start_timeout=25000ms)
Mar 29 02:49:12 jchun-desktop systemd-timesyncd[1029]: Synchronized to time server 91.189.89.198:123 (ntp.ubuntu.com).
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@Mar 29 02:49:47 jchun-desktop systemd-modules-load[477]: Inserted module 'lp'
Mar 29 02:49:47 jchun-desktop systemd-modules-load[477]: Inserted module 'ppdev'
Mar 29 02:49:47 jchun-desktop systemd-modules-load[477]: Inserted module 'parport_pc'
Mar 29 02:49:47 jchun-desktop systemd[1]: Starting Flush Journal to Persistent Storage...
Mar 29 02:49:47 jchun-desktop systemd[1]: Started Set the console keyboard layout.
Mar 29 02:49:47 jchun-desktop systemd[1]: Started udev Coldplug all Devices.
Mar 29 02:49:47 jchun-desktop kernel: [    0.000000] microcode: microcode updated early to revision 0x27, date = 2019-02-26
Mar 29 02:49:47 jchun-desktop systemd[1]: Started LVM2 metadata daemon.
Mar 29 02:49:47 jchun-desktop kernel: [    0.000000] Linux version 5.3.0-42-generic (buildd@lcy01-amd64-019) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #34~18.04.1-Ubuntu SMP Fri Feb 28 13:42:26 UTC 2020 (Ubuntu 5.3.0-42.34~18.04.
1-generic 5.3.18)

Keyswap journalctl logs have nothing but it's clearly causing some sort of issue because it crashes after some time. I haven't had the heart to do intensive testing because of how frustrating it was. I was however, able to open up a terminal long enough to downgrade back to the master branch and everything is stable again. In the syslogs, it looks like keyswap is consistently either the last or almost the last service started right before I was forced to reboot.

rbreaves commented 4 years ago

That is really odd. I am running the same version of ElementaryOS in my Virtualbox VM and just can't duplicate that issue. I may start a fresh install of it tomorrow though and try again.

And yea I am not sure, as far as other customizations potentially causing conflicts. Anything is possible.

Personally if you are distro hopping a bit at the moment you may want to checkout Pop!_OS - it's one of my top 3. Pop!_OS, ElementryOS, and KDE Neon are my top 3 for full laptops. Chromebooks have to be galliumOS but none of the recent ones are fully supported unfortunately.

jonchun commented 4 years ago

Thanks for the recommendations! I think for now, I'll stay away from PopOS because although it looks great, the primary reason I'm moving to KDE is because while I'm working I've found myself wanting the global menu more often than I thought. It hasn't been too long since I've switched to Linux as my primary driver, so lots of exploration to do. I'll definitely have to calm it down though because I've eaten through hours of my life at this point testing things out...

I'm hoping this is my last and final reinstall and that any bug reports you see from me in the future are kubuntu related. Here's the thread that got me to pick kubuntu > kde neon: https://www.reddit.com/r/linuxmasterrace/comments/a8ugxe/kde_neon_vs_kubuntu_what_is_the_difference/

jonchun commented 4 years ago

A bit of a throwback to this issue.

I was reading through some of your notes in #90 , but I noticed that you had so many new configs in the dev branch and I didn't want to repeat the same efforts so I checked out the dev branch just to give it another shot in KDE Neon 18.04 and see if any of your recent commits did anything.

I'm sure we were tracking this somewhere else as well because I don't see some of the comments I remember you making but here is my report.

  1. Desktop environment completely crashed. Had to reboot.
  2. Upon reboot, my journalctl had some json length errors that I don't think I've seen yet.
Apr 07 13:22:09 jchun-desktop systemd[1476]: Started keyswap for Terminal and GUI.
Apr 07 13:22:09 jchun-desktop bash[3278]: kintox11: json_object.c:1231: json_object_array_length: Assertion `json_object_get_type(jso) == json_type_array' failed.
Apr 07 13:22:09 jchun-desktop bash[3278]: /home/jchun/.config/kinto/xactive.sh: line 10:  3281 Aborted                 ./kintox11
Apr 07 13:22:09 jchun-desktop systemd[1476]: keyswap.service: Main process exited, code=exited, status=134/n/a
Apr 07 13:22:09 jchun-desktop systemd[1476]: keyswap.service: Failed with result 'exit-code'.
Apr 07 13:22:10 jchun-desktop systemd[1476]: keyswap.service: Service hold-off time over, scheduling restart.
Apr 07 13:22:10 jchun-desktop systemd[1476]: keyswap.service: Scheduled restart job, restart counter is at 1.
Apr 07 13:22:10 jchun-desktop systemd[1476]: Stopped keyswap for Terminal and GUI.
Apr 07 13:22:10 jchun-desktop systemd[1476]: Started keyswap for Terminal and GUI.
Apr 07 13:22:10 jchun-desktop bash[3331]: kintox11: json_object.c:1231: json_object_array_length: Assertion `json_object_get_type(jso) == json_type_array' failed.
Apr 07 13:22:10 jchun-desktop bash[3331]: /home/jchun/.config/kinto/xactive.sh: line 10:  3333 Aborted                 ./kintox11
Apr 07 13:22:10 jchun-desktop systemd[1476]: keyswap.service: Main process exited, code=exited, status=134/n/a
Apr 07 13:22:10 jchun-desktop systemd[1476]: keyswap.service: Failed with result 'exit-code'.
Apr 07 13:22:12 jchun-desktop systemd[1476]: keyswap.service: Service hold-off time over, scheduling restart.
Apr 07 13:22:12 jchun-desktop systemd[1476]: keyswap.service: Scheduled restart job, restart counter is at 2.
Apr 07 13:22:12 jchun-desktop systemd[1476]: Stopped keyswap for Terminal and GUI.
Apr 07 13:22:12 jchun-desktop systemd[1476]: Started keyswap for Terminal and GUI.
Apr 07 13:22:12 jchun-desktop bash[3354]: kintox11: json_object.c:1231: json_object_array_length: Assertion `json_object_get_type(jso) == json_type_array' failed.
Apr 07 13:22:12 jchun-desktop bash[3354]: /home/jchun/.config/kinto/xactive.sh: line 10:  3356 Aborted                 ./kintox11
Apr 07 13:22:12 jchun-desktop systemd[1476]: keyswap.service: Main process exited, code=exited, status=134/n/a
Apr 07 13:22:12 jchun-desktop systemd[1476]: keyswap.service: Failed with result 'exit-code'.
Apr 07 13:22:13 jchun-desktop systemd[1476]: keyswap.service: Service hold-off time over, scheduling restart.
Apr 07 13:22:13 jchun-desktop systemd[1476]: keyswap.service: Scheduled restart job, restart counter is at 3.
Apr 07 13:22:13 jchun-desktop systemd[1476]: Stopped keyswap for Terminal and GUI.
Apr 07 13:22:13 jchun-desktop systemd[1476]: Started keyswap for Terminal and GUI.
Apr 07 13:22:13 jchun-desktop bash[3365]: kintox11: json_object.c:1231: json_object_array_length: Assertion `json_object_get_type(jso) == json_type_array' failed.
Apr 07 13:22:13 jchun-desktop bash[3365]: /home/jchun/.config/kinto/xactive.sh: line 10:  3367 Aborted                 ./kintox11
Apr 07 13:22:13 jchun-desktop systemd[1476]: keyswap.service: Main process exited, code=exited, status=134/n/a
Apr 07 13:22:13 jchun-desktop systemd[1476]: keyswap.service: Failed with result 'exit-code'.
Apr 07 13:22:14 jchun-desktop systemd[1476]: keyswap.service: Service hold-off time over, scheduling restart.
Apr 07 13:22:14 jchun-desktop systemd[1476]: keyswap.service: Scheduled restart job, restart counter is at 4.
Apr 07 13:22:14 jchun-desktop systemd[1476]: Stopped keyswap for Terminal and GUI.
Apr 07 13:22:14 jchun-desktop systemd[1476]: Started keyswap for Terminal and GUI.
Apr 07 13:22:14 jchun-desktop bash[3376]: kintox11: json_object.c:1231: json_object_array_length: Assertion `json_object_get_type(jso) == json_type_array' failed.
Apr 07 13:22:14 jchun-desktop bash[3376]: /home/jchun/.config/kinto/xactive.sh: line 10:  3378 Aborted                 ./kintox11
Apr 07 13:22:14 jchun-desktop systemd[1476]: keyswap.service: Main process exited, code=exited, status=134/n/a
Apr 07 13:22:14 jchun-desktop systemd[1476]: keyswap.service: Failed with result 'exit-code'.
Apr 07 13:22:15 jchun-desktop systemd[1476]: keyswap.service: Service hold-off time over, scheduling restart.
Apr 07 13:22:15 jchun-desktop systemd[1476]: keyswap.service: Scheduled restart job, restart counter is at 5.
Apr 07 13:22:15 jchun-desktop systemd[1476]: Stopped keyswap for Terminal and GUI.
Apr 07 13:22:15 jchun-desktop systemd[1476]: keyswap.service: Start request repeated too quickly.
Apr 07 13:22:15 jchun-desktop systemd[1476]: keyswap.service: Failed with result 'exit-code'.
rbreaves commented 4 years ago

@Jonchun The crash under KDE Neon I am pretty confident comes from the dev branch symbols/type files for term and gui. If the term app loads up first when you login.. or because you started it manually while having the term in focus and then switch to the gui apps then it will almost certainly crash.

Only thing I will know to do about that situation is to do a divide and conquer approach. Take out about half of the symbols/types from either the term file and then apply the gui file and see which half is causing the problem. I don't have any debug log output that I am aware to help figure it out, but fortunately I don't think it'd take that long to find the culprit.

I've been having to work on other things lately and the multithreading that I needed to add to prevent crashes across the board related to the browsers was higher priority for me.

https://github.com/rbreaves/kinto/commit/0baf62a26178af97984b472f4f044b6351ea77a0

jonchun commented 4 years ago

Only thing I will know to do about that situation is to do a divide and conquer approach. Take out about half of the symbols/types from either the term file and then apply the gui file and see which half is causing the problem. I don't have any debug log output that I am aware to help figure it out, but fortunately I don't think it'd take that long to find the culprit.

I'll see if I can find some time to test that out. I'll download the latest hotfix and play with that too.

jonchun commented 4 years ago

Some updates.

  1. I gave the dev branch a shot. It still crashed on me. However, after using the split-half search approach, this snippet in mac_gui seems to have been causing the problem. Removing it stopped the crashes of my DE. That being said, strangely enough, I couldn't reproduce the issue in my KDE Neon 5.18 VM, so I have no idea what could be wrong with it. I do see that there seems to be 6 symbols but 7 actions? Is that expected/intentional?

    // Right to End of Line or end of word
    replace key <RGHT> {
        type[Group1]= "ONE_LEVEL_CTRL",
        symbols[Group1]= [
            Right,
            Right,
            Right,
            Right,
            NoSymbol,
            NoSymbol
        ],
        actions[Group1]= [
            NoAction(),
            NoAction(),
            // Wordwise
            RedirectKey(key=<RGHT>,mods=Control,clearmods=Mod1),
            RedirectKey(key=<RGHT>,mods=Control,clearmods=Mod1),
            RedirectKey(key=<END>,clearmods=Control),
            RedirectKey(key=<END>,clearmods=Control),
            // Change workspace
            NoAction()
        ]
    };
  2. I gave the task switcher a try since I managed to get the dev branch working. Some interesting things to note: image

    • It seems that the forward switching hotkey of "alt+tab" remaps to "ctrl+f13", and that works fine. **
    • However, "alt+shift+tab" remaps to "ctrl+shift+f14" which is a little unexpected. Whatever the case, i couldn't get the reverse cycling to work. (I even tried disabling kinto, but it still doesn't reverse-cycle. Given that, I think it is pretty safe to say that the reverse cycling might just be broken in KDE and I'll probably open a bug report with them regarding this)
    • ** there is a catch though. the ctrl+f13 only works fine when I'm NOT currently active in a terminal application. i haven't checked through all of the keymappings to see if you're properly removing the shift modifier for ctrl+f13 in terminal apps as looking at these xkb configs makes me want to cry but hopefully this info is helpful anyways :joy:
  3. On the dev branch, I noticed that "cmd+f" doesn't work. It doesn't work in firefox and sublime at the very least. Once in a while I can get the "find" window to pop up, but I have not been able to consistently reproduce/find a pattern for how I got it to work. It does seem to not work more than it works.

Don't know how much this helps, but I'm hopeful it gives you a kick-start on trying to address the issues with KDE on the dev branch. I had to switch back to master for now simply because cmd+f / cmd+tab is something I use a lot, but I'd be happy to switch back and test if you get a chance to work on it. It's unfortunate (or maybe fortunate??) that the weird behavior can't be reproduced consistently in a VM as it seems neither you nor I were able to consistently reproduce these problems with a KDE Neon install in a VM.

rbreaves commented 4 years ago

I’ll take a look in a bit & yea I probably didn’t reconcile a merge into dev properly at some point & broke F & the right arrow without realizing it. Thanks for finding it.. I just haven’t had the energy to return to it lol.

On reverse cycling I can hopefully work something out, if nothing else let the tick above tab reverse cycle, it does on macs, but really only after Cmd+tab brings up the prompt. Cmd+` can’t normally pull it up on its own.

rbreaves commented 4 years ago

Looking back through my dev branch I think you were on an older dev branch, the 7th action is not currently there.

rbreaves commented 4 years ago

Updated Dev and resolved the issue, it appeared to be an odd issue on the Down keymap specifically and I had to change out the type from ONE_LEVEL_CMD to ONE_LEVEL_CTRL. There's no real reason that I am aware of that caused KDE to crash and not like it vs the other DE's but oh well.

Also resolved the Cmd+F shortcut, apparently the introduction of Cmd+Ctrl+F (Fullscreen/Maximize) causes a glitch of some sort with Cmd+F, so I have simply commented it out for now.

Will start to try and address the Alt+Tab or Cmd+Tab feature some more soon, but not tonight. I believe Dev is at the very least stable now under KDE.

** Will need to add the KWin shortcut removal of Alt+F3, it interferes with Sublimes Select All and the remap of Cmd+Ctrl+G to Alt+F3.

rbreaves commented 4 years ago

I believe I have fixed Cmd+Tab for KDE now in the latest Dev branch if you'd like to try it out @Jonchun.

https://github.com/rbreaves/kinto/commit/65df97e8bf9f796c5678f1e8d677afdc5a7a17f3

jonchun commented 4 years ago

Cmd+tab still maps to ctrl+f13 which I think is a good thing. However, same as before. If I start the cmd+tab from a gui window, it works great. However, whenever I'm starting the cmd+tab from a terminal, it stops working.

I'm pretty sure what's still happening is that somehow, your rules for removing the shift modifier for "alt+shift+tab" when in terminal are not getting through. If I go to the alternative area and press physical keys "alt+shift+tab", I get the following show up "ctrl+shift+f14" image

With this mapped, it doesn't quite work right, but I can at least get the task switcher window to pop up when starting from a terminal application (just by pressing physical alt+tab). It won't let me tab forward though. I can only get the icons to pop up, whereas if I start from a GUI window, I can keep pressing tab to tab through correctly.

I have nothing else set for now. Just the forward ctrl+f13: image

Finally, if I try to select physical "ctrl+tab" for current application, it detects "meta" and then won't detect my tab key. Same thing with "meta+shift" (so I can't use meta+tab or meta+shift+tab) as current application switching. image

I've tried commit 0f6cfb95ccbad48c97dd6916e44d632e7d4ee3e0 on dev and commit 58d3273f3d414bac1d8609b6e987ad4b11baa489 on master (looks like you just merged dev a few minutes ago)

rbreaves commented 4 years ago

I have merged them and was about to do a release, but I will spin up my KDE instance once more. While the command to set the Terminal app cycle (to reverse cycle) should work I probably did set that manually, even though it was also coded. Hence why I could have missed though. I thought about about unsetting it and then running the installer but failed to do so.

jonchun commented 4 years ago

P.S. It looks like whatever changes you made in the hotfix branch to fix firefox input lagging might have gotten lost because the issue seems back.

rbreaves commented 4 years ago

Thanks for noticing, I am surprised the merge strategy did not preserve that fix, but apparently I need to pay more attention in making sure I always apply the hotfixes to the dev branch as I go along. I figured it'd be the same difference though merging master into dev and then back to master, but apparently not.

rbreaves commented 4 years ago

@Jonchun I think I fixed the Cmd+Tab issue for real this time lol. I somehow had a comma in there that did not belong.

rbreaves commented 4 years ago

@Jonchun Also there's an interesting issue with KDE where sometimes you literally cannot set the keybind in the GUI with the xkb modifications (it still works in actual usage though) - but it needs to be set programmatically. So that's interesting, if not also annoying, because someone could easily lose their hotkey binds if they start screwing around with things and then have to re-run the installer to get it back or pull it out manually from the setup.py file.

Not ideal, but it does appear that this method does work for KDE and I added in commented code on the mac_gui and mac_term files so that any slight differences that may exist under Gnome or Chromebooks with xfce can be accounted for still. That bit of perl code and regex has been in the dev branch for awhile I just hadn't fully fleshed it out till today.

Also since restoring stability under KDE that did give me the added motivation to revisit and fix the tab switching issue, so I appreciate your help there. If there is anything more that you find just let me know.

I do need to work on getting a full uninstaller added though, as right now this does make some system level modifications to hotkeys that I was trying hard to avoid - but I did so mostly because it could not be avoided or to just unify things a little more. On Gnome I think I am just adding extra hotkeys though, not really changing any defaults. On XFCE and KDE though some changes have to be made.

jonchun commented 4 years ago

Currently on f9e000ef238112a3478c5f2c857d57dc54a32eb9 of dev

I'm actually not seeing any changes in behavior of the tabbing in KDE. Same as before, it only works correctly if I'm starting from a GUI application. However, since the firefox GUI fix seems to have been resolved, I'm also pretty sure I'm on the latest commit.

I can give it a shot in a VM in a sec to see if it changes. What distro are you running for your KDE tests? I'd be curious to download that one and see if I get the same behavior.

After reading this:

Also there's an interesting issue with KDE where sometimes you literally cannot set the keybind in the GUI with the xkb modifications (it still works in actual usage though) - but it needs to be set programmatically.

I thought perhaps you were doing something in the system level shortcut prompt (which I wasn't using before)

Hitting yes to that prompt doesn't seem to have made a difference in behavior though. However, I did notice that it was slightly confusing. It looked like it correctly detected that I was on KDE, but then I get an error saying it is not supported. Shouldn't there be a warning telling me that my distro/DE is not supported BEFORE the yes/no prompt?

Detected KDE 18.04 DE: kde

Do you want to apply system level shortcuts? (Y/n) Y
distro: kde de: kde
A supported OS and DE was not found, you may not have full system level shortcuts installed.
rbreaves commented 4 years ago
distro: kde de: kde
A supported OS and DE was not found, you may not have full system level shortcuts installed.

@Jonchun Yea, that'd be the fly in the ointment lol. One sec.

jonchun commented 4 years ago

I can't get it to work in my VM of KDE Neon either. Same behavior where I can tab forward when starting from a GUI application, but nothing if I try from a terminal application.

In both the VM and my baremetal install, I had to manually go into the system settings and set "alt+tab" which mapped to "ctrl+f13" (without that step, alt+tab didn't window switch at all)

EDIT: another weird thing I noticed while testing this is that the keyswap service seems to try and take over keybinds inside my VM as well. It doesn't seem to be for EVERYTHING because I can't copy/paste without installing kinto in the VM for example, but if I'm playing with stuff like "alt+tab", it doesn't correctly detect from inside virtualbox if I have kinto running on the host machine. Perhaps you should just completely blacklist virtualbox/vm software from kinto since I think it makes sense to not want to remap anything when virtualizing? i know it's veering off track again so we might want to open this as a separate issue if it's not as simple as it seems to resolve.

rbreaves commented 4 years ago

@Jonchun Ok I think the dev branch now applies the kde hotkeys properly under Neon and any other KDE 5+ distro. Let me know if it works out, but also if it seems like it isn't working maybe logout and back in and see if it takes then?

And yea Virtualbox and a few other apps I believe may need some remappings to occur on the udev level which I am probably going to do on an upcoming release.

rbreaves commented 4 years ago

Also I did get to keep Cmd+Ctrl+F for fullscreening apps.. by simply updating KDE to accept Ctrl(Super)+Cmd(Ctrl)+F directly and not trying to remap on the xkb end. Would have liked to have kept the Alt+F10 since it is so standard for Windows and Linux.. but Meta+PageUp was kept, I could swap that out for Alt+F10 though.

jonchun commented 4 years ago

ok -- just had a chance to test latest dev on my laptop and it seems to (sortof) work even when starting from terminal. Will try it out on my deskopt later on.

While the command to set the Terminal app cycle (to reverse cycle) should work I probably did set that manually, even though it was also coded. Hence why I could have missed though.

From this comment, I'm pretty sure it's intentional, but starting the alt+tab from terminal seems to reverse cycle it even if I'm only hitting cmd+tab for forward cycle. I tried completely removing the reverse cycle hotkey and adding "Ctrl+shift+F14" as my forward cycle alternative hotkey, but it seems that cmd+tab from terminal reverse cycles even if I unset those hotkeys from the task switcher GUI.

I know you mentioned that there are issues with getting shift detection to work, but if anything, it's definitely a bit confusing when the task switcher changes directions based on which active window you're starting from.

rbreaves commented 4 years ago

@Jonchun It is intentional.. but let me try something real quick. I might be able to get them to both go forwards. I just need to make several changes to make it happen between all OS's without breaking something else.

rbreaves commented 4 years ago

@Jonchun Since I can easily add shift under the GUI side I figured this would work and then just set the terminal to use F13 and not F14, but for whatever reason it still cycles backwards. I do not know why.

Screen Shot 2020-04-12 at 7 29 39 PM
jonchun commented 4 years ago

You're right. I just did a little bit of testing to figure out what the issue is, and I think it is just a bug/misleading information in the task switcher configuration. It seems that forward and reverse don't actually mean anything, and both of those hotkeys are actually hotkeys to simply bring up the task switcher menu. I tested this by randomly setting the hotkey to forward/reverse to like ctrl+0 and ctrl+-. In both cases, all it does is bring up the task switcher menu. (as long as you're still holding ctrl) I also can't get it to accept any hotkey combination that starts with something that's NOT ctrl, interestingly enough. starting with meta/alt just doesn't want to take.

From there, it seems hardcoded to tab forward when you hit only tab, and hardcoded to tab backwards if you hit shift+tab (the whole time you need to be holding down ctrl, or cmd with kinto enabled)

If I'm not mistaken, this is bad news right? Since I'm guessing you don't have a way to detect when the task switcher is open, you won't be able to simply remove the shift modifier if you start the tasks switcher from a terminal application?

rbreaves commented 4 years ago

@Jonchun The more I play around with it the more I think maybe I need to try this again but do a full logout and login. It was glitchy bringing it back to "normal" until I logged out and back in.

rbreaves commented 4 years ago

Well, I think I will add the new code for going forwards even though it does not work - in anticipation of getting hold of the proper maintainer at KDE to update the Tasker Switcher, but yea no telling what that'll look like and how long of a process that will be.

For now I am going to close this ticket. The only other workaround I can suggest is maybe digging into xkeysnail or xdotool and scripting something together to fool the Task Switcher into working properly. What's difficult is figuring out how to script something that activates on "Cmd+Tab" and then stays running until only Cmd is released.

rbreaves commented 4 years ago

@Jonchun Also is it my imagination or on a log out and login is kinto only starting up because you or I am opening up the terminal to look at it? I don't seem to be experiencing this under the other distros, but I am with KDE Neon.

Now it works.. not sure if this is intermittent or what going to try and few more times.

jonchun commented 4 years ago

I've noticed that sometimes kinto autostart is spotty for me as well, but it hasn't bothered me enough to investigate/figure out if it's just my imagination or not. If you're experiencing it too, perhaps something really is wrong. (If kinto is inactive I just run the systemctl restart once and never really have issues again). perhaps some weirdness only on first login :man_shrugging:

What's difficult is figuring out how to script something that activates on "Cmd+Tab" and then stays running until only Cmd is released.

Well, before you made these cmd+tab updates, what worked for me was just mapping cmd+tab to the primary hotkey and cmd+shift+tab to the alternative hotkey. somehow, I'm pretty sure that worked for me to forward cycle whether I started from terminal or not. I'll see if i can find some time tomorrow to revert to an older commit to see if that works for me again.

Personally I'd rather have it always forward cycle than reverse cycle on occasion, so I'll see if I can get it to how I want it and document it here for others until the task switcher itself is fixed upstream.

rbreaves commented 4 years ago

Yea, after several more logouts and logins and several cold reboots too I am finding that sometimes there is just a really log delay on cold reboots. It is not specific to KDE, appears on Pop!_OS as well. I mean a longer delay than I'd like on cold reboots is better than erroring out and not loading at all, so meh I guess - it seems like that is the alternatively and purposely adding a 5 second delay shouldn't have delayed it as much as it feels, but I know without it and the timer service there's a risk it won't start at all. So I am leaving it for now.

And that sounds good, if you find a configuration that works for you under KDE that keeps things cycling forwards let me know and I will get that added instead. Seems like that should have been fairly easy but guess not. 😅