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

Using camera after suspend makes the computer crash #37

Closed
hpe009 opened this issue Dec 28, 2015 · 17 comments
Closed

Using camera after suspend makes the computer crash #37

hpe009 opened this issue Dec 28, 2015 · 17 comments

Comments

@hpe009
Copy link

hpe009 commented Dec 28, 2015

On Ubuntu using camera after suspend freezes the computer

@edsiper
Copy link

edsiper commented Dec 28, 2015

I'd assume this it's an expected behavior, the power management routines are not yet implemented:

https://github.com/patjak/bcwc_pcie/blob/master/fthd_drv.c#L520

@hpe009
Copy link
Author

hpe009 commented Dec 28, 2015

@edsiper Any way to go around this?

@edsiper
Copy link

edsiper commented Dec 28, 2015

do not suspend ? :)

@WhyNotHugo
Copy link
Contributor

Probably unloading the module before suspending should prevent this too.

@hpe009
Copy link
Author

hpe009 commented Dec 28, 2015

@hobarrera Can you tell me how to do that? I have tried but I do not think I have done it right

@slashrsm
Copy link

modprobe -r facetimehd

@hpe009
Copy link
Author

hpe009 commented Dec 28, 2015

Any way I can put this in a script so that it launches the commands before sleep : modprobe -r facetimehd.
And on resume: modprobe -r bdc_pci and modprobe facetimehd?
@slashrsm

@wvengen
Copy link

wvengen commented Dec 28, 2015

If you're on Ubuntu (and perhaps Debian), edit /etc/default/acpi-support and add facetimehd to its MODULES variable.

@hpe009
Copy link
Author

hpe009 commented Dec 28, 2015

Solution. DEV @patjak please add to install description as workaround for now:
Create this file: sudo gedit
And paste this and save it to /lib/systemd/system-sleep/ And chmod it after you save it: sudo chmod a+x /lib/systemd/system-sleep/99facetimehd:

#!/bin/sh
case $1/$2 in
pre/)
echo "Going to $2..."
modprobe -r facetimehd
;;
post/
)
echo "Waking up from $2..."
modprobe -r bdc_pci
modprobe facetimehd
modprobe bdc_pci
;;
esac

@patjak
Copy link
Owner

patjak commented Dec 29, 2015

@hpe009 Thanks. Please add that to the wiki. The wiki is open for anyone to edit. Note that modprobe bdc_pci is not needed at post.

@hpe009
Copy link
Author

hpe009 commented Dec 29, 2015

@patjak Will do, added that line jsut in case.

@patjak
Copy link
Owner

patjak commented Dec 29, 2015

@hpe009 Thanks

@patjak patjak closed this as completed Dec 29, 2015
@derjohn
Copy link

derjohn commented Dec 29, 2015

@patjak

For Ubuntu trusty we need:

/etc/pm/sleep.d/99_facetimehd

#!/bin/sh

case $1 in
    resume|thaw)
        logger -t pm 'Loading facetimehd kernel module'
        /sbin/modprobe facetimehd
        ;;
    suspend|hibernate)
        logger -t pm 'Removing facetimehd kernel module'
        /sbin/rmmod facetimehd
        exit 0
        ;;
esac

@wvengen
Copy link

wvengen commented Dec 30, 2015

For Ubuntu we can use existing acpi-support functionality #37 (comment)

@derjohn
Copy link

derjohn commented Dec 30, 2015

@wvengen I did try to do it via /etc/default/acpi-support - setting MODULES. Didn't work for me. I use Linux Mint 17, which is based on trusty.

@hpe009
Copy link
Author

hpe009 commented Dec 30, 2015

@wvengen That does not work I have tried.

@wvengen
Copy link

wvengen commented Jan 8, 2016

@hpe009 thanks for reporting back, strange.
btw, the driver unloads/loads itself now at suspend/resume since b5e3e74

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

7 participants