Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

NEVER disable the card if X is running!

- add some redundancy - enable the card if it wasn't enabled yet

- Never disable the card if X failed to stop! We'd better not break the system
  and use a few watt more
  • Loading branch information...
commit 5b02bf2b51786622d42b26a6df9caeb02a90d352 1 parent 7e9824d
@Lekensteyn Lekensteyn authored
Showing with 15 additions and 6 deletions.
  1. +15 −6 install-files/optirun.ubuntu
View
21 install-files/optirun.ubuntu
@@ -131,6 +131,14 @@ optirun_launcher() {
exit 1
fi
fi
+ # If for some reason the card is still disabled, enable it. This should
+ # never happen though!
+ if lspci -v -s $NVIDIABUSID | grep -q !; then
+ if [ -x /usr/local/bin/bumblebee-enablecard ]; then
+ echo "Something strange is going on. The card was still disabled even though X started without issues. Please report this"
+ sudo /usr/local/bin/bumblebee-enablecard
+ fi
+ fi
trap "echo 'Caught Ctrl+C'" INT
@@ -158,12 +166,13 @@ optirun_launcher() {
if ! lspci -v -s $NVIDIABUSID | grep -q !; then
sudo /etc/init.d/bumblebee disable
fi
- # are you sure? disable the card even if X could not be stopped? Needs rethinking
- if ! spci -v -s $NVIDIABUSID | -1 grep !; then
- if [ -x /usr/local/bin/bumblebee-disablecard ]; then
- sudo /usr/local/bin/bumblebee-disablecard
- fi
- fi
+ # BAD idea, do not disable the card if X is running! Trust me. Better
+ # keep it running than breaking the system.
+ #if ! lspci -v -s $NVIDIABUSID | -1 grep !; then
+ # if [ -x /usr/local/bin/bumblebee-disablecard ]; then
+ # sudo /usr/local/bin/bumblebee-disablecard
+ # fi
+ #fi
fi
}
Please sign in to comment.
Something went wrong with that request. Please try again.