Install nvidia-driver-dkms on Linux RT kernel

20230712: Sorry maybe this is not recommended... It caused kernel panic after installing vmware...

- Edit /var/lib/dkms/nvidia-current/470.182.03/source/dkms.conf (The path varies on Debian/Ubuntu version)

```diff
@@ -5,12 +5,12 @@
 
 # The NVIDIA driver does not support real-time kernels.
 # Can't easily set this via BUILD_EXCLUSIVE.
-[[ "$kernelver" =~ "-rt-" ]] && build_exclude="yes"
+#[[ "$kernelver" =~ "-rt-" ]] && build_exclude="yes"
 
 AUTOINSTALL=yes
 PATCH=(cc_version_check-gcc5.patch bashisms.patch linux-2.6.34-dev_pm_info-runtime_auto.patch 0010-backport-pci-dma-changes-for-ppc64el.patch ppc64el.patch fragile-ARCH.patch use-kbuild-compiler.patch use-kbuild-flags.patch conftest-verbose.patch conftest-prefer-arch-headers.patch)
 
-MAKE[0]="env NV_VERBOSE=1 \
+MAKE[0]="env IGNORE_PREEMPT_RT_PRESENCE=1 NV_VERBOSE=1 \
     make ${parallel_jobs+-j$parallel_jobs} modules KERNEL_UNAME=${kernelver}"
 CLEAN="make KERNEL_UNAME=${kernelver} clean"
 
```

- Install RT kernel or run `sudo /etc/kernel/header_postinst.d/dkms KERNEL_PACKAGE_NAME` (KERNEL_PACKAGE_NAME is "6.1.0-0.deb11.7-rt-amd64" for example)

Acknowledgement: https://gist.github.com/pantor/9786c41c03a97bca7a52aa0a72fa9387

----

20230712: Sorry maybe this is not recommended... It caused kernel panic after installing vmware...

```
Jul 13 16:38:49 __machine__ kernel: [14079.202505] BUG: scheduling while atomic: irq/127-s-nvidi/1030/0x00000002
Jul 13 16:38:49 __machine__ kernel: [14079.202508] Modules linked in: uinput xt_nat xt_tcpudp veth xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack 
nf_defrag_ipv6 nf_defrag_ipv4 xfrm_user xfrm_algo xt_addrtype nft_compat nf_tables libcrc32c br_netfilter bridge stp llc vboxnetadp(OE) vboxnetflt(OE) vmw_vsock_vmci_transport vsoc
k vmw_vmci vboxdrv(OE) nvidia_uvm(POE) rfcomm nfnetlink cpufreq_powersave cpufreq_conservative cpufreq_userspace cpufreq_ondemand cmac algif_hash algif_skcipher af_alg bnep overlay
 btusb btrtl btbcm btintel btmtk bluetooth jitterentropy_rng drbg ansi_cprng ecdh_generic rfkill ecc binfmt_misc intel_rapl_msr intel_rapl_common x86_pkg_temp_thermal intel_powercl
amp coretemp kvm_intel kvm snd_hda_codec_realtek irqbypass snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi ghash_clmulni_intel sha512_ssse3 sha512_generic snd_hda_intel nvid
ia_drm(POE) snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hda_core snd_hwdep snd_pcm drm_kms_helper aesni_intel mei_hdcp
Jul 13 16:38:49 __machine__ kernel: [14079.202546]  crypto_simd cryptd snd_timer nvidia_modeset(POE) iTCO_wdt rapl mei_me intel_pmc_bxt intel_cstate iTCO_vendor_support snd watchdog
 sg intel_uncore mei soundcore ee1004 intel_pmc_core evdev acpi_pad nvidia(POE) squashfs msr loop nfsd auth_rpcgss nfs_acl parport_pc lockd ppdev lp grace parport drm sunrpc fuse c
onfigfs ip_tables x_tables autofs4 ext4 crc16 mbcache jbd2 crc32c_generic hid_lenovo hid_generic usbhid hid sd_mod t10_pi crc64_rocksoft crc64 crc_t10dif crct10dif_generic ahci xhc
i_pci libahci xhci_hcd libata e1000e crct10dif_pclmul crct10dif_common crc32_pclmul usbcore scsi_mod crc32c_intel ptp i2c_i801 pps_core i2c_smbus scsi_common usb_common video wmi b
utton
Jul 13 16:38:49 __machine__ kernel: [14079.202578] Preemption disabled at:
Jul 13 16:38:49 __machine__ kernel: [14079.202579] [<0000000000000000>] 0x0
Jul 13 16:38:49 __machine__ kernel: [14079.202582] CPU: 1 PID: 1030 Comm: irq/127-s-nvidi Tainted: P        W  OE      6.1.0-0.deb11.7-rt-amd64 #1  Debian 6.1.20-2~bpo11+1
Jul 13 16:38:49 __machine__ kernel: [14079.202584] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Z370M Pro4, BIOS P3.20 09/21/2018
Jul 13 16:38:49 __machine__ kernel: [14079.202585] Call Trace:
Jul 13 16:38:49 __machine__ kernel: [14079.202586]  <TASK>
Jul 13 16:38:49 __machine__ kernel: [14079.202588]  dump_stack_lvl+0x45/0x5e
Jul 13 16:38:49 __machine__ kernel: [14079.202591]  __schedule_bug.cold+0x7f/0x8d
Jul 13 16:38:49 __machine__ kernel: [14079.202593]  __schedule+0x864/0xb20
Jul 13 16:38:49 __machine__ kernel: [14079.202596]  schedule_rtlock+0x1e/0x40
Jul 13 16:38:49 __machine__ kernel: [14079.202598]  rtlock_slowlock_locked+0x3c0/0xef0
Jul 13 16:38:49 __machine__ kernel: [14079.202600]  ? preempt_count_add+0x70/0xa0
Jul 13 16:38:49 __machine__ kernel: [14079.202602]  ? find_busiest_group+0x136/0xca0
Jul 13 16:38:49 __machine__ kernel: [14079.202605]  ? nv_post_event+0x95/0x140 [nvidia]
Jul 13 16:38:49 __machine__ kernel: [14079.202797]  rt_spin_lock+0x41/0x60
Jul 13 16:38:49 __machine__ kernel: [14079.202799]  ___slab_alloc+0xa9/0xb00
Jul 13 16:38:49 __machine__ kernel: [14079.202802]  ? _raw_spin_lock_irqsave+0x24/0x60
Jul 13 16:38:49 __machine__ kernel: [14079.202803]  ? nv_post_event+0x95/0x140 [nvidia]
Jul 13 16:38:49 __machine__ kernel: [14079.202914]  ? preempt_count_add+0x70/0xa0
Jul 13 16:38:49 __machine__ kernel: [14079.202916]  ? preempt_count_add+0x70/0xa0
Jul 13 16:38:49 __machine__ kernel: [14079.202917]  ? _nv031352rm+0x2a/0x150 [nvidia]
Jul 13 16:38:49 __machine__ kernel: [14079.203161]  ? preempt_count_add+0x70/0xa0
Jul 13 16:38:49 __machine__ kernel: [14079.203162]  ? _raw_spin_lock_irqsave+0x24/0x60
Jul 13 16:38:49 __machine__ kernel: [14079.203163]  ? os_acquire_spinlock+0xe/0x20 [nvidia]
Jul 13 16:38:49 __machine__ kernel: [14079.203280]  ? nv_post_event+0x95/0x140 [nvidia]
Jul 13 16:38:49 __machine__ kernel: [14079.203390]  __kmem_cache_alloc_node+0xfc/0x200
Jul 13 16:38:49 __machine__ kernel: [14079.203392]  kmalloc_trace+0x25/0xc0
Jul 13 16:38:49 __machine__ kernel: [14079.203395]  nv_post_event+0x95/0x140 [nvidia]
Jul 13 16:38:49 __machine__ kernel: [14079.203506]  _nv035325rm+0x59/0x70 [nvidia]
Jul 13 16:38:49 __machine__ kernel: [14079.203723]  ? _nv033213rm+0xab/0xc0 [nvidia]
Jul 13 16:38:49 __machine__ kernel: [14079.203938]  ? _nv031438rm+0xf4/0x120 [nvidia]
Jul 13 16:38:49 __machine__ kernel: [14079.204094]  ? _nv024585rm+0xaf3/0x12b0 [nvidia]
Jul 13 16:38:49 __machine__ kernel: [14079.204392]  ? _nv024585rm+0xb12/0x12b0 [nvidia]
Jul 13 16:38:49 __machine__ kernel: [14079.204686]  ? _nv029420rm+0x138/0xd90 [nvidia]
Jul 13 16:38:49 __machine__ kernel: [14079.204990]  ? _nv029428rm+0x161/0x440 [nvidia]
Jul 13 16:38:49 __machine__ kernel: [14079.205288]  ? _nv000723rm+0xb1/0x250 [nvidia]
Jul 13 16:38:49 __machine__ kernel: [14079.205496]  ? disable_irq_nosync+0x10/0x10
Jul 13 16:38:49 __machine__ kernel: [14079.205499]  ? rm_isr_bh+0x1c/0x60 [nvidia]
Jul 13 16:38:49 __machine__ kernel: [14079.205699]  ? nvidia_isr_kthread_bh+0x1b/0x40 [nvidia]
Jul 13 16:38:49 __machine__ kernel: [14079.205809]  ? irq_thread_fn+0x1d/0x60
Jul 13 16:38:49 __machine__ kernel: [14079.205811]  ? irq_thread+0xe9/0x1a0
Jul 13 16:38:49 __machine__ kernel: [14079.205812]  ? irq_finalize_oneshot.part.0+0xd0/0xd0
Jul 13 16:38:49 __machine__ kernel: [14079.205814]  ? irq_forced_thread_fn+0x80/0x80
Jul 13 16:38:49 __machine__ kernel: [14079.205815]  ? kthread+0x103/0x130
Jul 13 16:38:49 __machine__ kernel: [14079.205817]  ? kthread_complete_and_exit+0x20/0x20
Jul 13 16:38:49 __machine__ kernel: [14079.205819]  ? ret_from_fork+0x1f/0x30
Jul 13 16:38:49 __machine__ kernel: [14079.205823]  </TASK>
```