Skip to content

Commit d39cb72

Browse files
blacklist i915
1 parent 263b806 commit d39cb72

File tree

2 files changed

+54
-8
lines changed

2 files changed

+54
-8
lines changed

laptops/t/configuration.nix

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,15 @@
6969
#boot.kernelParams
7070
# https://github.com/tolgaerok/nixos-2405-gnome/blob/main/core/boot/efi/efi.nix#L56C5-L56C21
7171
kernelParams = [
72-
"nvidia-drm.modeset=1"
73-
"nvidia-drm.fbdev=1"
72+
#"nvidia-drm.modeset=1"
73+
#"nvidia-drm.fbdev=1"
74+
# https://www.reddit.com/r/NixOS/comments/u5l3ya/cant_start_x_in_nixos/?rdt=56160
75+
"nomodeset"
76+
];
77+
78+
blacklistedKernelModules = [
79+
"nouveau"
80+
"i915"
7481
];
7582

7683
# https://wiki.nixos.org/wiki/NixOS_on_ARM/Building_Images#Compiling_through_binfmt_QEMU
@@ -79,24 +86,25 @@
7986

8087
extraModulePackages = with config.boot.kernelPackages; [
8188
v4l2loopback
82-
nvidia_x11
89+
#nvidia_x11
8390
];
8491

8592
# https://nixos.wiki/wiki/Libvirt#Nested_virtualization
8693
#extraModprobeConfig = "options kvm_intel nested=1";
8794
# https://gist.github.com/chrisheib/162c8cad466638f568f0fb7e5a6f4f6b#file-config_working-nix-L19
8895
extraModprobeConfig =
89-
"options nvidia "
96+
#"options nvidia "
97+
""
9098
+ lib.concatStringsSep " " [
9199
# nvidia assume that by default your CPU does not support PAT,
92100
# but this is effectively never the case in 2023
93-
"NVreg_UsePageAttributeTable=1"
101+
#"NVreg_UsePageAttributeTable=1"
94102
# This is sometimes needed for ddc/ci support, see
95103
# https://www.ddcutil.com/nvidia/
96104
#
97105
# Current monitor does not support it, but this is useful for
98106
# the future
99-
"NVreg_RegistryDwords=RMUseSwI2c=0x01;RMI2cSpeed=100"
107+
#"NVreg_RegistryDwords=RMUseSwI2c=0x01;RMI2cSpeed=100"
100108
"options kvm_intel nested=1"
101109
# # https://nixos.wiki/wiki/OBS_Studio
102110
''
@@ -132,8 +140,6 @@
132140
hardware.graphics = {
133141
enable = true;
134142
extraPackages = with pkgs; [
135-
vdpauinfo # sudo vainfo
136-
libva-utils # sudo vainfo
137143
# https://discourse.nixos.org/t/nvidia-open-breaks-hardware-acceleration/58770/2
138144
nvidia-vaapi-driver
139145
vaapiVdpau
@@ -142,6 +148,8 @@
142148
vdpauinfo
143149
libva
144150
libva-utils
151+
# https://wiki.nixos.org/wiki/Intel_Graphics
152+
#vpl-gpu-rt
145153
];
146154
};
147155

@@ -368,6 +376,8 @@
368376
# vdpauinfo
369377
# libva
370378
# libva-utils
379+
vdpauinfo # sudo vainfo
380+
libva-utils # sudo vainfo
371381
];
372382

373383
# Some programs need SUID wrappers, can be configured further or are

laptops/t/readme.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# readme
2+
3+
4+
## Nvidia nightmare
5+
6+
Big thread, with feedback about my issue
7+
https://discourse.nixos.org/t/nvidia-open-breaks-hardware-acceleration/58770/25
8+
9+
10+
11+
https://github.com/elFarto/nvidia-vaapi-driver/issues/311
12+
13+
```
14+
[das@t:~/Downloads/nixpkgs]$ ls -la /dev/dri/
15+
total 0
16+
drwxr-xr-x 3 root root 140 Jan 30 22:16 .
17+
drwxr-xr-x 20 root root 4080 Jan 31 07:24 ..
18+
drwxr-xr-x 2 root root 120 Jan 30 22:16 by-path
19+
crw-rw----+ 1 root video 226, 1 Jan 31 07:24 card1
20+
crw-rw----+ 1 root video 226, 2 Jan 30 22:16 card2
21+
crw-rw-rw- 1 root render 226, 128 Jan 30 22:16 renderD128
22+
crw-rw-rw- 1 root render 226, 129 Jan 30 22:16 renderD129
23+
24+
[das@t:~/Downloads/nixpkgs]$ ls -la /dev/dri/by-path/
25+
total 0
26+
drwxr-xr-x 2 root root 120 Jan 30 22:16 .
27+
drwxr-xr-x 3 root root 140 Jan 30 22:16 ..
28+
lrwxrwxrwx 1 root root 8 Jan 30 22:16 pci-0000:00:02.0-card -> ../card2
29+
lrwxrwxrwx 1 root root 13 Jan 30 22:16 pci-0000:00:02.0-render -> ../renderD129
30+
lrwxrwxrwx 1 root root 8 Jan 30 22:16 pci-0000:01:00.0-card -> ../card1
31+
lrwxrwxrwx 1 root root 13 Jan 30 22:16 pci-0000:01:00.0-render -> ../renderD128
32+
33+
[das@t:~/Downloads/nixpkgs]$ lspci | grep VGA
34+
00:02.0 VGA compatible controller: Intel Corporation CometLake-H GT2 [UHD Graphics] (rev 05)
35+
01:00.0 VGA compatible controller: NVIDIA Corporation TU117GLM [Quadro T2000 Mobile / Max-Q] (rev a1)
36+
```

0 commit comments

Comments
 (0)