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

Macbook wake from sleep (Sonoma) #1301

Open
aastein opened this issue Apr 14, 2024 · 12 comments
Open

Macbook wake from sleep (Sonoma) #1301

aastein opened this issue Apr 14, 2024 · 12 comments

Comments

@aastein
Copy link

aastein commented Apr 14, 2024

sorry if this is a duplicate

Is your feature request related to a problem? Please describe.
A keypress only wakes up a Macbook pro in a limited scenario:

  • Hookup pikvmV3 to macbook pro
  • lock screen
  • hit escape to put computer to sleep. this closes the HDMI output of the macbook
  • On pikvm UI (which now displays , press any key, the HDMI output comes back on and the screen can be viewed in pikvm UI ✅
  • his escape again to put computer to sleep
  • Wait a long time (i have no idea if this is linked to a Mac OS setting or not, either way I think pikvm should handle this case. it happens for me after maybe 10 minutes)
  • On pikvm UI (which now displays , press any key, nothing happens ❌

This is a strange issue. I'm not sure if this is just a Mac OS thing, or if Mac OS somehow knows PiKVM is not a "real keyboard".

When it works:
good

When it doesn't work: (i noticed the keyboard/mouse icons are orange in this case)
bad

Describe the solution you'd like
Make a key press wake up a macbook even after a really long time.

Describe alternatives you've considered
making a physical machine that i can remotely activate that presses a physical keyboard key

Additional context
Add any other context or screenshots about the feature request here.

@mdevaev
Copy link
Member

mdevaev commented Apr 14, 2024

Hello. Please make a simple test with external USB keyboard. Connect it to your macbook and send it to sleep. After a long interval, hit external keyboard (just like with PiKVM) to wake it up. Will it work?

@aastein
Copy link
Author

aastein commented Apr 15, 2024

hi, i dont have a USB keyboard. I figured out that the bad case happens after 30 seconds of inactivity when the computer is locked. If I could configure the mouse jiggle every sub-30 seconds, this would keep the computer locked but never entering the hard-sleep mode.

@aastein
Copy link
Author

aastein commented Apr 15, 2024

I tried making the change in pikvm/kvmd#165

@mdevaev
Copy link
Member

mdevaev commented Apr 15, 2024

I will accept this patch, but I still kindly ask you to get a keyboard for testing, it will help me a lot. I checked Sonoma on my Mac Mini and the wake-up works correctly even after a day.

@aastein
Copy link
Author

aastein commented Apr 16, 2024

got a USB keyboard and did more testing:

  • If I unplug, and plug back in the PiKVM to the laptop (either unplug from laptop OR PiKVM side), the UI keyboard/mouse icons turn from orange to green, and key press & mouse click wakes up the laptop
    • maybe this can be emulated by PiKVM?
  • When both the USB keyboard and PiKVM are connected to the laptop & when PiKVM interactions do not wake up the laptop, the USB keyboard does wake up the laptop.

let me know if there is something else I can do to help

@aastein
Copy link
Author

aastein commented Apr 16, 2024

also, if you dont want to make a release in the next 2 days, do you have steps to install kvmd from source in PiKVM so locally I can get the enhancement?

@mdevaev
Copy link
Member

mdevaev commented Apr 16, 2024

If I unplug, and plug back in the PiKVM to the laptop (either unplug from laptop OR PiKVM side), the UI keyboard/mouse icons turn from orange to green, and key press & mouse click wakes up the laptop
maybe this can be emulated by PiKVM?

On V3 you can use System -> Main USB switch to unplug/plug the USB virtually. Please try it.

When both the USB keyboard and PiKVM are connected to the laptop & when PiKVM interactions do not wake up the laptop, the USB keyboard does wake up the laptop.

Got it. Which Macbook do you have, the exact model? And which USB cable do you use to connect it with PiKVM?

also, if you dont want to make a release in the next 2 days, do you have steps to install kvmd from source in PiKVM so locally I can get the enhancement?

I plan to make it very soon, maybe today or tomorrow.

@aastein
Copy link
Author

aastein commented Apr 16, 2024

On V3 you can use System -> Main USB switch to unplug/plug the USB virtually. Please try it.

that worked! so that fixes the problem enough, thanks

Which Macbook do you have, the exact model?

16-inch Macbook Pro, 2021

Hardware Overview:
  Model Name:	MacBook Pro 
  Model Identifier:	MacBookPro18,2
  Model Number:	Z1500006XHB/A
  Chip:	Apple M1 Max
  Total Number of Cores:	10 (8 performance and 2 efficiency)
  Memory:	32 GB
  System Firmware Version:	10151.101.3
  OS Loader Version:	10151.101.3
  Serial Number (system):	JJ6RWTXRWR
  Hardware UUID:	5DC8CBF2-C488-5811-9ACD-C312EB3A5801
  Provisioning UDID:	00006001-001261D01482801E
  Activation Lock Status:	Disabled

And which USB cable do you use to connect it with PiKVM?

I tested and got the same behavior with 2 different cables:

  • A mystery black USB-C cable with the markings E301195 (something that looks like "UR" but mirrored) AWM STYLE 2725 60°C 30V VW-1 SUPER HIGH SPEED USB Revision 3.1 PAK HENG
  • Apple USB-C cable. I think it came from the box of a 2020 MacBook Pro, like this screenshot
image

@mdevaev
Copy link
Member

mdevaev commented Apr 16, 2024

Can you try Type-C to USB-A cable?

@aastein
Copy link
Author

aastein commented Apr 18, 2024

i can test that next month

@mdevaev
Copy link
Member

mdevaev commented Apr 18, 2024

Okay.

@mattxie02
Copy link

@aastein can you please let me know what kind of USB-C hub you used? Is it just an adapter or a hub?

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

No branches or pull requests

3 participants