Enable modeset for DRM for F27+ only

el9
leigh123linux 7 years ago
parent ce9bf07190
commit 3ed52b33c2

@ -1,3 +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 '/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", 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" KERNEL=="nvidia_modeset", RUN+="/usr/bin/bash -c '/usr/bin/mknod -m 666 /dev/nvidia-modeset c 195 254'"

@ -12,7 +12,7 @@
# RHEL 6 does not have _udevrulesdir defined # RHEL 6 does not have _udevrulesdir defined
%global _udevrulesdir %{_prefix}/lib/udev/rules.d/ %global _udevrulesdir %{_prefix}/lib/udev/rules.d/
%global _modprobe_d %{_sysconfdir}/modprobe.d/ %global _modprobe_d %{_sysconfdir}/modprobe.d/
%global _dracutopts nouveau.modeset=0 rdblacklist=nouveau nvidia-drm.modeset=1 %global _dracutopts nouveau.modeset=0 rdblacklist=nouveau
%global _dracut_conf_d %{_sysconfdir}/dracut.conf.d %global _dracut_conf_d %{_sysconfdir}/dracut.conf.d
%global _grubby /sbin/grubby --grub --update-kernel=ALL %global _grubby /sbin/grubby --grub --update-kernel=ALL
%else #rhel > 6 or fedora %else #rhel > 6 or fedora
@ -20,9 +20,13 @@
%global _modprobe_d %{_prefix}/lib/modprobe.d/ %global _modprobe_d %{_prefix}/lib/modprobe.d/
%global _grubby %{_sbindir}/grubby --update-kernel=ALL %global _grubby %{_sbindir}/grubby --update-kernel=ALL
%if 0%{?rhel} == 7 %if 0%{?rhel} == 7
%global _dracutopts nouveau.modeset=0 rd.driver.blacklist=nouveau nvidia-drm.modeset=1 %global _dracutopts nouveau.modeset=0 rd.driver.blacklist=nouveau
%else #fedora %else #fedora
%if 0%{?fedora} >= 27
%global _dracutopts rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 %global _dracutopts rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1
%else
%global _dracutopts rd.driver.blacklist=nouveau modprobe.blacklist=nouveau
%endif
%endif %endif
%endif %endif
@ -33,7 +37,7 @@
Name: xorg-x11-drv-nvidia Name: xorg-x11-drv-nvidia
Epoch: 2 Epoch: 2
Version: 384.59 Version: 384.59
Release: 4%{?dist} Release: 5%{?dist}
Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards
License: Redistributable, no modification permitted License: Redistributable, no modification permitted
@ -422,7 +426,7 @@ if [ "$1" -eq "1" ]; then
fi || : fi || :
%if 0%{?fedora} || 0%{?rhel} >= 7 %if 0%{?fedora} || 0%{?rhel} >= 7
%triggerun -- xorg-x11-drv-nvidia < 2:384.59-4 %triggerun -- xorg-x11-drv-nvidia < 2:384.59-5
if [ -f %{_sysconfdir}/default/grub ] ; then if [ -f %{_sysconfdir}/default/grub ] ; then
sed -i -e '/GRUB_GFXPAYLOAD_LINUX=text/d' %{_sysconfdir}/default/grub sed -i -e '/GRUB_GFXPAYLOAD_LINUX=text/d' %{_sysconfdir}/default/grub
. %{_sysconfdir}/default/grub . %{_sysconfdir}/default/grub
@ -630,6 +634,9 @@ fi ||:
%{_libdir}/libnvidia-encode.so %{_libdir}/libnvidia-encode.so
%changelog %changelog
* Thu Aug 17 2017 Leigh Scott <leigh123linux@googlemail.com> - 2:384.59-5
- Enable modeset for DRM for F27+ only
* Wed Aug 16 2017 Leigh Scott <leigh123linux@googlemail.com> - 2:384.59-4 * Wed Aug 16 2017 Leigh Scott <leigh123linux@googlemail.com> - 2:384.59-4
- Use kernel option instead to set modeset for DRM module - Use kernel option instead to set modeset for DRM module

Loading…
Cancel
Save