features: added LDM support
Linux Driver Management (aka LDM) allows easy configuration of different hardware. Currently this hook does GPU configuration on systems with multiple GPUs (aka Optimus/PRIME).
This commit is contained in:
parent
e53a7b031e
commit
b278c718ad
9
features.in/ldm/README
Normal file
9
features.in/ldm/README
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
Simple hook to run Linux Driver Management tools to configure hybrid graphics
|
||||||
|
(aka Optimus/PRIME) for different DM's.
|
||||||
|
|
||||||
|
Currently supported:
|
||||||
|
+ LightDM
|
||||||
|
+ GDM
|
||||||
|
+ SDDM
|
||||||
|
|
||||||
|
See https://github.com/solus-project/linux-driver-management
|
23
features.in/ldm/config.mk
Normal file
23
features.in/ldm/config.mk
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
+ldm: use/ldm/session; @:
|
||||||
|
|
||||||
|
# common
|
||||||
|
use/ldm: sub/rootfs use/services
|
||||||
|
@$(call add_feature)
|
||||||
|
@$(call add,COMMON_PACKAGES,ldm-tools)
|
||||||
|
|
||||||
|
# configure X11 session
|
||||||
|
use/ldm/session: use/ldm
|
||||||
|
@$(call add,COMMON_PACKAGES,ldm-session-init)
|
||||||
|
@$(call add,DEFAULT_SERVICES_ENABLE,ldm)
|
||||||
|
|
||||||
|
# configure lightdm session
|
||||||
|
use/ldm/session/lightdm: use/ldm/session
|
||||||
|
@$(call add,COMMON_PACKAGES,ldm-session-init-lightdm)
|
||||||
|
|
||||||
|
# configure sddm session
|
||||||
|
use/ldm/session/sddm: use/ldm/session
|
||||||
|
@$(call add,COMMON_PACKAGES,ldm-session-init-sddm)
|
||||||
|
|
||||||
|
# configure gdm session
|
||||||
|
use/ldm/session/gdm: use/ldm/session
|
||||||
|
@$(call add,COMMON_PACKAGES,ldm-session-init-gdm)
|
17
features.in/ldm/rootfs/image-scripts.d/50-ldm
Executable file
17
features.in/ldm/rootfs/image-scripts.d/50-ldm
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh -efu
|
||||||
|
# initiate LDM hook on boot
|
||||||
|
|
||||||
|
cat << EOF > /etc/systemd/system/ldm.service
|
||||||
|
[Unit]
|
||||||
|
Description=Runs LDM configuration hooks
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/linux-driver-management configure gpu
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
EOF
|
||||||
|
|
||||||
|
systemctl enable ldm.service
|
Loading…
Reference in New Issue
Block a user