Skip to content
This repository was archived by the owner on Nov 8, 2017. It is now read-only.

Commit 9c935d7

Browse files
committed
Added experimnetal nouveau support.
Right now it's just PoC and not suitable for daily use. Also nouveau lacks support of modern cards and most of GTX 400/500 won't work. Bumped version number.
1 parent 1a56e48 commit 9c935d7

File tree

13 files changed

+107
-17
lines changed

13 files changed

+107
-17
lines changed

INSTALL

+9
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Unfortunately, I can provide limited support for them.
99
Also it's strongly recommended to run 'git submodule init' before starting the
1010
installation process.
1111

12+
1213
MANUAL INSTALLATION
1314

1415
1) Install proprietary nVidia graphics driver in distro's preferred way (under
@@ -74,6 +75,14 @@ variants (tested only with KDE right now), but it's up to you to find which is
7475
working with your DE.
7576

7677

78+
MODULE OPTION
79+
80+
Originally debumblebee supported only closed source nVidia module. But starting
81+
from version 0.6 nouveau support was added. Still it's very experimental and not
82+
suitable for daily use as nouveau lacks support of modern hardware. So right now
83+
this is just PoC which might be extended later.
84+
85+
7786
POWERSAVE OPTION
7887

7988
There is POWER_SAVE option in configuration file. If you set it to "yes", than

README

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ This project allows you to utilize nVidia graphics card with proprietary driver
2525
while running main desktop on Intel card. This service is only for Intel/nVidia
2626
combination, it won't work with Intel/ATI or any other combination.
2727

28+
Also it provides experimental support of nouveau module, but main goal is still
29+
support of proprietary driver.
30+
2831
debumblebee is combination of additional X server for nVidia graphics card and
2932
VirtualGL package which allows to access nVidia X server screen from Intel X
3033
server screen with full OpenGL support.

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.5
1+
0.6

install-files/contrib/power_off_on/K53SJ/disablecard

+9-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
# This script should contain the command(s) necessary to switch off the nVidia card.
44

5+
if [ -r /etc/default/debumblebee ]; then
6+
. /etc/default/debumblebee
7+
else
8+
MODULE=nvidia
9+
fi
10+
511
acpi_call () {
612
echo "$*" > /proc/acpi/call
713
result=$(cat /proc/acpi/call)
@@ -25,10 +31,10 @@ acpi_call () {
2531
esac
2632
}
2733

28-
rmmod nvidia
34+
rmmod $MODULE
2935

30-
if lsmod | grep -q nvidia; then
31-
echo "Error: could not unload nvidia module, leaving card turned on." 1>&2
36+
if lsmod | grep -q $MODULE; then
37+
echo "Error: could not unload $MODULE module, leaving card turned on." 1>&2
3238
exit 1
3339
fi
3440

install-files/contrib/power_off_on/K53SJ/enablecard

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
# This script should contain the command(s) necessary to switch on the nVidia card.
44

5+
if [ -r /etc/default/debumblebee ]; then
6+
. /etc/default/debumblebee
7+
else
8+
MODULE=nvidia
9+
fi
10+
511
acpi_call () {
612
echo "$*" > /proc/acpi/call
713
result=$(cat /proc/acpi/call)
@@ -23,9 +29,9 @@ fi
2329
# This one works only for ASUS K53SJ.
2430
acpi_call "\_SB.PCI0.PEGR.GFX0._PS0"
2531

26-
modprobe nvidia
32+
modprobe $MODULE
2733

28-
if lsmod | grep -q nvidia; then
34+
if lsmod | grep -q $MODULE; then
2935
echo "Enabling nVidia card succeded."
3036
exit 0
3137
else

install-files/contrib/power_off_on/XPS_L501X__/disablecard

+9-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
# This script should contain the command(s) necessary to switch off the nVidia card.
44

5+
if [ -r /etc/default/debumblebee ]; then
6+
. /etc/default/debumblebee
7+
else
8+
MODULE=nvidia
9+
fi
10+
511
acpi_call () {
612
echo "$*" > /proc/acpi/call
713
result=$(cat /proc/acpi/call)
@@ -25,10 +31,10 @@ acpi_call () {
2531
esac
2632
}
2733

28-
rmmod nvidia
34+
rmmod $MODULE
2935

30-
if lsmod | grep -q nvidia; then
31-
echo "Error: could not unload nvidia module, leaving card turned on." 1>&2
36+
if lsmod | grep -q $MODULE; then
37+
echo "Error: could not unload $MODULE module, leaving card turned on." 1>&2
3238
exit 1
3339
fi
3440

install-files/contrib/power_off_on/XPS_L501X__/enablecard

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
# This script should contain the command(s) necessary to switch on the nVidia card.
44

5+
if [ -r /etc/default/debumblebee ]; then
6+
. /etc/default/debumblebee
7+
else
8+
MODULE=nvidia
9+
fi
10+
511
acpi_call () {
612
echo "$*" > /proc/acpi/call
713
result=$(cat /proc/acpi/call)
@@ -23,9 +29,9 @@ fi
2329
# This one works only for Dell XPS L501X.
2430
acpi_call "\_SB.PCI0.P0P2.PEGP._PS0"
2531

26-
modprobe nvidia
32+
modprobe $MODULE
2733

28-
if lsmod | grep -q nvidia; then
34+
if lsmod | grep -q $MODULE; then
2935
echo "Enabling nVidia card succeded."
3036
exit 0
3137
else

install-files/debian.install

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ echo "\nInstalling required packages."
77
# Here we are installing standard nVidia package, which provides everything we need to make nVidia card running.
88
# sudo is needed for ON_DEMAND option, dmidecode is required for autodetecting ConnectedMonitor option on some laptops.
99
apt-get update
10-
apt-get -y install nvidia-kernel-dkms sudo dmidecode dpkg-dev
10+
apt-get -y install nvidia-kernel-dkms libgl1-mesa-dri-experimental sudo dmidecode dpkg-dev
1111
if [ $? -ne 0 ]; then
1212
echo "\nPackage manager failed to install nvidia packages." 1>&2
1313
echo "Please check that you have non-free repository enabled." 1>&2
@@ -38,7 +38,7 @@ rm -f /tmp/VirtualGL_*.deb
3838

3939
echo "\nInstalling and configuring support files."
4040

41-
cp debian/xorg.conf.nvidia /etc/X11/
41+
cp debian/xorg.conf.* /etc/X11/
4242
cp debian/debumblebee /etc/init.d/debumblebee
4343
cp debian/debumblebee.default /etc/default/debumblebee
4444
cp debian/debumblebee.sudoers /etc/sudoers.d/debumblebee

install-files/debian.uninstall

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ rm -f /etc/default/debumblebee
1616
rm -f /etc/sudoers.d/debumblebee
1717
rm -f /etc/bash_completion.d/optirun
1818
rm -f /etc/X11/xorg.conf.nvidia
19+
rm -f /etc/X11/xorg.conf.nouveau
1920
rm -f /usr/local/bin/optirun*
2021
rm -f /usr/local/bin/*ablecard
2122
rm -rf /usr/local/lib/debumblebee

install-files/debian/debumblebee

+10-2
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,25 @@
1717
if [ -r /etc/default/debumblebee ]; then
1818
. /etc/default/debumblebee
1919
else
20+
MODULE=nvidia
2021
VGL_DISPLAY=:8
2122
fi
2223

2324
PATH=/sbin:/usr/local/sbin:/usr/sbin:/bin:/usr/local/bin:/usr/bin
24-
LD_LIBRARY_PATH=/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`/nvidia
2525
DESC="Optimus X server"
2626
NAME=debumblebee
2727
DAEMON=/usr/bin/X
28-
DAEMON_ARGS="-config /etc/X11/xorg.conf.nvidia -modulepath /usr/local/lib/debumblebee,/usr/lib/xorg/modules -sharevts $VGL_DISPLAY"
2928
PIDFILE=/tmp/.X${VGL_DISPLAY#?}-lock
3029
SCRIPTNAME=/etc/init.d/$NAME
30+
if [ $MODULE = nvidia ]; then
31+
LD_LIBRARY_PATH=/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`/nvidia
32+
DAEMON_ARGS="-config /etc/X11/xorg.conf.nvidia -modulepath /usr/local/lib/debumblebee,/usr/lib/xorg/modules -sharevts $VGL_DISPLAY"
33+
elif [ $MODULE = nouveau ]; then
34+
DAEMON_ARGS="-config /etc/X11/xorg.conf.nouveau -sharevts $VGL_DISPLAY"
35+
else
36+
echo "Error: unknown MODULE option." 1>&2
37+
exit 1
38+
fi
3139

3240
. /lib/lsb/init-functions
3341

install-files/debian/debumblebee.default

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Select module which will be used with nVidia card.
2+
# Default variant is 'nvidia' which is closed source and gives more perfomance.
3+
# Another possible option is open source 'nouveau', but it's slower.
4+
MODULE=nvidia
5+
16
# Do not run nVidia X server constantly and start it only when needed.
27
# Enabled by default.
38
ON_DEMAND=yes

install-files/debian/optirun

+14-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,27 @@ fi
1111
# Default options.
1212
OPT_VERBOSE=$VERBOSE
1313
OPT_HELP=false
14-
OPT_LIB=/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`/nvidia
14+
if [ $MODULE = nvidia ]; then
15+
OPT_LIB=/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`/nvidia
16+
elif [ $MODULE = nouveau ]; then
17+
OPT_LIB=/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`
18+
else
19+
echo "Error: unknown MODULE option." 2>&1
20+
fi
1521

1622
# Parsing command line.
1723
if [ $# -eq 0 ]; then
1824
OPT_HELP=true
1925
else
2026
while [ $# -gt 0 ]; do
2127
case "$1" in
22-
-3|-32|--32) OPT_LIB=/usr/lib32/nvidia ;;
28+
-3|-32|--32)
29+
if [ $MODULE = nvidia ]; then
30+
OPT_LIB=/usr/lib32/nvidia
31+
elif [ $MODULE = nouveau ]; then
32+
OPT_LIB=/usr/lib32
33+
fi
34+
;;
2335
-h|-help|--help) OPT_HELP=true ;;
2436
-v|-verbose|--verbose) OPT_VERBOSE=yes ;;
2537
--) shift; break ;;
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Section "Device"
2+
Identifier "Device1"
3+
Driver "nouveau"
4+
BusID "PCI:1:0:0"
5+
EndSection
6+
7+
Section "Screen"
8+
Identifier "Screen1"
9+
Device "Device1"
10+
Monitor "Monitor1"
11+
DefaultDepth 24
12+
SubSection "Display"
13+
Depth 24
14+
Modes "1920x1200" "1920x1080" "1680x1050" "1600x1200" "1440x900" "1366x768" "1280x1024" "1280x800"
15+
EndSubSection
16+
EndSection
17+
18+
Section "Monitor"
19+
Identifier "Monitor1"
20+
Modeline "1920x1200" 193.25 1920 2056 2256 2592 1200 1203 1209 1245 -hsync +vsync
21+
Modeline "1920x1080" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
22+
Modeline "1680x1050" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
23+
Modeline "1600x1200" 161.00 1600 1712 1880 2160 1200 1203 1207 1245 -hsync +vsync
24+
Modeline "1440x900" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync
25+
Modeline "1366x768" 71.80 1366 1414 1446 1526 768 771 777 784 -hsync -vsync
26+
Modeline "1280x1024" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
27+
Modeline "1280x800" 83.50 1280 1352 1480 1680 800 803 809 831 -hsync +vsync
28+
EndSection

0 commit comments

Comments
 (0)