mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
fix check on fb switch
This commit is contained in:
parent
33a197746f
commit
c73f1a48dc
1 changed files with 38 additions and 0 deletions
38
lib/initcpio/hooks/arch_fb
Normal file
38
lib/initcpio/hooks/arch_fb
Normal file
|
@ -0,0 +1,38 @@
|
|||
run_hook ()
|
||||
{
|
||||
# check for kms
|
||||
if [ "$intel_kms" = "y" ]; then
|
||||
msg ":: Switching to intel kms mode ..."
|
||||
# writing module options
|
||||
echo "options i915 modeset=1" >> /etc/modprobe.d/modprobe.conf
|
||||
fbmodule="i915"
|
||||
else
|
||||
echo "blacklist i915" >> /etc/modprobe.d/framebuffer_blacklist.conf
|
||||
fi
|
||||
if [ "$nvidia_kms" = "y" ]; then
|
||||
msg ":: Switching to nvidia kms mode ..."
|
||||
# writing module options
|
||||
echo "options nouveau modeset=1" >> /etc/modprobe.d/modprobe.conf
|
||||
fbmodule="nouveau"
|
||||
else
|
||||
echo "blacklist nouveau" >> /etc/modprobe.d/framebuffer_blacklist.conf
|
||||
fi
|
||||
if [ "$ati_kms" = "y" ]; then
|
||||
msg ":: Switching to ati kms mode ..."
|
||||
# writing module options
|
||||
echo "options radeon modeset=1" >> /etc/modprobe.d/modprobe.conf
|
||||
fbmodule="radeon"
|
||||
else
|
||||
echo "blacklist radeon" >> /etc/modprobe.d/framebuffer_blacklist.conf
|
||||
fi
|
||||
# check for uvesafb
|
||||
if [ "$(echo $uvesafb | grep "[0-9]*x[0-9]*-[0-9]*")" ]; then
|
||||
msg ":: Switching to uvesafb mode ..."
|
||||
sed -i -e "s#options.*#options uvesafb mode_option=$uvesafb scroll=ywrap#g" /etc/modprobe.d/uvesafb.conf
|
||||
fbmodule="uvesafb"
|
||||
fi
|
||||
# load correct module
|
||||
if ! [ "$fbmodule" = "" -a "$fbmodule" = "y" ]; then
|
||||
modprobe -aq $fbmodule >/dev/null 2>&1
|
||||
fi
|
||||
}
|
Loading…
Reference in a new issue