Jump to content
iandol

Cmd+Space Hotkey Activation intermittent after several minutes idle [Solution inside]

Recommended Posts

I have a clear issue on one machine, whose reproducibility depends on *not* using Alfred for a while. On my iMac (magic keyboard2) I have my Alfred hotkey set to ⌘SPACE and if I do not use Alfred for 5-10minutes or more when I press the hotkey Alfred does NOT trigger. If I hit the hotkey a second time then it activates fine; then I dismiss Alfred, and I can trigger it reliably again. BUT if I start working on something and don't trigger Alfred for an amount of time (I haven't determined exactly how long, but it seems to be more than 5 minutes or so), then the first trigger fail happens again. I fixed it by rebooting for a while then it returned. I sync my Alfred settings via Dropbox to my laptop, which DOESN'T ever show this problem...

 

I worried that the problem was physically with my [SPACE] key but I can trigger Spotlight reliably with ⌃SPACE before I try Alfred which fails, and SPACE never fails when I'm writing normally. I've tried using the second ⌘ key just in case the left key was a problem but I also see the same issue.

 

The major difference between my iMac and laptop is I upgraded to 10.13.1 on my iMac where I still run 10.12 on my laptop. Both machines run Alfred V3.5.1 [883]

Edited by iandol
add build number

Share this post


Link to post
Share on other sites

@iandol the behaviour you describe sounds like a hotkey conflict in macOS. The easiest way to check this is to change Alfred's hotkey to e.g. alt+space for a while and see if you still see this issue.

 

Also, it sounds like you already have Spotlight set to something other than cmd+space, have you checked language switching?

 

https://www.alfredapp.com/help/troubleshooting/cmd-space/

 

Cheers,

Andrew

Share this post


Link to post
Share on other sites

Thank you @Andrew . I had no other input sources so no hotkey was assigned. I've now added a new input source and made sure that no input source hotkeys are not ⌘SPACE, then disabled them all (as specified in the instructions)

 

I'll try to run with ⌥SPACE for a while, however my muscle memory is so locked to ⌘ I will often forget, if it seems OK, then I'll try going back to ⌘SPACE and see what the situation is.

 

I do have karabiner elements installed, but only use it to transform CAPS LOCK to something more useful, and I also use BetterTouchTool, but there are no hotkey's assigned to ⌘SPACE, and anyway these apps both run on my laptop where I see no issue.

Share this post


Link to post
Share on other sites
2 hours ago, iandol said:

I do have karabiner elements installed, but only use it to transform CAPS LOCK to something more useful, and I also use BetterTouchTool, but there are no hotkey's assigned to ⌘SPACE, and anyway these apps both run on my laptop where I see no issue.

 

Both of these are capable of intercepting hotkey combinations, so another thing to try would be to temporarily quit these.

Share this post


Link to post
Share on other sites

Thanks Andrew, I've run for a day after exiting karabiner elements and bettertouchtool and I still see the same problem (less often, though note karabiner leaves a process, karabiner_grabber in memory even after exiting) I'm very well aware this is a non-reproducible bug and almost impossible for you to do much about. Is there a way to enable a debugging mode for Alfred, to see if anything gets spat out when the hotkey fails?

Share this post


Link to post
Share on other sites

@iandol you'll need to properly quit karabiner, so that the karabiner_grabber isn't running - this is the part of karabiner which intercepts / manipulates key events.

 

For interest: The way that macOS hotkeys operate is that Alfred registers them with macOS, and is notified by macOS when this hotkey is used. If something in macOS intercepts a hotkey (or any key event for that matter), macOS won't notify, so Alfred isn't even aware that this hotkey combo has been pressed, i.e. there would be nothing for Alfred to log.

Share this post


Link to post
Share on other sites

karabiner_grabber is a root process which isn't unloaded when you force quit Karabiner, run as a KeepAlive daemon, so sudo killall -KILL won't work and I had to manually:

 

sudo launchctl unload /Library/LaunchDaemons/org.pqrs.karabiner.karabiner_grabber.plist 

 

but, though it is only a short time since I made sure karabiner wasn't running, I've still experienced one missed hotkey activation.I'll try to keep Console open and see if I can see anything in the system log when it happens next...

Share this post


Link to post
Share on other sites

I'm also having this problem. It started the moment I updated to High Sierra a week ago.

Like @iandol, I initially suspected a faulty keyboard but it wasn't that. I have the same conditions of the first hotkey being ignored, but only if Alfred has not been activated in the last 5-10 minutes. I'm using the latest version 3.5.1 Build 883 and I've scrupulously reviewed the keyboard shortcuts in System Preferences to make sure there's no conflict.

Share this post


Link to post
Share on other sites

@Steve Ball: do you have any other software that can control the keyboard installed (like bettertouchtool/karabiner etc.)?

 

I have had console open several times when this happened and didn't see anything in system log to give a clue as to what could be happening... 

Share this post


Link to post
Share on other sites

Could you let me know what's listed in your macOS preferences > Security & Privacy > Privacy > Accessibility.

 

This could help point us in the right direction.

 

Cheers,

Andrew

Share this post


Link to post
Share on other sites

ShiftIt and Steam.

 

I have changed the Alfred hotkey to be alt-space (instead of cmd-space) and, so far, I haven't been able to reproduce the problem. So it looks like it's specifically cmd-space with the last version of MacOs

Share this post


Link to post
Share on other sites

I noticed something strange just now. An hour ago I set Alfred to be activated by alt-space and Spotlight to be cmd-space.

 

I went to use Alfred for the first time moments ago since making that change and habitually hit cmd-space. Interestingly, nothing happened, so I hit it again and got Spotlight.

 

So this suggests that MacOS it dropping the first cmd-space hotkey irrespective of what application it activates. I haven't had any problems with Alfred or any other app using hotkeys other than cmd-space so it looks like this is a MacOS bug introduced with High Sierra where the cmd-space hotkey is ignored when it has been pressed for the first time within the last 10 (or so) minutes.

 

MacOS is getting buggier and buggier with every release since Snow Leopard. At least they aren't introducing bugs as serious as allowing root access without a password, for example ;-)

Share this post


Link to post
Share on other sites
21 minutes ago, Steve Ball said:

MacOS is getting buggier and buggier with every release since Snow Leopard.

 

Isn't it? It's got so bad, I generally don't start to think about upgrading to a new major version of macOS until the one after that is about to be released.

 

It's particularly annoying with High Sierra, as they've finally replaced HFS+, which should have been removed a decade ago. But it clearly needs another 6 months in beta.

 

Share this post


Link to post
Share on other sites

I can understand the reasoning of wanting to delay installing macOS upgrades but the passwordless root access highlights the importance of installing patches and updates as soon as they are available. You don't know what serious bugs are being fixed. Particularly if people are adhering to responsible disclosure, your High Sierra upgrade might be protecting you from serious security flaws in Sierra... there's no way of knowing (or it might introduce them!). So I take the upgrades when they are suggested, but I pay the price in all the new bugs and problems. It's crazy how a company like Apple, literally the wealthiest in the world, can't sort out basic problems. I've just spent 2 hours chasing a crazy bug where I can't activate Find My Mac because it's reporting a Server not responding error and it's led me in a fruitless chase of needing to update my iCloud details, but I couldn't do that because I was in the wrong country, then I couldn't update the country because my credit card is out of date and then the changes wouldn't stick and would just revert on refresh, then the changes activated some potential fraud detection and I got locked out and had to go through a verification loop.... it just went on and on and on and I still haven't solved my problem! I'm boiling mad and have lost 2 hours to achieve nothing at all. And I can't raise Apple support tickets like a responsible user to report any of the bugs in *their* software because I'm not under warranty. It's appalling customer service. The wealthiest company in the world should allow its users to report bugs free of charge and receive updates on fixes. I'm really getting to despise Apple, but what's the alternative?

Edited by Andrew
Edited to "installing _macOS_ upgrades" to make it clear that it's a rant about Apple and not Alfred :)

Share this post


Link to post
Share on other sites
1 hour ago, Steve Ball said:

your High Sierra upgrade might be protecting you from serious security flaws in Sierra...

 

Apple provides security updates for the previous 2 versions of macOS, so any holes in El Cap or Sierra still get patched.

 

1 hour ago, Steve Ball said:

I'm really getting to despise Apple, but what's the alternative?

 

Yeah. I used to be almost unreservedly happy with Apple products. Now they're just less bad than the alternatives.

 

 

Edited by deanishe

Share this post


Link to post
Share on other sites

Thanks, @deanishe, that's good to know. I'm going to change my behaviour. Going forward I will ignore the yearly OS upgrade until it's been out there at least 6-12 months. I never imagined I'd get to the point of distrusting Apple's QA to the point of not being willing to accept its free OS updates. But I guess that's life, eh, and especially in technology, everything has its zenith and then goes into decline. As often as not (in our industry) it's a single individual who is able to assemble teams of high-performers and focus their creative potential in a single direction. Without that person and vision most teams/products/companies go into reasonably rapid decline. I've seen it happen many times. The person at the top really does deserve a lot of credit for the team they assemble and what that team achieves. It's sad to see that Apple's light has faded when they once personified excellence and attention to the smallest detail.

Share this post


Link to post
Share on other sites

Given that's we've established that this is a MacOS bug unrelated to Alfred, @Andrew, will Alfred be raising this as a bug report with Apple or is there investigative work that you can do to maybe find out why it's happening? And are you able to reproduce the error, or is it just some users? I imagine it must be a subset of Alfred users or this thread would be full of complaints :-) I haven't done a full OS install since Lion so maybe that's related. Perhaps a full HD-wiping OS install would fix it (not that I want to do that).

Share this post


Link to post
Share on other sites

@Andrew — yes i can confirm that with ⌥SPACE Alfred works OK — however years of use of ⌘SPACE mean I do not function properly without ⌘SPACE :lol:

 

I can only add to the voices that since I have started using macOS (~Panther), I face more stupid (and not so stupid) bugs than ever. But I'm with @deanishe in that they are still less bad than the alternatives (though the gap is diminishing, at least with windows; ubuntu 17.10 broke more things than 10.13 so the differential remains)...

 

Share this post


Link to post
Share on other sites
2 hours ago, iandol said:

ubuntu 17.10

 

Ubuntu has always been absolutely terrible for breaking things. Desktop Linux is always buggy as hell. It seems that as soon as a desktop environment is approaching something like real stability, they throw it in the bin and start again with a shiny new, bug-riddled version.

 

That's why I gave up on desktop Linux: I'm too old for that crap.

Share this post


Link to post
Share on other sites
On 30/11/2017 at 11:33 PM, Steve Ball said:

Perhaps a full HD-wiping OS install would fix it (not that I want to do that).

 

No, my 10.13 install was a clean rebuild from scratch (manual transfer of Library files, reinstall of apps denovo etc.) so full wipe will not solve anything...

Share this post


Link to post
Share on other sites

FIX: On the Apple discussion thread, a number of users have reported that disabling Siri solved the problem of the first activation of Spotlight being ignored (https://discussions.apple.com/thread/8148782?start=30&tstart=0)


UPDATE: I spoke to soon, my problem is back. It's much infrequent now but I still occasionally get the problem. Bugger. Looks like I'll be switching to alt-space and will retrain my fingers.

 

 

I've found a solution to this problem. Others have encountered the same issue with High Sierra (in their cases with Spotlight not activating):

 

https://discussions.apple.com/thread/8148782

 

The suggested solution was to reboot in Safe Mode (hold down Shift while rebooting) and then reboot as normal. It also seems to be advised to run EtreCheck and fix any problems it identifies.

 

It solved my problem. Spotlight reliably starts on first press of cmd-space and I've since disabled that and assigned Alfred the key. All seems good now.

 

Thanks, @iandol, @deanishe, @Andrew

Edited by Steve Ball
New info

Share this post


Link to post
Share on other sites

×
×
  • Create New...