saving uncommitted changes in /etc prior to emerge run
This commit is contained in:
10
hprofile/profiles/vga/._cfg0000_post-start
Normal file
10
hprofile/profiles/vga/._cfg0000_post-start
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# vga/post-start
|
||||
#
|
||||
|
||||
[[ -x /etc/init.d/consolefont ]] &&
|
||||
/etc/init.d/consolefont restart
|
||||
|
||||
#
|
||||
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
|
||||
#
|
||||
13
hprofile/profiles/vga/scripts/._cfg0000_fglrx.start
Normal file
13
hprofile/profiles/vga/scripts/._cfg0000_fglrx.start
Normal file
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# 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:
|
||||
#
|
||||
13
hprofile/profiles/vga/scripts/._cfg0000_fglrx.stop
Normal file
13
hprofile/profiles/vga/scripts/._cfg0000_fglrx.stop
Normal file
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# 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:
|
||||
#
|
||||
25
hprofile/profiles/vga/scripts/._cfg0000_nouveau.stop
Normal file
25
hprofile/profiles/vga/scripts/._cfg0000_nouveau.stop
Normal file
@@ -0,0 +1,25 @@
|
||||
#
|
||||
# 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:
|
||||
#
|
||||
12
hprofile/profiles/vga/scripts/._cfg0000_nvidia.start
Normal file
12
hprofile/profiles/vga/scripts/._cfg0000_nvidia.start
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# 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:
|
||||
#
|
||||
10
hprofile/profiles/vga/scripts/._cfg0000_nvidia.stop
Normal file
10
hprofile/profiles/vga/scripts/._cfg0000_nvidia.stop
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# 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:
|
||||
#
|
||||
20
hprofile/profiles/vga/scripts/._cfg0000_radeon.start
Normal file
20
hprofile/profiles/vga/scripts/._cfg0000_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/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:
|
||||
#
|
||||
25
hprofile/profiles/vga/scripts/._cfg0000_radeon.stop
Normal file
25
hprofile/profiles/vga/scripts/._cfg0000_radeon.stop
Normal file
@@ -0,0 +1,25 @@
|
||||
#
|
||||
# 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:
|
||||
#
|
||||
Reference in New Issue
Block a user