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

[graphic_drivers] update nvidia profiles

parent 395ff6da
......@@ -2,9 +2,9 @@
NAME="video-hybrid-intel-nvidia-340xx-bumblebee"
INFO="Hybrid bumblebee solution for NVIDIA Optimus Technology - Closed source NVIDIA legacy driver & open source intel driver."
VERSION="2019.08.23"
VERSION="2019.08.24"
FREEDRIVER="false"
PRIORITY="7"
PRIORITY="8"
# NVIDIA cards
CLASSIDS="0300 0302"
......
# mhwd Driver Config
NAME="video-hybrid-intel-nvidia-418xx-bumblebee"
INFO="Hybrid bumblebee solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver."
VERSION="2019.08.24"
FREEDRIVER="false"
PRIORITY="9"
# NVIDIA cards
CLASSIDS="0300 0302"
VENDORIDS="10de"
DEVICEIDS=">/var/lib/mhwd/ids/pci/nvidia-418xx.ids"
# Intel cards
CLASSIDS="0300"
VENDORIDS="8086"
DEVICEIDS="*"
BLACKLISTEDDEVICEIDS="0be1 8108"
# Conflicts with other mhwd configs
MHWDCONFLICTS="video-intel video-nvidia-435xx video-nvidia-430xx video-nvidia-418xx video-nvidia-390xx video-nvidia-340xx video-hybrid-intel-nvidia-430xx-bumblebee video-hybrid-intel-nvidia-390xx-bumblebee video-hybrid-intel-nvidia-340xx-bumblebee video-hybrid-intel-nouveau-bumblebee"
# Dependencies
DEPENDS="bumblebee nvidia-418xx-utils xf86-video-intel"
[[ -d /run/openrc ]] && DEPENDS="bumblebee-openrc nvidia-utils xf86-video-intel"
DEPENDS_64="lib32-primus lib32-nvidia-418xx-utils"
DEPKMOD="nvidia-418xx 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 nvidia" >> "${MODULESBLACKLIST}"
echo "blacklist nvidia-modeset" >> "${MODULESBLACKLIST}"
echo "blacklist nvidia-uvm" >> "${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 nvidia
rmmod -f nvidia-modeset
rmmod -f nvidia-uvm
rmmod -f ttm
rmmod -f drm_kms_helper
rmmod -f drm
fi
modprobe bbswitch
set_bumblebee_driver "nvidia"
mhwd-gpu --setxorg "${XORGFILE}"
if [[ -d /run/openrc ]];then
rc-update add bumblebee default
rc-service bumblebee start
else
systemctl enable bumblebeed.service
systemctl start bumblebeed.service
fi
}
pre_remove()
{
modprobe -r bbswitch
if [[ -d /run/openrc ]];then
rc-update del bumblebee default
rc-service bumblebee stop
else
systemctl disable bumblebeed.service
systemctl stop bumblebeed.service
fi
}
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,9 +2,9 @@
NAME="video-hybrid-intel-nvidia-430xx-bumblebee"
INFO="Hybrid bumblebee solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver."
VERSION="2019.08.23"
VERSION="2019.08.24"
FREEDRIVER="false"
PRIORITY="9"
PRIORITY="10"
# NVIDIA cards
CLASSIDS="0300 0302"
......@@ -21,10 +21,10 @@ BLACKLISTEDDEVICEIDS="0be1 8108"
MHWDCONFLICTS="video-intel video-nvidia-435xx video-nvidia-430xx video-nvidia-418xx video-nvidia-390xx video-nvidia-340xx video-hybrid-intel-nvidia-418xx-bumblebee video-hybrid-intel-nvidia-390xx-bumblebee video-hybrid-intel-nvidia-340xx-bumblebee video-hybrid-intel-nouveau-bumblebee"
# Dependencies
DEPENDS="bumblebee nvidia-utils xf86-video-intel"
DEPENDS="bumblebee nvidia-430xx-utils xf86-video-intel"
[[ -d /run/openrc ]] && DEPENDS="bumblebee-openrc nvidia-utils xf86-video-intel"
DEPENDS_64="lib32-primus lib32-nvidia-utils"
DEPKMOD="nvidia bbswitch"
DEPENDS_64="lib32-primus lib32-nvidia-430xx-utils"
DEPKMOD="nvidia-430xx bbswitch"
XORGFILE="/etc/X11/mhwd.d/intel.conf"
BXORGFILE="/etc/bumblebee/xorg.conf.nvidia"
......
......@@ -4,7 +4,7 @@ NAME="video-nvidia-418xx"
INFO="Closed source NVIDIA drivers for linux."
VERSION="2019.08.24"
FREEDRIVER="false"
PRIORITY="6"
PRIORITY="5"
CLASSIDS="0300 0302"
VENDORIDS="10de"
......
......@@ -4,7 +4,7 @@ NAME="video-nvidia-435xx"
INFO="Closed source NVIDIA drivers for linux."
VERSION="2019.08.24"
FREEDRIVER="false"
PRIORITY="6"
PRIORITY="7"
CLASSIDS="0300 0302"
VENDORIDS="10de"
......
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