Commit 4d1d9c91 authored by Roland Singer's avatar Roland Singer

fixed bumblebee issues and added device bus ids to xorg files

parent fd120107
......@@ -27,19 +27,42 @@ DEPENDS_64="lib32-virtualgl lib32-nouveau-dri lib32-intel-dri"
XORGFILE="/etc/X11/mhwd.d/intel.conf"
BXORGFILE="/etc/bumblebee/xorg.conf.nouveau"
MODULESFILE="/etc/modules-load.d/mhwd-bbswitch.conf"
make_bumblebee_xorg_config()
{
MHWD_HEADING "${BXORGFILE}"
echo 'Section "ServerLayout"' >> "${BXORGFILE}"
echo ' Identifier "Layout0"' >> "${BXORGFILE}"
echo ' Screen "Screen0"' >> "${BXORGFILE}"
echo ' Option "AutoAddDevices" "false"' >> "${BXORGFILE}"
echo 'EndSection' >> "${BXORGFILE}"
echo '' >> "${BXORGFILE}"
MHWD_ADD_DEVICE_SECTION_FOR_EACH_BUSID "nouveau" "${BXORGFILE}" 10de
echo 'Section "Screen"' >> "${BXORGFILE}"
echo ' Identifier "Screen0"' >> "${BXORGFILE}"
echo ' Device "Device0"' >> "${BXORGFILE}"
echo 'EndSection' >> "${BXORGFILE}"
}
post_install()
{
# Create intel xorg configuration with enabled sna acceleration method
MHWD_HEADING "${XORGFILE}"
MHWD_ADD_DEVICE_SECTION "intel" "${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}"
# Enable sna acceleration method
sed -i /'Section "Device"'/,/'EndSection'/s/'EndSection'/"\tOption \"AccelMethod\" \"sna\"\nEndSection"/g "${XORGFILE}"
# Create nouveau bumblebee xorg configuration
make_bumblebee_xorg_config
MHWD_HEADING "${MODULESFILE}"
echo "options bbswitch load_state=0 unload_state=0" >> "${MODULESFILE}"
......
......@@ -27,20 +27,37 @@ DEPENDS_64="lib32-virtualgl lib32-nvidia-utils lib32-intel-dri"
XORGFILE="/etc/X11/mhwd.d/intel.conf"
BXORGFILE="/etc/bumblebee/xorg.conf.nvidia"
MODULESFILE="/etc/modules-load.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 "intel" "${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}"
# Enable sna acceleration method
sed -i /'Section "Device"'/,/'EndSection'/s/'EndSection'/"\tOption \"AccelMethod\" \"sna\"\nEndSection"/g "${XORGFILE}"
# Create nvidia bumblebee xorg configuration
make_bumblebee_xorg_config
MHWD_HEADING "${MODULESFILE}"
echo "options bbswitch load_state=0 unload_state=0" >> "${MODULESFILE}"
......
......@@ -37,7 +37,8 @@ post_install()
# Remove logo
sed -i /'Section "Device"'/,/'EndSection'/s/'EndSection'/"\tOption \"NoLogo\" \"1\"\nEndSection"/g "${XORGFILE}"
# TODO: Pass ids to script and check for devices to fix screen flickering
# Fix screen flickering for some nvidia devices
MHWD_FUNC_ON_MATCH 0300 10de "0400 0401 0402 0403 0407 0409 0425" fix_screen_flickering
mhwd-gpu --setgl nvidia --setxorg "${XORGFILE}"
}
......
......@@ -2,7 +2,7 @@
NAME="video-ati"
INFO="X.org ati video driver. Standard open source driver for AMD graphic cards."
VERSION="2012.06.25"
VERSION="2012.09.18"
FREEDRIVER="true"
PRIORITY="2"
......@@ -21,7 +21,7 @@ XORGFILE="/etc/X11/mhwd.d/ati.conf"
post_install()
{
MHWD_HEADING "${XORGFILE}"
MHWD_ADD_DEVICE_SECTION "radeon" "${XORGFILE}"
MHWD_ADD_DEVICE_SECTION_FOR_EACH_BUSID "radeon" "${XORGFILE}" 1002
MHWD_ADD_DRI "${XORGFILE}"
MHWD_ADD_COMPOSITING "${XORGFILE}"
MHWD_ADD_BACKSPACE "${XORGFILE}"
......
......@@ -2,7 +2,7 @@
NAME="video-i128"
INFO="X.org i128 video driver. Standard open source driver for Number 9 I128 graphic cards."
VERSION="2012.05.31"
VERSION="2012.09.18"
FREEDRIVER="true"
PRIORITY="1"
......@@ -20,7 +20,7 @@ XORGFILE="/etc/X11/mhwd.d/i128.conf"
post_install()
{
MHWD_HEADING "${XORGFILE}"
MHWD_ADD_DEVICE_SECTION "i128" "${XORGFILE}"
MHWD_ADD_DEVICE_SECTION_FOR_EACH_BUSID "i128" "${XORGFILE}" 105D
MHWD_ADD_DRI "${XORGFILE}"
MHWD_ADD_COMPOSITING "${XORGFILE}"
MHWD_ADD_BACKSPACE "${XORGFILE}"
......
......@@ -23,15 +23,13 @@ XORGFILE="/etc/X11/mhwd.d/intel.conf"
post_install()
{
# Create intel xorg configuration with enabled sna acceleration method
MHWD_HEADING "${XORGFILE}"
MHWD_ADD_DEVICE_SECTION "intel" "${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}"
# Enable sna acceleration method
sed -i /'Section "Device"'/,/'EndSection'/s/'EndSection'/"\tOption \"AccelMethod\" \"sna\"\nEndSection"/g "${XORGFILE}"
mhwd-gpu --setgl mesa --setxorg "${XORGFILE}"
}
......
......@@ -2,7 +2,7 @@
NAME="video-nouveau"
INFO="X.org nouveau video driver. Standard open source driver for nvidia graphic cards."
VERSION="2012.06.01"
VERSION="2012.09.18"
FREEDRIVER="true"
PRIORITY="2"
......@@ -24,7 +24,7 @@ XORGFILE="/etc/X11/mhwd.d/nouveau.conf"
post_install()
{
MHWD_HEADING "${XORGFILE}"
MHWD_ADD_DEVICE_SECTION "nouveau" "${XORGFILE}"
MHWD_ADD_DEVICE_SECTION_FOR_EACH_BUSID "nouveau" "${XORGFILE}" 10de
MHWD_ADD_DRI "${XORGFILE}"
MHWD_ADD_COMPOSITING "${XORGFILE}"
MHWD_ADD_BACKSPACE "${XORGFILE}"
......
......@@ -2,7 +2,7 @@
NAME="video-nv"
INFO="X.org nv video driver. Standard open source driver for NVidia graphic cards."
VERSION="2012.05.31"
VERSION="2012.09.18"
FREEDRIVER="true"
PRIORITY="1"
......@@ -20,7 +20,7 @@ XORGFILE="/etc/X11/mhwd.d/nv.conf"
post_install()
{
MHWD_HEADING "${XORGFILE}"
MHWD_ADD_DEVICE_SECTION "nv" "${XORGFILE}"
MHWD_ADD_DEVICE_SECTION_FOR_EACH_BUSID "nv" "${XORGFILE}" 10de
MHWD_ADD_DRI "${XORGFILE}"
MHWD_ADD_COMPOSITING "${XORGFILE}"
MHWD_ADD_BACKSPACE "${XORGFILE}"
......
......@@ -2,7 +2,7 @@
NAME="video-r128"
INFO="X.org r128 video driver. Standard open source driver for ATI Rage128 graphic cards."
VERSION="2012.05.31"
VERSION="2012.09.18"
FREEDRIVER="true"
PRIORITY="1"
......@@ -20,7 +20,7 @@ XORGFILE="/etc/X11/mhwd.d/r128.conf"
post_install()
{
MHWD_HEADING "${XORGFILE}"
MHWD_ADD_DEVICE_SECTION "r128" "${XORGFILE}"
MHWD_ADD_DEVICE_SECTION_FOR_EACH_BUSID "r128" "${XORGFILE}" 1002
MHWD_ADD_DRI "${XORGFILE}"
MHWD_ADD_COMPOSITING "${XORGFILE}"
MHWD_ADD_BACKSPACE "${XORGFILE}"
......
......@@ -2,7 +2,7 @@
NAME="video-vesa"
INFO="X.org vesa video driver."
VERSION="2012.05.26"
VERSION="2012.09.18"
FREEDRIVER="true"
PRIORITY="0"
......@@ -20,7 +20,7 @@ XORGFILE="/etc/X11/mhwd.d/vesa.conf"
post_install()
{
MHWD_HEADING "${XORGFILE}"
MHWD_ADD_DEVICE_SECTION "vesa" "${XORGFILE}"
MHWD_ADD_DEVICE_SECTION_FOR_EACH_BUSID "vesa" "${XORGFILE}" "*"
MHWD_ADD_DRI "${XORGFILE}"
MHWD_ADD_COMPOSITING "${XORGFILE}"
MHWD_ADD_BACKSPACE "${XORGFILE}"
......
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