patjak / facetimehd

Reverse engineered Linux driver for the FacetimeHD (Broadcom 1570) PCIe webcam
GNU General Public License v2.0
1.36k stars 160 forks source link

Macbook wont sleep/hibernate properly when lid closed #239

Open auyer opened 3 years ago

auyer commented 3 years ago

Hi. This module works in respect of having webcam functionality, but it makes hibernation on lid-close hang at least half of the times. What happens if that the monitor light go off, and then back on showing the last image, but in a non-responsive way, not accepting any input besides force shutdown.

I'm willing to help debug this, and can provide any additional information, just tell me what is needed, and how to get it.

Specs:

OS: Manjaro Linux x86_64
Host: MacBookAir7,2 1.0
Kernel: 5.9.9-arch1-1-macbook / also tested with 5.10.6-majaro 
WM: i3
CPU: Intel i5-5250U (4) @ 1.600GHz
GPU: Intel HD Graphics 6000
Memory: 1149MiB / 3834MiB
patjak commented 3 years ago

Hi, the driver doesn't support suspend/hibernation when the camera is running (streaming data). Is the camera on or off when you hibernate?

auyer commented 3 years ago

Its supposed to be. No software actively using it, and with the activity light off.

theotheroracle commented 3 years ago

macboook air late 2012 edition, same issue, although it's not intermittent, it happens every time

theotheroracle commented 3 years ago

journalctl didn't show any helpful information, unsure how else to check logs

alexshpilkin commented 3 years ago

@theotheroracle wrote:

journalctl didn't show any helpful information, unsure how else to check logs

You can also inspect the kernel message ring buffer directly using dmesg(1) (for example, dmesg -w if you want online output, like journalctl -f provides). Normally systemd-journald(8) picks up those messages and you’ll see them in the journalctl(1) output as well, but the full journal is frequently cluttered, so dmesg can be helpful when you want to watch the kernel specifically.

theotheroracle commented 3 years ago

so i suspended it, it froze as expected, and then i rebooted to check the logs, and it doesn't seem like there was any output since before the boot . i did copy the logs that mention facetimehd to a bin here : https://bin.disroot.org/?da9704162eb72a9b#HRR1PZGx8SPPcSzeivsnFArpvYuuUSnzHhs2KtKSpNSF

theotheroracle commented 3 years ago

should note that it's not just when the lid is closed, it happens every time the system suspends . regardless of wether the camera is open or ever has been opened since boot .