Commit f4961870 authored by Philip Müller's avatar Philip Müller

add BLACKLISTEDVIDS

parent b90bb84a
......@@ -2,7 +2,7 @@
NAME="video-hybrid-intel-nouveau-bumblebee"
INFO="Hybrid bumblebee solution for NVIDIA Optimus Technology - Open source nouveau & intel video driver."
VERSION="2013.01.06"
VERSION="2013.01.12"
FREEDRIVER="true"
PRIORITY="5"
......@@ -15,7 +15,7 @@ DEVICEIDS="*"
CLASSIDS="0300"
VENDORIDS="8086"
DEVICEIDS="*"
BLACKLISTEDDEVICEIDS="0be1 8108"
# Conflicts with other mhwd configs
MHWDCONFLICTS="video-intel video-nouveau video-hybrid-intel-nvidia-bumblebee"
......
......@@ -2,9 +2,9 @@
NAME="video-hybrid-intel-nvidia-bumblebee"
INFO="Hybrid bumblebee solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver."
VERSION="2013.01.06"
VERSION="2013.01.12"
FREEDRIVER="false"
PRIORITY="7"
PRIORITY="6"
# NVIDIA cards
CLASSIDS="0300"
......@@ -15,10 +15,10 @@ DEVICEIDS=">/var/lib/mhwd/ids/pci/nvidia.ids"
CLASSIDS="0300"
VENDORIDS="8086"
DEVICEIDS="*"
BLACKLISTEDDEVICEIDS="0be1 8108"
# Conflicts with other mhwd configs
MHWDCONFLICTS="video-intel video-nvidia video-nvidia-legacy video-hybrid-intel-nouveau-bumblebee video-hybrid-intel-nvidia-legacy-bumblebee"
MHWDCONFLICTS="video-intel video-nvidia video-nvidia-legacy video-hybrid-intel-nouveau-bumblebee"
# Dependencies
......
# mhwd Driver Config
NAME="video-hybrid-intel-nvidia-legacy-bumblebee"
INFO="Hybrid bumblebee solution for NVIDIA Optimus Technology - Closed source NVIDIA legacy driver & open source intel driver."
VERSION="2013.01.06"
FREEDRIVER="false"
PRIORITY="6"
# NVIDIA cards
CLASSIDS="0300"
VENDORIDS="10de"
DEVICEIDS=">/var/lib/mhwd/ids/pci/nvidia-legacy.ids"
# Intel cards
CLASSIDS="0300"
VENDORIDS="8086"
DEVICEIDS="*"
# Conflicts with other mhwd configs
MHWDCONFLICTS="video-intel video-nvidia video-nvidia-legacy video-hybrid-intel-nouveau-bumblebee video-hybrid-intel-nvidia-bumblebee"
# Dependencies
DEPENDS="bumblebee virtualgl nvidia-legacy-utils xf86-video-intel intel-dri"
DEPENDS_64="lib32-virtualgl lib32-nvidia-legacy-utils lib32-intel-dri"
DEPKMOD="nvidia-legacy bbswitch"
XORGFILE="/etc/X11/mhwd.d/intel.conf"
BXORGFILE="/etc/bumblebee/xorg.conf.nvidia"
MODULESFILE="/etc/modprobe.d/mhwd-bbswitch.conf"
MODULESBLACKLIST="/etc/modprobe.d/mhwd-nvidia.conf"
make_bumblebee_xorg_config()
{
MHWD_HEADING "${BXORGFILE}"
echo 'Section "ServerLayout"' >> "${BXORGFILE}"
echo ' Identifier "Layout0"' >> "${BXORGFILE}"
echo ' Option "AutoAddDevices" "false"' >> "${BXORGFILE}"
echo 'EndSection' >> "${BXORGFILE}"
echo '' >> "${BXORGFILE}"
MHWD_ADD_DEVICE_SECTION_FOR_EACH_BUSID "nvidia" "${BXORGFILE}" 10de "VendorName \"NVIDIA Corporation\"|Option \"NoLogo\" \"true\"|Option \"UseEDID\" \"false\"|Option \"ConnectedMonitor\" \"DFP\""
}
post_install()
{
# Create intel xorg configuration with enabled sna acceleration method
MHWD_HEADING "${XORGFILE}"
MHWD_ADD_DEVICE_SECTION_FOR_EACH_BUSID "intel" "${XORGFILE}" 8086 "Option \"AccelMethod\" \"sna\""
MHWD_ADD_DRI "${XORGFILE}"
MHWD_ADD_COMPOSITING "${XORGFILE}"
MHWD_ADD_BACKSPACE "${XORGFILE}"
# Create nvidia bumblebee xorg configuration
make_bumblebee_xorg_config
MHWD_HEADING "${MODULESFILE}"
echo "options bbswitch load_state=0 unload_state=0" >> "${MODULESFILE}"
MHWD_HEADING "${MODULESBLACKLIST}"
echo "blacklist nouveau" >> "${MODULESBLACKLIST}"
echo "blacklist ttm" >> "${MODULESBLACKLIST}"
echo "blacklist drm_kms_helper" >> "${MODULESBLACKLIST}"
echo "blacklist drm" >> "${MODULESBLACKLIST}"
# Unload modules if X is not running
if [ ! "$(pgrep X)" ]; then
rmmod -f nouveau
rmmod -f ttm
rmmod -f drm_kms_helper
rmmod -f drm
fi
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
if [ -e "${MODULESBLACKLIST}" ]; then
rm "${MODULESBLACKLIST}"
fi
mhwd-gpu --check
}
set_bumblebee_driver()
{
sed -i "/(#)/!s/^[ ]*Driver[ ]*=.*/Driver=$1/g" /etc/bumblebee/bumblebee.conf
}
......@@ -2,13 +2,14 @@
NAME="video-intel"
INFO="X.org intel video driver. Standard open source driver for intel graphic cards."
VERSION="2012.09.18"
VERSION="2013.01.12"
FREEDRIVER="true"
PRIORITY="2"
CLASSIDS="0300"
VENDORIDS="8086"
DEVICEIDS="*"
BLACKLISTEDDEVICEIDS="0be1 8108"
# Conflicts with other mhwd configs
MHWDCONFLICTS="video-hybrid-intel-nvidia-bumblebee video-hybrid-intel-nouveau-bumblebee"
......
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