mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 22:26:42 +00:00
xorg-server: rework systemd service files and helper scripts
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
0ec749f19f
commit
2b628980db
@ -170,8 +170,8 @@ pre_configure_target() {
|
||||
post_makeinstall_target() {
|
||||
rm -rf $INSTALL/var/cache/xkb
|
||||
|
||||
mkdir -p $INSTALL/lib/udev
|
||||
cp -P $PKG_DIR/scripts/xorg-configure $INSTALL/lib/udev
|
||||
mkdir -p $INSTALL/usr/lib/xorg
|
||||
cp -P $PKG_DIR/scripts/xorg-configure $INSTALL/usr/lib/xorg
|
||||
|
||||
if [ -f $INSTALL/usr/lib/xorg/modules/extensions/libglx.so ]; then
|
||||
mv $INSTALL/usr/lib/xorg/modules/extensions/libglx.so \
|
||||
@ -195,6 +195,4 @@ post_makeinstall_target() {
|
||||
post_install() {
|
||||
enable_service xorg-monitor.path
|
||||
enable_service xorg.service
|
||||
# enable_service xorg.path
|
||||
# enable_service xorg.target
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
# creating needed directories and symlinks
|
||||
################################################################################
|
||||
|
||||
logger -t Xorg "creating needed directories and symlinks for driver: "${xorg_driver}""
|
||||
logger -t Xorg "creating needed directories and symlinks for driver: "$1""
|
||||
|
||||
mkdir -p /var/lib
|
||||
mkdir -p /var/run
|
||||
@ -38,9 +38,9 @@ logger -t Xorg "creating needed directories and symlinks for driver: "${xorg_dri
|
||||
logger -t Xorg "### setup xorg.conf paths ###"
|
||||
|
||||
XORG_CONF_USER="/storage/.config/xorg.conf"
|
||||
XORG_CONF_USER_DRV="/storage/.config/xorg-${xorg_driver}.conf"
|
||||
XORG_CONF_USER_DRV="/storage/.config/xorg-$1.conf"
|
||||
XORG_CONF_DEFAULT="/etc/X11/xorg.conf"
|
||||
XORG_CONF_DEFAULT_DRV="/etc/X11/xorg-${xorg_driver}.conf"
|
||||
XORG_CONF_DEFAULT_DRV="/etc/X11/xorg-$1.conf"
|
||||
|
||||
##############################################################################
|
||||
# creating start options
|
||||
@ -67,15 +67,15 @@ logger -t Xorg "### creating start options ###"
|
||||
|
||||
logger -t Xorg "### creating needed directories and symlinks ###"
|
||||
|
||||
if [ "${xorg_driver}" = "nvidia" ]; then
|
||||
if [ "$1" = "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"
|
||||
elif [ "${xorg_driver}" = "fglrx" ]; then
|
||||
elif [ "$1" = "fglrx" ]; then
|
||||
ln -sf /usr/lib/fglrx /var/run/fglrx
|
||||
ln -sf /usr/lib/libGL_fglrx.so.1 /var/lib/libGL.so
|
||||
ln -sf /usr/lib/xorg/modules/extensions/libglx_fglrx.so /var/lib/libglx.so
|
||||
elif [ "${xorg_driver}" = "fglrx-legacy" ]; then
|
||||
elif [ "$1" = "fglrx-legacy" ]; then
|
||||
ln -sf /usr/lib/fglrx-legacy /var/run/fglrx
|
||||
ln -sf /usr/lib/libGL_fglrx.so.1 /var/lib/libGL.so
|
||||
ln -sf /usr/lib/xorg/modules/extensions/libglx_fglrx.so /var/lib/libglx.so
|
||||
|
@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=configure Xorg Server for %I
|
||||
Before=xorg.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/lib/xorg/xorg-configure %I
|
||||
RemainAfterExit=yes
|
@ -6,4 +6,4 @@ After=xorg.service
|
||||
PathModified=/run/openelec/debug.conf
|
||||
|
||||
[Install]
|
||||
WantedBy=xorg.target
|
||||
WantedBy=graphical.target
|
||||
|
@ -4,7 +4,7 @@ After=xorg.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/systemctl restart xorg-server.service
|
||||
ExecStart=/bin/systemctl restart xorg.service
|
||||
|
||||
[Install]
|
||||
WantedBy=xorg.target
|
||||
WantedBy=graphical.target
|
||||
|
@ -1,8 +0,0 @@
|
||||
[Unit]
|
||||
Description=Xorg server configfile watcher
|
||||
|
||||
[Path]
|
||||
PathExists=/run/openelec/xorg-settings.conf
|
||||
|
||||
[Install]
|
||||
WantedBy=xorg.target
|
@ -1,17 +1,15 @@
|
||||
[Unit]
|
||||
Description=Xorg Server
|
||||
Conflicts=rescue.service rescue.target installer.target
|
||||
Before=xorg.target
|
||||
Before=graphical.target
|
||||
After=multi-user.target
|
||||
|
||||
ConditionPathExists=/run/openelec/xorg-settings.conf
|
||||
|
||||
[Service]
|
||||
Environment=DISPLAY=:0.0
|
||||
EnvironmentFile=/run/openelec/xorg-settings.conf
|
||||
EnvironmentFile=-/run/openelec/debug.conf
|
||||
ExecStart=/usr/bin/Xorg vt01 $XORG_ARGS $XORG_DEBUG
|
||||
Restart=always
|
||||
# RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=xorg.target
|
||||
WantedBy=graphical.target
|
||||
|
@ -1,4 +0,0 @@
|
||||
[Unit]
|
||||
Description=The basic Xorg server
|
||||
Conflicts=installer.target textmode.target rescue.target
|
||||
Before=graphical.target
|
@ -27,24 +27,19 @@ GOTO="end_video"
|
||||
|
||||
# check for drivers dont use the pci substem
|
||||
LABEL="subsystem_drivers"
|
||||
KERNEL=="dovefb", ENV{xorg_driver}="dove", GOTO="configure_xorg"
|
||||
KERNEL=="fglrx_pci", ENV{xorg_driver}="fglrx", GOTO="configure_xorg"
|
||||
KERNEL=="fglrx_legacy_pci", ENV{xorg_driver}="fglrx-legacy", GOTO="configure_xorg"
|
||||
KERNEL=="nvidia", ENV{xorg_driver}="nvidia", GOTO="configure_xorg"
|
||||
KERNEL=="vboxvideo", ENV{xorg_driver}="vboxvideo", GOTO="configure_xorg"
|
||||
KERNEL=="vmwgfx", ENV{xorg_driver}="vmware", GOTO="configure_xorg"
|
||||
KERNEL=="dovefb", ENV{xorg_driver}="dove", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xorg-configure@dove.service"
|
||||
KERNEL=="fglrx_pci", ENV{xorg_driver}="fglrx", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xorg-configure@fglrx.service"
|
||||
KERNEL=="fglrx_legacy_pci", ENV{xorg_driver}="fglrx-legacy", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xorg-configure@fglrx-legacy.service"
|
||||
KERNEL=="nvidia", ENV{xorg_driver}="nvidia", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xorg-configure@nvidia.service"
|
||||
KERNEL=="vboxvideo", ENV{xorg_driver}="vboxvideo", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xorg-configure@vboxvideo.service"
|
||||
KERNEL=="vmwgfx", ENV{xorg_driver}="vmware", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xorg-configure@vmware.service"
|
||||
GOTO="end_video"
|
||||
|
||||
# check for drivers using the pci substem
|
||||
LABEL="subsystem_pci"
|
||||
DRIVER=="i915", ENV{xorg_driver}="i915", GOTO="configure_xorg"
|
||||
DRIVER=="nouveau", ENV{xorg_driver}="nouveau", GOTO="configure_xorg"
|
||||
#DRIVER=="nvidia", ENV{xorg_driver}="nvidia", GOTO="configure_xorg"
|
||||
DRIVER=="radeon", ENV{xorg_driver}="radeon", GOTO="configure_xorg"
|
||||
DRIVER=="i915", ENV{xorg_driver}="i915", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xorg-configure@i915.service"
|
||||
DRIVER=="nouveau", ENV{xorg_driver}="nouveau", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xorg-configure@nouveau.service"
|
||||
DRIVER=="radeon", ENV{xorg_driver}="radeon", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xorg-configure@radeon.service"
|
||||
GOTO="end_video"
|
||||
|
||||
# configure Xorg
|
||||
LABEL="configure_xorg"
|
||||
ENV{xorg_driver}=="?*", RUN+="xorg-configure", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xorg.target"
|
||||
|
||||
LABEL="end_video"
|
||||
|
Loading…
x
Reference in New Issue
Block a user