Skip to content

Commit

Permalink
use --no-xorg feature of optirun (development branch)
Browse files Browse the repository at this point in the history
  • Loading branch information
zkf committed Apr 13, 2013
1 parent 847d012 commit e1efdf6
Showing 1 changed file with 3 additions and 32 deletions.
35 changes: 3 additions & 32 deletions exx
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
#!/usr/bin/env zsh
#
## TODO: avoid using sudo, by leveraging bumblebeed / bbswitch:
# zmodload zsh/net/socket
# zsocket /run/bumblebee.socket -d 3
## turn ON card and load module
# echo -n "C" >&3
## turn OFF card and unload module
# echo -n "D" >&3
#
## Modify start_secondary so that it does not start X.


INTERNAL=false

Expand All @@ -27,27 +16,9 @@ then
xinit $BIN $@ -- /usr/lib/systemd/systemd-multi-seat-x :1 -ac \
-nolisten tcp &> /dev/null
else
if [[ -z $(lsmod | grep nvidia) ]]
then
echo "==> Nvidia driver is not loaded."
echo "==> Loading driver."
sudo modprobe nvidia
fi

if [[ -z $(grep ON /proc/acpi/bbswitch) ]]
then
echo "==> External video card is not enabled."
echo "==> Enabling external video card."
sudo tee /proc/acpi/bbswitch <<< ON
fi
# typeset REPLY
# zmodload zsh/net/socket
# zsocket -d 5 /run/bumblebee.socket
# echo -n "F" >&5 && read -u5 && print $REPLY

export LD_LIBRARY_PATH=/usr/lib/nvidia:/usr/lib32/nvidia:
xinit $BIN $@ -- /usr/lib/systemd/systemd-multi-seat-x :1 -ac \
-config xorg.conf.nvidia.separate-x -nolisten tcp -sharevts -novtswitch
optirun --no-xorg xinit $BIN $@ -- /usr/lib/systemd/systemd-multi-seat-x \
:1 -ac -config xorg.conf.nvidia.separate-x -nolisten tcp -sharevts \
-novtswitch
# sleep 1
# DISPLAY=:1 xset -dpms
# DISPLAY=:1 xset s off
Expand Down

0 comments on commit e1efdf6

Please sign in to comment.