micheleg / dash-to-dock

A dock for the Gnome Shell. This extension moves the dash out of the overview transforming it in a dock for an easier launching of applications and a faster switching between windows and desktops.
https://micheleg.github.io/dash-to-dock/
GNU General Public License v2.0
3.85k stars 462 forks source link

Super+number shorcuts stop working if screensaver has been activated #643

Open eggsyntax opened 6 years ago

eggsyntax commented 6 years ago

Hi, After turning on the Super+(0-9) shortcuts to activate apps, they work very well (and I've come to absolutely love and rely on them). Unfortunately, since updating to Ubuntu 17.10, I'm experiencing a bug. Whenever the screensaver activates (and then the computer is woken back up), those shortcuts no longer work. I can consistently make them work again by turning them off and on again in the dash-to-dock UI. Note the relevant log messages at the bottom of this bug report.

Reproduction: With shortcuts activated through the d-t-d UI, call gnome-screensaver-command -a Move the mouse to turn the screensaver off. Shortcuts no longer work.

Any help, including workarounds, would be enormously appreciated -- now that I've gotten used to those shortcuts, it's hard to live without them. Thanks for the awesomeness that is dash-to-dock!

Repro info:

      Nov 12 21:54:00 egg-p51 gnome-shell[2062]: WARNING: addSignalMethods is replacing existing [0x55c1cf40a7d0 Gjs_ShowAppsIcon.dash-item-container] connect method
      Nov 12 21:54:00 egg-p51 gnome-shell[2062]: WARNING: addSignalMethods is replacing existing [0x55c1cf40a7d0 Gjs_ShowAppsIcon.dash-item-container] disconnect method
      Nov 12 21:54:00 egg-p51 gnome-shell[2062]: WARNING: addSignalMethods is replacing existing [0x55c1cf40a7d0 Gjs_ShowAppsIcon.dash-item-container] emit method
      Nov 12 21:54:07 egg-p51 org.gnome.Shell.desktop[2062]: Window manager warning: Trying to re-add keybinding "app-hotkey-1".
      Nov 12 21:54:07 egg-p51 org.gnome.Shell.desktop[2062]: Window manager warning: Trying to re-add keybinding "app-shift-hotkey-1".
      Nov 12 21:54:07 egg-p51 org.gnome.Shell.desktop[2062]: Window manager warning: Trying to re-add keybinding "app-ctrl-hotkey-1".
      Nov 12 21:54:07 egg-p51 org.gnome.Shell.desktop[2062]: Window manager warning: Trying to re-add keybinding "shortcut".
eggsyntax commented 6 years ago

I should add that I haven't been able to find any relevant issues filed against gnome-screensaver.

micheleg commented 6 years ago

I tried on my system (albeit I'm on 3.22) and I can't reproduce the issue. Does it also happen when the lock screen is triggered automatically or with super-L?

franglais125 commented 6 years ago

org.gnome.Shell.desktop[2062]: Window manager warning: Trying to re-add keybinding "app-hotkey-1".

@didrocks Perhaps you can carry an extra (permanent) patch on the ubuntu-dock branch that renames the keybindings? I've seen this problem pop up in other places (can't remember now, probably Launchpad). This is not so much a problem with dash-to-dock (any change name done on it will be eventually be picked up by ubuntu-dock when rebasing).

When an Ubuntu user first installs dash-to-dock, the app-keys don't work, as the specified keybindings are already defined.

Edit: Added the quote. I was specifically referring to the warnings!

eggsyntax commented 6 years ago

@micheleg Yes, it happens whether the lock screen is triggered automatically or manually. I just tried turning screen locking off, and then letting "blank screen" kick in and then waking it back up, and that's sufficient to break the shortcuts. So I think it's actually not specific to the lock screen, but to the screen-blanking.

@franglais125 I know you're addressing someone else there, but just to be clear, what you're saying is a bit over my head. I think you're saying that Super+number is already bound, though -- do you know what it's bound to / what process is binding it? Is that ubuntu-dock? If I can find a way to eliminate those other bindings, that might be a sufficient workaround for my needs (although seems worth an actual fix).

Thanks!

eggsyntax commented 6 years ago

I've got Ubuntu Dock turned off in tweaks/extensions, in case that makes any difference.

didrocks commented 6 years ago

@franglais125: I think the issue is maybe more than the keybindings aren't properly unregistered on extension teardown (which ubuntu-dock calls when dash to dock is enabled)?

It think that would be more the way to go than renaming (especialy seeing the number of shortcuts), and either fix the bug in dash-to-dock unregistration or even maybe the Shell not doing the proper thing, wdyt?

didrocks commented 6 years ago

Actually, there is maybe a race between having dash-to-dock up and ubuntu-dock tear down. I doubt the Shell will anyway let (even if renaming) setting the same key combinations (super + num for instance) retaken by another extension. We need to give it some thoughts it seems…

eggsyntax commented 6 years ago

For anyone else who encounters this problem, I've finally found a workaround for ubuntu-dock breaking the dash-to-dock keyboard shortcuts: just uninstall ubuntu-dock and then reinstall dash-to-dock. Fortunately, existing dash-to-dock settings will remain in place, so you won't need to reconfigure it.

I don't know whether this fix will persist across updates, but perhaps the ubuntu-dock bug will be fixed by then.

@micheleg thanks again for all your awesome work on d-t-d!

sudo apt remove gnome-shell-extension-ubuntu-dock
sudo apt install gnome-shell-extension-dashtodock
yktoo commented 6 years ago

I can confirm both the bug and that it goes away if you ditch ubuntu-dock and install dashtodock.

AleksandrRadchenko commented 6 years ago

Either confirm. Workaround also works with exceptions:

  1. I didn't remove ubuntu-dock,
  2. I removed d-t-d, but shortcuts start work normally. Seems like ubuntu dock gets settings of d-t-d and applies them in correct way...
mossad-zika commented 6 years ago

Guys, you should uninstall gnome-shell-extension-ubuntu-dock from system, after that - no bugs

moll commented 4 years ago

I'm seeing some fighting between Super+Number shortcuts and GNOME's own "switch to workspace" shortcuts, too, even if the former are disabled in Dash to Dock's settings. It's as if Dash to Dock still binds them to switch to dock apps, but then unbinds them once it reads its configuration... This on Arch Linux, so no Ubuntu extensions are involve.d

apollokit commented 3 years ago

For anyone else who encounters this problem, I've finally found a workaround for ubuntu-dock breaking the dash-to-dock keyboard shortcuts: just uninstall ubuntu-dock and then reinstall dash-to-dock. Fortunately, existing dash-to-dock settings will remain in place, so you won't need to reconfigure it.

I don't know whether this fix will persist across updates, but perhaps the ubuntu-dock bug will be fixed by then.

@micheleg thanks again for all your awesome work on d-t-d!

sudo apt remove gnome-shell-extension-ubuntu-dock
sudo apt install gnome-shell-extension-dashtodock

I was seeing the exact same issue, and this solution worked for me. Note that a restart was required afterwards.