From 6e38d2ae8a78e04b1843273f36bf955c27f17040 Mon Sep 17 00:00:00 2001 From: leigh123linux Date: Tue, 15 Aug 2017 20:15:49 +0100 Subject: [PATCH] add udev rules so nvidia nodes are created under EGLDevice/wayland --- 60-nvidia.rules | 3 +++ xorg-x11-drv-nvidia.spec | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 60-nvidia.rules diff --git a/60-nvidia.rules b/60-nvidia.rules new file mode 100644 index 0000000..15657f5 --- /dev/null +++ b/60-nvidia.rules @@ -0,0 +1,3 @@ +KERNEL=="nvidia", RUN+="/usr/bin/bash -c '/usr/bin/mknod -m 666 /dev/nvidiactl c 195 255" +KERNEL=="nvidia", RUN+="/usr/bin/bash -c 'for i in $(cat /proc/driver/nvidia/gpus/*/information | grep Minor | cut -d \ -f 4); do /usr/bin/mknod -m 666 /dev/nvidia${i} c 195 ${i}; done" +KERNEL=="nvidia_modeset", RUN+="/usr/bin/bash -c '/usr/bin/mknod -m 666 /dev/nvidia-modeset c 195 254" diff --git a/xorg-x11-drv-nvidia.spec b/xorg-x11-drv-nvidia.spec index b316a14..ade90d9 100644 --- a/xorg-x11-drv-nvidia.spec +++ b/xorg-x11-drv-nvidia.spec @@ -48,6 +48,7 @@ Source6: blacklist-nouveau.conf Source7: alternate-install-present Source9: nvidia-settings.desktop Source10: nvidia.conf +Source11: 60-nvidia.rules Source12: xorg-x11-drv-nvidia.metainfo.xml Source13: parse-readme.py Source14: 60-nvidia-uvm.rules @@ -300,8 +301,11 @@ install -p -m 0644 %{SOURCE15} %{buildroot}%{_modprobe_d} install -p -m 0644 %{SOURCE6} %{buildroot}%{_modprobe_d} %endif -# UDev rules for nvidia-uvm +# UDev rules for nvidia install -m 0755 -d %{buildroot}%{_udevrulesdir} +install -p -m 0644 %{SOURCE11} %{buildroot}%{_udevrulesdir} + +# UDev rules for nvidia-uvm install -p -m 0644 %{SOURCE14} %{buildroot}%{_udevrulesdir} # dracut.conf.d file, nvidia modules must never be in the initrd @@ -493,6 +497,7 @@ fi ||: %{_datadir}/X11/xorg.conf.d/nvidia.conf %if 0%{?rhel} > 6 || 0%{?fedora} %{_udevrulesdir}/10-nvidia.rules +%{_udevrulesdir}/60-nvidia.rules %{_unitdir}/nvidia-fallback.service %endif %if 0%{?fedora} >= 25