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

Driver breaks suspend and hibernate (without being open) #98

Open ghost opened 8 years ago

ghost commented 8 years ago

Hello there,

I am not sure if anyone else has the same issue but installing the driver completely breaks the hibernation and suspend routines. I am using a late 2015 MacBook Pro with Arch Linux (Gnome) and installed the driver using the AUR package.

The driver works perfectly fine, I tested it in Cheese and it does load up. The problem is that just by having the driver installed on my machine (without any apps using the camera running) it prevents me from suspending or hibernating. Once I suspend or hibernate the computer can never resume properly. The screen lights up for a second but GDM never shows up.

Is this a known issue? Is there a way around it?

I am sure the problem arises because of the driver since once I uninstall it, I can successfully suspend and hibernate once again.

grahamc commented 8 years ago

To avoid the problem all together, we unload it before hibernate / suspend on NixOS and load it again on resume.

Check out the PowerManagement code blocks here: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/hardware/video/webcam/facetimehd.nix On Thu, Sep 22, 2016 at 9:56 AM Jason Materson notifications@github.com wrote:

Hello there,

I am not sure if anyone else has the same issue but installing the driver completely breaks the hibernation and suspend routines. I am using a late 2015 MacBook Pro with Arch Linux (Gnome) and installed the driver using the AUR package.

The driver works perfectly fine, I tested it in Cheese and it does load up. The problem is that just by having the driver installed on my machine (not running) it prevents me from suspending or hibernating. Once I suspend or hibernate the computer can never resume properly. The screen lights up for a second but GDM never shows up.

Is this a known issue? Is there a way around it?

I am sure the problem arises because of the driver since once I uninstall it, I can successfully suspend and hibernate once again.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/patjak/bcwc_pcie/issues/98, or mute the thread https://github.com/notifications/unsubscribe-auth/AAErrJaPPdyyZGEsjm8-AoLGEmi6ji71ks5qsokAgaJpZM4KD683 .

grahamc commented 8 years ago

(Note that because of this forced unloading I have no idea if I have the same problem.) On Thu, Sep 22, 2016 at 10:42 AM Graham Christensen graham@grahamc.com wrote:

To avoid the problem all together, we unload it before hibernate / suspend on NixOS and load it again on resume.

Check out the PowerManagement code blocks here: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/hardware/video/webcam/facetimehd.nix On Thu, Sep 22, 2016 at 9:56 AM Jason Materson notifications@github.com wrote:

Hello there,

I am not sure if anyone else has the same issue but installing the driver completely breaks the hibernation and suspend routines. I am using a late 2015 MacBook Pro with Arch Linux (Gnome) and installed the driver using the AUR package.

The driver works perfectly fine, I tested it in Cheese and it does load up. The problem is that just by having the driver installed on my machine (not running) it prevents me from suspending or hibernating. Once I suspend or hibernate the computer can never resume properly. The screen lights up for a second but GDM never shows up.

Is this a known issue? Is there a way around it?

I am sure the problem arises because of the driver since once I uninstall it, I can successfully suspend and hibernate once again.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/patjak/bcwc_pcie/issues/98, or mute the thread https://github.com/notifications/unsubscribe-auth/AAErrJaPPdyyZGEsjm8-AoLGEmi6ji71ks5qsokAgaJpZM4KD683 .

ghost commented 8 years ago

I tried running modprobe -r facetimehd before hibernating/suspending but it does not seem to affect anything. Is there a way to simply enable/disable it on demand? They only way of achieving this now seems to be uninstalling the driver and rebooting. I guess I may have to build it from source...

patjak commented 8 years ago

I will have to find a proper fix for suspend/resume. The current solution is a hack and far from optimal. It's also interesting that modprobe -r doesn't work. That might indicate that we're not restoring the device to a proper state when unloading. Will investigate.

patjak commented 8 years ago

btw, having the device open (even without streaming) when suspending will crash so all applications that are using the camera must be closed. Working on a fix...