saving uncommitted changes in /etc prior to emerge run
This commit is contained in:
12
hprofile/profiles/vga/scripts/fglrx.start
Normal file
12
hprofile/profiles/vga/scripts/fglrx.start
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# vga/scripts/fglrx.start
|
||||
#
|
||||
|
||||
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:
|
||||
#
|
||||
9
hprofile/profiles/vga/scripts/fglrx.stop
Normal file
9
hprofile/profiles/vga/scripts/fglrx.stop
Normal file
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# vga/scripts/fglrx.stop
|
||||
#
|
||||
|
||||
rmmod ${1} || die "failed to remove ${1} module"
|
||||
|
||||
#
|
||||
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
|
||||
#
|
||||
17
hprofile/profiles/vga/scripts/intel.start
Normal file
17
hprofile/profiles/vga/scripts/intel.start
Normal file
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# vga/scripts/intel.start
|
||||
#
|
||||
|
||||
modprobe i915 || die "Failed to insert i915 kernel module"
|
||||
|
||||
if [[ -e /sys/kernel/debug/vgaswitcheroo/switch ]]; then
|
||||
echo IGD >/sys/kernel/debug/vgaswitcheroo/switch &&
|
||||
echo OFF >/sys/kernel/debug/vgaswitcheroo/switch
|
||||
fi
|
||||
|
||||
[[ $(eselect opengl show) != 'xorg-x11' ]] && eselect opengl set 'xorg-x11'
|
||||
[[ $(eselect xvmc show) != 'intel-i915/i965' ]] && eselect xvmc set 'intel-i915/i965'
|
||||
|
||||
#
|
||||
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
|
||||
#
|
||||
17
hprofile/profiles/vga/scripts/nouveau.start
Normal file
17
hprofile/profiles/vga/scripts/nouveau.start
Normal file
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# vga/scripts/nouveau.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
|
||||
|
||||
[[ $(eselect opengl show) != xorg-x11 ]] && eselect opengl set xorg-x11
|
||||
[[ $(eselect xvmc show) != xorg-x11 ]] && eselect opengl set xorg-x11
|
||||
|
||||
#
|
||||
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
|
||||
#
|
||||
22
hprofile/profiles/vga/scripts/nouveau.stop
Normal file
22
hprofile/profiles/vga/scripts/nouveau.stop
Normal file
@@ -0,0 +1,22 @@
|
||||
#
|
||||
# vga/scripts/nouveau.stop
|
||||
#
|
||||
|
||||
|
||||
# Uncomment the following line and last one if one need
|
||||
# to force remove nouveau/kms driver for e.g. 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"
|
||||
else
|
||||
/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:
|
||||
#
|
||||
11
hprofile/profiles/vga/scripts/nvidia.start
Normal file
11
hprofile/profiles/vga/scripts/nvidia.start
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# vga/scripts/nvidia.start
|
||||
#
|
||||
|
||||
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:
|
||||
#
|
||||
9
hprofile/profiles/vga/scripts/nvidia.stop
Normal file
9
hprofile/profiles/vga/scripts/nvidia.stop
Normal file
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# vga/scripts/nvidia.stop
|
||||
#
|
||||
|
||||
rmmod ${1} || die "Failed to remove ${1} kernel module"
|
||||
|
||||
#
|
||||
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
|
||||
#
|
||||
20
hprofile/profiles/vga/scripts/radeon.start
Normal file
20
hprofile/profiles/vga/scripts/radeon.start
Normal file
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# 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/device/power_method # or 'dynpm'
|
||||
echo auto >/sys/class/drm/card0/device/power_profile # or 'low|mid'
|
||||
|
||||
#
|
||||
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
|
||||
#
|
||||
23
hprofile/profiles/vga/scripts/radeon.stop
Normal file
23
hprofile/profiles/vga/scripts/radeon.stop
Normal file
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# vga/scripts/radeon.stop
|
||||
#
|
||||
|
||||
|
||||
# Comment the following line and uncomment the other lines
|
||||
# to force remove nouveau/kms driver for e.g. 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"
|
||||
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:
|
||||
#
|
||||
Reference in New Issue
Block a user