Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to turn off Yubikey to conserve battery? #81

Open
amosshapira opened this issue Sep 26, 2018 · 8 comments
Open

Is there a way to turn off Yubikey to conserve battery? #81

amosshapira opened this issue Sep 26, 2018 · 8 comments

Comments

@amosshapira
Copy link

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?

@vipulsabhaya
Copy link

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.

@pallotron
Copy link
Owner

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. :)

@hmstanley
Copy link

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

@francsw
Copy link

francsw commented Nov 26, 2020

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.

@pallotron
Copy link
Owner

udevadm is a linux thing. not a MacOS thing.

@pallotron
Copy link
Owner

@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.

@digitaljerry
Copy link

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.

@pallotron
Copy link
Owner

No update and no one has time to work on this. Sorry. Feel free to investigate and propose patches, it will be greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants