summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2016-10-20 15:26:36 +0200
committerSimon Rettberg2016-10-20 15:26:36 +0200
commit27594b6b603b8d1a10c398c21b6a0c8958b5b477 (patch)
tree4dcaa24712c91d37d00f25ecb41b81003aeb73bb
parent[run-virt] More cleanup; kill legacy support, rename and move includes, kill ... (diff)
downloadtm-scripts-27594b6b603b8d1a10c398c21b6a0c8958b5b477.tar.gz
tm-scripts-27594b6b603b8d1a10c398c21b6a0c8958b5b477.tar.xz
tm-scripts-27594b6b603b8d1a10c398c21b6a0c8958b5b477.zip
[rfs-stage32] Check for nvidia.ko first, then for whitelisted pciids
We might have a supported onboard card AND a whitelisted nvidia card. Stage 3.1 will load the nvidia kernel modules all right, but then stage 3.2 sees the whitelisted onboard card, enables "force 3d" for vmware and skips the part where it will load the nvidia user space libs, resulting in an unusable client. Check for the nvidia kernel module first and only check for a supported onboard card if none was found to prevent this situation from occuring.
-rwxr-xr-xremote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-load_gfx_driver9
1 files changed, 5 insertions, 4 deletions
diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-load_gfx_driver b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-load_gfx_driver
index 3ca2f334..e6fd32cf 100755
--- a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-load_gfx_driver
+++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-load_gfx_driver
@@ -7,13 +7,14 @@ if ! lspci -n > "$PCIFILE"; then
exit 1
fi
-if grep -q -E ' (8086:0102|8086:0152|8086:0162|8086:0412|8086:0416|1002:6779)( |$)' "$PCIFILE"; then
- echo "i915 - enable 3D"
- echo -e "# Written by load-gfx-driver\nSLX_VMWARE_3D=yes" >> "/opt/openslx/config"
-elif lsmod | grep -q '^nvidia\s'; then
+if lsmod | grep -q '^nvidia\s'; then
# nvidia kernel module was loaded in stage31 - download libs
+ echo "Proprietary nvidia kernel drivers loaded - fetch user space libs"
systemctl start setup-slx-addon@nvidia_libs &
echo -e "# Written by load-gfx-driver\nSLX_VMWARE_3D=yes" >> "/opt/openslx/config"
+elif grep -q -E ' (8086:0102|8086:0152|8086:0162|8086:0412|8086:0416|1002:6779)( |$)' "$PCIFILE"; then
+ echo "i915 - enable 3D"
+ echo -e "# Written by load-gfx-driver\nSLX_VMWARE_3D=yes" >> "/opt/openslx/config"
fi
exit 0