mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
xorg: setup xorg depending on loaded graphic driver, not on installed hardware
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
67bf0d9c3b
commit
cbe3f5f73d
@ -26,6 +26,7 @@
|
||||
|
||||
. /etc/profile
|
||||
|
||||
(
|
||||
XORG_DEFAULT_CONF="/etc/X11/xorg.conf"
|
||||
XORG_NVIDIA_CONF="/etc/X11/xorg-nvidia.conf"
|
||||
XORG_NVIDIA_CHD_CONF="/etc/X11/xorg-nvidia-chd.conf"
|
||||
@ -34,7 +35,17 @@
|
||||
|
||||
[ "$DEBUG" = yes ] && XORG_ARGS="$XORG_ARGS -logverbose 6 -verbose 6"
|
||||
|
||||
(
|
||||
# find used graphic driver
|
||||
if [ -d /sys/module/i915 ]; then
|
||||
DRIVER="intel"
|
||||
elif [ -d /sys/module/nouveau ]; then
|
||||
DRIVER="nouveau"
|
||||
elif [ -d /sys/module/nvidia ]; then
|
||||
DRIVER="nvidia"
|
||||
else
|
||||
DRIVER="other"
|
||||
fi
|
||||
|
||||
progress "creating directories needed for Xorg"
|
||||
|
||||
mkdir -p /var/cache/xkb
|
||||
@ -42,26 +53,23 @@
|
||||
mkdir -m 1777 -p /tmp/.ICE-unix
|
||||
chown root:root /tmp/.ICE-unix
|
||||
|
||||
if lspci -n | grep 0300 | grep -q 10de; then
|
||||
|
||||
# test if nvidia kernel driver is loaded,
|
||||
if [ "$DRIVER" = "nvidia" ]; then
|
||||
ln -sf /usr/lib/libGL_nvidia.so.1 /var/lib/libGL.so
|
||||
ln -sf /usr/lib/xorg/modules/extensions/libglx_nvidia.so /var/lib/libglx.so
|
||||
XORG_ARGS="$XORG_ARGS -ignoreABI"
|
||||
|
||||
# check if we have an Broadcom CrystalHD card installed, so we can disable
|
||||
# check if we have an Broadcom CrystalHD card installed, so we can disable
|
||||
# the use of shared memory
|
||||
if lspci -n | grep 0480 | grep -q 14e4; then
|
||||
XORG_CONF="$XORG_NVIDIA_CHD_CONF"
|
||||
else
|
||||
XORG_CONF="$XORG_NVIDIA_CONF"
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
ln -sf /usr/lib/libGL_mesa.so.1 /var/lib/libGL.so
|
||||
ln -sf /usr/lib/xorg/modules/extensions/libglx_mesa.so /var/lib/libglx.so
|
||||
XORG_CONF="$XORG_DEFAULT_CONF"
|
||||
|
||||
fi
|
||||
|
||||
[ -f $XORG_USER_CONF ] && XORG_CONF="$XORG_USER_CONF"
|
||||
|
Loading…
x
Reference in New Issue
Block a user