This commit is contained in:
Hans Wurst
2015-07-31 02:34:53 +02:00
parent d02a7cedc8
commit 4d9533ca0a
161 changed files with 248 additions and 30687 deletions

View File

@@ -1,13 +0,0 @@
#
# vga/scripts/fglrx.start
#
modprobe uvesafb > /dev/null 2>&1
modprobe ${1} || die "Failed to insert ${1} kernel module"
[[ $(eselect opengl show) != ati ]] && eselect opengl set ati
[[ $(eselect xvmc show) != ati ]] && eselect xvmc set ati
#
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
#

View File

@@ -1,13 +0,0 @@
#
# vga/scripts/fglrx.stop
#
rmmod ${1} || die "Failed to remove ${1} module"
#
# FIXME: Is this necessary? Comment out if necessary.
#
rmmod uvesafb > /dev/null 2>&1
#
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
#

View File

@@ -1,25 +0,0 @@
#
# vga/scripts/nouveau.stop
#
#
# FIXME: Comment out & edit if necessary to unload
# nouveau/drm/kms/ttm i.e. to be able to load nVidia.
#
if [[ ! -e sys/kernel/debug/vgaswitcheroo/switch ]]; then
echo 0 >/sys/class/vtconsole/vtcon1/bind
if ! rmmod nouveau; then
die "Failed to remove ${1} kernel module"
else
[[ -x /etc/init.d/consolefont ]] &&
/etc/init.d/consolefont restart
rmmod ttm
rmmod drm_kms_helper
rmmod dri
fi
fi
#
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
#

View File

@@ -1,12 +0,0 @@
#
# vga/scripts/nvidia.start
#
modprobe uvesafb > /dev/null 2>&1
modprobe ${1} || die "Failed to insert ${1} kernel module"
[[ $(eselect opengl show) != ${1} ]] && eselect opengl set ${1}
#
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
#

View File

@@ -1,10 +0,0 @@
#
# vga/scripts/nvidia.stop
#
rmmod ${1} || die "Failed to remove ${1} kernel module"
rmmod uvesafb > /dev/null 2>&1
#
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
#

View File

@@ -1,20 +0,0 @@
#
# vga/scripts/radeon.start
#
modprobe ${1} || die "Failed to insert ${1} kernel module"
if [[ -e /sys/kernel/debug/vgaswitcheroo/switch ]]; then
echo DIS >/sys/kernel/debug/vgaswitcheroo/switch
# echo OFF >/sys/kernel/debug/vgaswitcheroo/switch
fi
echo low >/sys/class/drm/card0/device/power_profile
[[ $(eselect opengl show) != xorg-x11 ]] && eselect opengl set xorg-x11
[[ $(eselect xvmc show) != xorg-x11 ]] && eselect xvmc set xorg-x11
echo profile >/sys/class/drm/card0/power_method # or 'dynpm'
echo auto >/sys/class/drm/card0/power_profile # or 'low|mid'
#
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
#

View File

@@ -1,25 +0,0 @@
#
# vga/scripts/radeon.stop
#
#
# FIXME: Comment in & edit if necessary to unload
# radeon/drm/kms/ttm i.e. to be able to load Fglrx.
#
if [[ ! -e sys/kernel/debug/vgaswitcheroo/switch ]]; then
# echo 0 >/sys/class/vtconsole/vtcon1/bind
if ! rmmod radeon; then
echo "Failed to remove ${1} module"
else
[[ -x /etc/init.d/consolefont ]] &&
/etc/init.d/consolefont restart
# rmmod ttm
# rmmod drm_kms_helper
# rmmod dri
fi
fi
#
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
#

View File

@@ -2,6 +2,7 @@
# vga/scripts/fglrx.start
#
modprobe uvesafb > /dev/null 2>&1
modprobe ${1} || die "Failed to insert ${1} kernel module"
[[ $(eselect opengl show) != ati ]] && eselect opengl set ati

View File

@@ -2,7 +2,11 @@
# vga/scripts/fglrx.stop
#
rmmod ${1} || die "failed to remove ${1} module"
rmmod ${1} || die "Failed to remove ${1} module"
#
# FIXME: Is this necessary? Comment out if necessary.
#
rmmod uvesafb > /dev/null 2>&1
#
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:

View File

@@ -3,13 +3,16 @@
#
# Uncomment the following line and last one if one need
# to force remove nouveau/kms driver for e.g. nvidia
#
# FIXME: Comment out & edit if necessary to unload
# nouveau/drm/kms/ttm i.e. to be able to load nVidia.
#
if [[ ! -e sys/kernel/debug/vgaswitcheroo/switch ]]; then
echo 0 >/sys/class/vtconsole/vtcon1/bind
if ! rmmod nouveau; then
die "Failed to remove nouveau kernel module"
die "Failed to remove ${1} kernel module"
else
[[ -x /etc/init.d/consolefont ]] &&
/etc/init.d/consolefont restart
rmmod ttm
rmmod drm_kms_helper

View File

@@ -2,6 +2,7 @@
# vga/scripts/nvidia.start
#
modprobe uvesafb > /dev/null 2>&1
modprobe ${1} || die "Failed to insert ${1} kernel module"
[[ $(eselect opengl show) != ${1} ]] && eselect opengl set ${1}

View File

@@ -3,6 +3,7 @@
#
rmmod ${1} || die "Failed to remove ${1} kernel module"
rmmod uvesafb > /dev/null 2>&1
#
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:

View File

@@ -12,8 +12,8 @@ fi
echo low >/sys/class/drm/card0/device/power_profile
[[ $(eselect opengl show) != xorg-x11 ]] && eselect opengl set xorg-x11
[[ $(eselect xvmc show) != xorg-x11 ]] && eselect xvmc set xorg-x11
echo profile >/sys/class/drm/card0/device/power_method # or 'dynpm'
echo auto >/sys/class/drm/card0/device/power_profile # or 'low|mid'
echo profile >/sys/class/drm/card0/power_method # or 'dynpm'
echo auto >/sys/class/drm/card0/power_profile # or 'low|mid'
#
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:

View File

@@ -3,12 +3,14 @@
#
# Comment the following line and uncomment the other lines
# to force remove nouveau/kms driver for e.g. fglrx
#
# FIXME: Comment in & edit if necessary to unload
# radeon/drm/kms/ttm i.e. to be able to load Fglrx.
#
if [[ ! -e sys/kernel/debug/vgaswitcheroo/switch ]]; then
# echo 0 >/sys/class/vtconsole/vtcon1/bind
if ! rmmod nouveau; then
echo "failed to remove fglrx module"
if ! rmmod radeon; then
echo "Failed to remove ${1} module"
else
[[ -x /etc/init.d/consolefont ]] &&
/etc/init.d/consolefont restart