mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 06:06:43 +00:00
xorg-server: fixing udev rule to start correctly with nvidia drivers as well with OSS included in kernel
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
c80f0ba02d
commit
79c6be8d82
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
if [ "$RUNLEVEL" = openelec ]; then
|
if [ "$RUNLEVEL" = openelec ]; then
|
||||||
|
|
||||||
logger -t Xorg "### starting Xorg with driver $1 ###"
|
logger -t Xorg "### starting Xorg with driver ${xorg_driver} ###"
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# setup xorg.conf paths
|
# setup xorg.conf paths
|
||||||
@ -33,7 +33,7 @@ if [ "$RUNLEVEL" = openelec ]; then
|
|||||||
logger -t Xorg "### setup xorg.conf paths ###"
|
logger -t Xorg "### setup xorg.conf paths ###"
|
||||||
|
|
||||||
XORG_CONF_DEFAULT="/etc/X11/xorg.conf"
|
XORG_CONF_DEFAULT="/etc/X11/xorg.conf"
|
||||||
XORG_CONF_DRIVER="/etc/X11/xorg-$1.conf"
|
XORG_CONF_DRIVER="/etc/X11/xorg-${xorg_driver}.conf"
|
||||||
XORG_CONF_USER="/storage/.config/xorg.conf"
|
XORG_CONF_USER="/storage/.config/xorg.conf"
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@ -68,7 +68,7 @@ if [ "$RUNLEVEL" = openelec ]; then
|
|||||||
mkdir -m 1777 -p /tmp/.ICE-unix
|
mkdir -m 1777 -p /tmp/.ICE-unix
|
||||||
chown root:root /tmp/.ICE-unix
|
chown root:root /tmp/.ICE-unix
|
||||||
|
|
||||||
if [ "$1" = "nvidia" ]; then
|
if [ "${xorg_driver}" = "nvidia" ]; then
|
||||||
ln -sf /usr/lib/libGL_nvidia.so.1 /var/lib/libGL.so
|
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
|
ln -sf /usr/lib/xorg/modules/extensions/libglx_nvidia.so /var/lib/libglx.so
|
||||||
XORG_ARGS="$XORG_ARGS -ignoreABI"
|
XORG_ARGS="$XORG_ARGS -ignoreABI"
|
||||||
|
@ -18,13 +18,32 @@
|
|||||||
# http://www.gnu.org/copyleft/gpl.html
|
# http://www.gnu.org/copyleft/gpl.html
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# only does something with "drivers" subsystem devices and supported hardware.
|
ACTION!="add|change", GOTO="end_video"
|
||||||
SUBSYSTEM!="drivers", GOTO="end"
|
|
||||||
|
|
||||||
KERNEL!="i915", KERNEL!="nouveau", KERNEL!="nvidia", KERNEL!="radeon", \
|
# xorg_start only does something for subsystem "pci" and "video" class.
|
||||||
KERNEL!="vmware", GOTO="end"
|
SUBSYSTEM=="pci", ATTR{class}=="0x030000", GOTO="subsystem_pci"
|
||||||
|
SUBSYSTEM=="drivers", GOTO="subsystem_drivers"
|
||||||
|
|
||||||
# Start Xorg based on the loaded drm driver
|
# check for drivers dont use the pci substem
|
||||||
ACTION=="add|change", RUN+="/lib/udev/xorg_start %k"
|
LABEL="subsystem_drivers"
|
||||||
|
|
||||||
LABEL="end"
|
KERNEL=="nvidia", ENV{xorg_driver}="nvidia", GOTO="start_xorg"
|
||||||
|
|
||||||
|
GOTO="end_video"
|
||||||
|
|
||||||
|
# check for drivers using the pci substem
|
||||||
|
LABEL="subsystem_pci"
|
||||||
|
|
||||||
|
DRIVER=="i915", ENV{xorg_driver}="i915", GOTO="start_xorg"
|
||||||
|
DRIVER=="nouveau", ENV{xorg_driver}="nouveau", GOTO="start_xorg"
|
||||||
|
DRIVER=="radeon", ENV{xorg_driver}="radeon", GOTO="start_xorg"
|
||||||
|
#DRIVER=="vmware", ENV{xorg_driver}="vmware", GOTO="start_xorg"
|
||||||
|
|
||||||
|
GOTO="end_video"
|
||||||
|
|
||||||
|
# start Xorg
|
||||||
|
LABEL="start_xorg"
|
||||||
|
|
||||||
|
ACTION=="add|change", RUN+="/lib/udev/xorg_start"
|
||||||
|
|
||||||
|
LABEL="end_video"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user