|
|
|
|
@ -28,7 +28,7 @@ SOURCE=${SYSCONF}/keyboard; [[ -f ${SOURCE} ]] && . ${SOURCE} 2>/dev/null
|
|
|
|
|
while read KERNEL_MODULE; do
|
|
|
|
|
[[ ${KERNEL_MODULE} != "nouveau" ]] && modprobe ${KERNEL_MODULE} 2>/dev/null && break
|
|
|
|
|
done < <(lspci -ks ${LSPCI_DEVICE%% *} | grep 'Kernel modules:' | cut -d: -f2 | tr ',' '\n' | tac)
|
|
|
|
|
done < <(lspci | egrep -i 'vga|3d')
|
|
|
|
|
done < <(lspci | grep -Ei 'vga|3d')
|
|
|
|
|
if lsmod | grep nvidia &>/dev/null; then
|
|
|
|
|
#[[ -f /usr/bin/nvidia-xconfig ]] && nvidia-xconfig -s --no-logo --no-composite --no-dynamic-twinview --force-generate --output-xconfig=/etc/X11/xorg.conf
|
|
|
|
|
[[ -e /etc/X11/xorg.conf.d/20-nvidia-ubconfig.conf ]] || ln -sf /usr/lib/ublinux/xorg.conf.d/20-nvidia-ubconfig.conf /etc/X11/xorg.conf.d/
|
|
|
|
|
@ -53,7 +53,7 @@ SOURCE=${SYSCONF}/keyboard; [[ -f ${SOURCE} ]] && . ${SOURCE} 2>/dev/null
|
|
|
|
|
if [[ -n ${XORG_EXT} ]]; then
|
|
|
|
|
while read I_EXT; do
|
|
|
|
|
XORG_FILE_EXT="/etc/X11/xorg.conf.d/110-${I_EXT}-ubconfig.conf"
|
|
|
|
|
if egrep -iq "^nodpms$" <<< "${I_EXT}"; then
|
|
|
|
|
if grep -Eiq "^nodpms$" <<< "${I_EXT}"; then
|
|
|
|
|
cat > ${XORG_FILE_EXT} <<EOF
|
|
|
|
|
Section "Extensions"
|
|
|
|
|
Option "DPMS" "Disable"
|
|
|
|
|
@ -66,7 +66,7 @@ Section "ServerFlags"
|
|
|
|
|
Option "BlankTime" "0"
|
|
|
|
|
EndSection
|
|
|
|
|
EOF
|
|
|
|
|
elif egrep -iq "^dpms$" <<< "${I_EXT}"; then
|
|
|
|
|
elif grep -Eiq "^dpms$" <<< "${I_EXT}"; then
|
|
|
|
|
cat > ${XORG_FILE_EXT} <<EOF
|
|
|
|
|
Section "Extensions"
|
|
|
|
|
Option "DPMS" "Enable"
|
|
|
|
|
@ -89,46 +89,46 @@ EOF
|
|
|
|
|
PREFERRED_MODE=
|
|
|
|
|
XORG_STR_MONITOR=
|
|
|
|
|
while read VIDEO_PORT_PARAM; do
|
|
|
|
|
if egrep -iq "^[0-9]*x[0-9]*$|^[0-9]*x[0-9]*x[0-9]*$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
if grep -Eiq "^[0-9]*x[0-9]*$|^[0-9]*x[0-9]*x[0-9]*$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
if [[ -n ${SOFT_MODELINE_R} ]]; then
|
|
|
|
|
XORG_STR_MONITOR+="$(cvt -r $(sed 's/\([0-9]* [0-9]*\) .*/\1/' <<< ${VIDEO_PORT_PARAM//x/ }))\n"
|
|
|
|
|
SOFT_MODELINE_R=
|
|
|
|
|
elif [[ ${SOFT_MODELINE} == "cvt" ]]; then
|
|
|
|
|
XORG_STR_MONITOR+="$(cvt ${VIDEO_PORT_PARAM//x/ })\n"
|
|
|
|
|
else
|
|
|
|
|
if egrep -iq "^[0-9]*x[0-9]*$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
if grep -Eiq "^[0-9]*x[0-9]*$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
XORG_STR_MONITOR+="$(gtf ${VIDEO_PORT_PARAM//x/ } 60 | grep -v '^\s*$')\n"
|
|
|
|
|
else
|
|
|
|
|
XORG_STR_MONITOR+="$(gtf ${VIDEO_PORT_PARAM//x/ } | grep -v '^\s*$')\n"
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
elif egrep -iq "^cvt$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
elif grep -Eiq "^cvt$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
SOFT_MODELINE="cvt"
|
|
|
|
|
elif egrep -iq "^gtf$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
elif grep -Eiq "^gtf$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
SOFT_MODELINE="gtf"
|
|
|
|
|
elif egrep -iq "^reduced|r$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
elif grep -Eiq "^reduced|r$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
SOFT_MODELINE_R="reduced"
|
|
|
|
|
elif egrep -iq "^nodpms$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
elif grep -Eiq "^nodpms$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
XORG_STR_MONITOR+=' Option "DPMS" "false"\n'
|
|
|
|
|
elif egrep -iq "^dpms$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
elif grep -Eiq "^dpms$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
XORG_STR_MONITOR+=' Option "DPMS" "true"\n'
|
|
|
|
|
elif egrep -iq "^enable$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
elif grep -Eiq "^enable$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
XORG_STR_MONITOR+=' Option "Enable" "true"\n'
|
|
|
|
|
elif egrep -iq "^disable$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
elif grep -Eiq "^disable$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
XORG_STR_MONITOR+=' Option "Enable" "false"\n'
|
|
|
|
|
elif egrep -iq "^ignore$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
elif grep -Eiq "^ignore$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
XORG_STR_MONITOR+=' Option "Ignore" "true"\n'
|
|
|
|
|
elif egrep -iq "^primary$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
elif grep -Eiq "^primary$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
XORG_STR_MONITOR+=' Option "Primary" "true"\n'
|
|
|
|
|
elif egrep -iq "^lo:[A-z0-9]*$|^LeftOf:[A-z0-9]*$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
elif grep -Eiq "^lo:[A-z0-9]*$|^LeftOf:[A-z0-9]*$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
XORG_STR_MONITOR+=" Option \"LeftOf\" \"$(cut -d: -f2 <<< ${VIDEO_PORT_PARAM^^})\"\n"
|
|
|
|
|
elif egrep -iq "^ro:[A-z0-9]*$|^RightOf:[A-z0-9]*$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
elif grep -Eiq "^ro:[A-z0-9]*$|^RightOf:[A-z0-9]*$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
XORG_STR_MONITOR+=" Option \"RightOf\" \"$(cut -d: -f2 <<< ${VIDEO_PORT_PARAM^^})\"\n"
|
|
|
|
|
elif egrep -iq "^ab:[A-z0-9]*$|^Above:[A-z0-9]*$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
elif grep -Eiq "^ab:[A-z0-9]*$|^Above:[A-z0-9]*$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
XORG_STR_MONITOR+=" Option \"Above\" \"$(cut -d: -f2 <<< ${VIDEO_PORT_PARAM^^})\"\n"
|
|
|
|
|
elif egrep -iq "^be:[A-z0-9]*$|^Below:[A-z0-9]*$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
elif grep -Eiq "^be:[A-z0-9]*$|^Below:[A-z0-9]*$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
XORG_STR_MONITOR+=" Option \"Below\" \"$(cut -d: -f2 <<< ${VIDEO_PORT_PARAM^^})\"\n"
|
|
|
|
|
elif egrep -iq "^rotate:[A-z]*$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
elif grep -Eiq "^rotate:[A-z]*$" <<< "${VIDEO_PORT_PARAM}"; then
|
|
|
|
|
XORG_STR_MONITOR+=" Option \"Rotate\" \"$(cut -d: -f2 <<< ${VIDEO_PORT_PARAM^^})\"\n"
|
|
|
|
|
fi
|
|
|
|
|
[[ -z ${PREFERRED_MODE} ]] && PREFERRED_MODE=$(grep Modeline <<< "${XORG_STR_MONITOR}" | cut -d'"' -f2)
|
|
|
|
|
|