Commit ec80fff5 authored by Roland Singer's avatar Roland Singer

added bumblebee configs for nvidia and nouveau

parent 0efb519c
Maintainers:
Roland Singer <roland@manjaro.org>
Clittle <philm@manjaro.org>
# mhwd Driver Config
NAME="video-hybrid-intel-nouveau-bumblebee"
INFO="Hybrid bumblebee solution for NVIDIA Optimus Technology - Open source nouveau & intel video driver."
VERSION="2012.25.06"
FREEDRIVER="true"
PRIORITY="5"
# NVIDIA cards
CLASSIDS="0300"
VENDORIDS="10de"
DEVICEIDS="*"
# Intel cards
CLASSIDS="0300"
VENDORIDS="8086"
DEVICEIDS="*"
# Conflicts with other mhwd configs
MHWDCONFLICTS="video-intel video-nouveau video-hybrid-intel-nvidia-bumblebee"
# Dependencies
DEPENDS="bumblebee virtualgl bbswitch xf86-video-nouveau nouveau-dri xf86-video-intel intel-dri"
DEPENDS_64="lib32-virtualgl lib32-nouveau-dri lib32-intel-dri"
XORGFILE="/etc/X11/mhwd.d/intel.conf"
MODULESFILE="/etc/modules-load.d/mhwd-bbswitch.conf"
post_install()
{
MHWD_HEADING "${XORGFILE}"
MHWD_ADD_DEVICE_SECTION "intel" "${XORGFILE}"
MHWD_ADD_DRI "${XORGFILE}"
MHWD_ADD_COMPOSITING "${XORGFILE}"
MHWD_ADD_BACKSPACE "${XORGFILE}"
MHWD_HEADING "${MODULESFILE}"
echo "options bbswitch load_state=0 unload_state=0" >> "${MODULESFILE}"
modprobe bbswitch
set_bumblebee_driver "nouveau"
mhwd-gpu --setgl mesa --setxorg "${XORGFILE}"
systemctl enable bumblebeed.service
systemctl start bumblebeed.service
}
pre_remove()
{
modprobe -r bbswitch
systemctl disable bumblebeed.service
systemctl stop bumblebeed.service
}
post_remove()
{
if [ -e "${XORGFILE}" ]; then
rm "${XORGFILE}"
fi
if [ -e "${MODULESFILE}" ]; then
rm "${MODULESFILE}"
fi
mhwd-gpu --check
}
set_bumblebee_driver()
{
sed -i "/(#)/!s/^[ ]*Driver[ ]*=.*/Driver=$1/g" /etc/bumblebee/bumblebee.conf
}
# mhwd Driver Config
NAME="video-hybrid-intel-nvidia-bumblebee"
INFO="Hybrid bumblebee solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver."
VERSION="2012.25.06"
FREEDRIVER="false"
PRIORITY="6"
# NVIDIA cards
CLASSIDS="0300"
VENDORIDS="10de"
DEVICEIDS=">/var/lib/mhwd/ids/pci/nvidia.ids"
# Intel cards
CLASSIDS="0300"
VENDORIDS="8086"
DEVICEIDS="*"
# Conflicts with other mhwd configs
MHWDCONFLICTS="video-intel video-nvidia video-hybrid-intel-nouveau-bumblebee"
# Dependencies
DEPENDS="bumblebee virtualgl bbswitch nvidia nvidia-utils xf86-video-intel intel-dri"
DEPENDS_64="lib32-virtualgl lib32-nvidia-utils lib32-intel-dri"
XORGFILE="/etc/X11/mhwd.d/intel.conf"
MODULESFILE="/etc/modules-load.d/mhwd-bbswitch.conf"
post_install()
{
MHWD_HEADING "${XORGFILE}"
MHWD_ADD_DEVICE_SECTION "intel" "${XORGFILE}"
MHWD_ADD_DRI "${XORGFILE}"
MHWD_ADD_COMPOSITING "${XORGFILE}"
MHWD_ADD_BACKSPACE "${XORGFILE}"
MHWD_HEADING "${MODULESFILE}"
echo "options bbswitch load_state=0 unload_state=0" >> "${MODULESFILE}"
modprobe bbswitch
set_bumblebee_driver "nvidia"
mhwd-gpu --setgl mesa --setxorg "${XORGFILE}"
systemctl enable bumblebeed.service
systemctl start bumblebeed.service
}
pre_remove()
{
modprobe -r bbswitch
systemctl disable bumblebeed.service
systemctl stop bumblebeed.service
}
post_remove()
{
if [ -e "${XORGFILE}" ]; then
rm "${XORGFILE}"
fi
if [ -e "${MODULESFILE}" ]; then
rm "${MODULESFILE}"
fi
mhwd-gpu --check
}
set_bumblebee_driver()
{
sed -i "/(#)/!s/^[ ]*Driver[ ]*=.*/Driver=$1/g" /etc/bumblebee/bumblebee.conf
}
......@@ -10,6 +10,9 @@ CLASSIDS="0300"
VENDORIDS="10de"
DEVICEIDS=">/var/lib/mhwd/ids/pci/nvidia.ids"
# Conflicts with other mhwd configs
MHWDCONFLICTS="video-hybrid-intel-nvidia-bumblebee"
# Dependencies
DEPENDS="nvidia nvidia-utils"
DEPENDS_64="lib32-nvidia-utils"
......
......@@ -45,9 +45,7 @@ post_install()
echo "" >> "${VBOXSCRIPT}"
echo "/usr/bin/VBoxClient-all &" >> "${VBOXSCRIPT}"
MHWD_LOAD_MODULE vboxguest
MHWD_LOAD_MODULE vboxsf
MHWD_LOAD_MODULE vboxvideo
modprobe vboxguest vboxsf vboxvideo
mhwd-gpu --setgl mesa --setxorg "${XORGFILE}"
}
......
......@@ -10,6 +10,9 @@ CLASSIDS="0300"
VENDORIDS="8086"
DEVICEIDS="*"
# Conflicts with other mhwd configs
MHWDCONFLICTS="video-hybrid-intel-nvidia-bumblebee video-hybrid-intel-nouveau-bumblebee"
# Dependencies
DEPENDS="xf86-video-intel intel-dri"
DEPENDS_64="lib32-intel-dri"
......
......@@ -10,6 +10,9 @@ CLASSIDS="0300"
VENDORIDS="10de"
DEVICEIDS="*"
# Conflicts with other mhwd configs
MHWDCONFLICTS="video-hybrid-intel-nouveau-bumblebee"
# Dependencies
DEPENDS="xf86-video-nouveau nouveau-dri"
DEPENDS_64="lib32-nouveau-dri"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment