yubiswitch
yubiswitch copied to clipboard
Is there a way to turn off Yubikey to conserve battery?
The tool worked great for me for a few months but I got tired of the Yubikey Nano draining my laptop's battery. I tried turning off the "Enable Yubikey when system locks/sleeps" but it didn't help.
Once I stopped relying on Yubiswitch and instead just pull out the Yubikey when I don't need it (I usually need it about 3 times in the morning and then I'm set for most of the day), my laptop's battery started draining much slower.
Is there anything to be done about this?
My macbook loses about 30% every night while sleeping, due to the Yubikey. Would love to know if there is a way to shut-off yubikey when laptop sleeps.
Is there anything to be done about this?
I don't know. I haven't done research about it. I don't have time to dedicate to this project unfortunately. Feel free to investigate a solution and send a PR. :)
sudo pmset -a hibernatemode 25 sudo pmset -a standbydelay 15
I've done this to switch to hibernate mode with long sleeps. I've seen no functionality changes to the Mac, and the key doesn't draw power
I noticed that some applications, in my case Passwordsafe, resets the Yubikey constantly in the lockscreen.
You can monitor it with udevadm monitor --udev
That might be what's draining you battery.
udevadm is a linux thing. not a MacOS thing.
@hmstanley feel free to send a PR to add those pmset commands in the README.md file in this repo if you think they solved the battery drain issue.
Any updates on this one?
the pm
commands are not really a viable solution since that will make your MacBook hibernate a lot. And then you have to wait for quite some time to wake it up in a normal open-laptop scenario.
Was super excited to stumble upon this project, but if you're still seeing battery drains it's not what I was looking for. Ideally locking Yubikey would completely cut of power to that usb port so it's totally inactive.
No update and no one has time to work on this. Sorry. Feel free to investigate and propose patches, it will be greatly appreciated.