diff --git a/includes.container/etc/modprobe.d/blacklist-framebuffer.conf b/includes.container/etc/modprobe.d/blacklist-framebuffer.conf new file mode 100644 index 0000000..9fd5eca --- /dev/null +++ b/includes.container/etc/modprobe.d/blacklist-framebuffer.conf @@ -0,0 +1,31 @@ +# Framebuffer drivers are generally buggy and poorly-supported, and cause +# suspend failures, kernel panics and general mayhem. For this reason we +# never load them automatically. +blacklist aty128fb +blacklist atyfb +blacklist radeonfb +blacklist cirrusfb +blacklist cyber2000fb +blacklist cyblafb +blacklist gx1fb +blacklist hgafb +blacklist i810fb +blacklist intelfb +blacklist kyrofb +blacklist lxfb +blacklist matroxfb_base +blacklist neofb +blacklist nvidiafb +blacklist pm2fb +blacklist rivafb +blacklist s1d13xxxfb +blacklist savagefb +blacklist sisfb +blacklist sstfb +blacklist tdfxfb +blacklist tridentfb +#blacklist vesafb +blacklist vfb +blacklist viafb +blacklist vt8623fb +blacklist udlfb diff --git a/includes.container/etc/modprobe.d/blacklist.conf b/includes.container/etc/modprobe.d/blacklist.conf new file mode 100644 index 0000000..eecdf12 --- /dev/null +++ b/includes.container/etc/modprobe.d/blacklist.conf @@ -0,0 +1,52 @@ +# This file lists those modules which we don't want to be loaded by +# alias expansion, usually so some other driver will be loaded for the +# device instead. + +# evbug is a debug tool that should be loaded explicitly +blacklist evbug + +# these drivers are very simple, the HID drivers are usually preferred +blacklist usbmouse +blacklist usbkbd + +# replaced by e100 +blacklist eepro100 + +# replaced by tulip +blacklist de4x5 + +# causes no end of confusion by creating unexpected network interfaces +blacklist eth1394 + +# snd_intel8x0m can interfere with snd_intel8x0, doesn't seem to support much +# hardware on its own (Ubuntu bug #2011, #6810) +blacklist snd_intel8x0m + +# Conflicts with dvb driver (which is better for handling this device) +blacklist snd_aw2 + +# replaced by p54pci +blacklist prism54 + +# replaced by b43 and ssb. +blacklist bcm43xx + +# most apps now use garmin usb driver directly (Ubuntu: #114565) +blacklist garmin_gps + +# replaced by asus-laptop (Ubuntu: #184721) +blacklist asus_acpi + +# low-quality, just noise when being used for sound playback, causes +# hangs at desktop session start (Ubuntu: #246969) +blacklist snd_pcsp + +# ugly and loud noise, getting on everyone's nerves; this should be done by a +# nice pulseaudio bing (Ubuntu: #77010) +blacklist pcspkr + +# EDAC driver for amd76x clashes with the agp driver preventing the aperture +# from being initialised (Ubuntu: #297750). Blacklist so that the driver +# continues to build and is installable for the few cases where its +# really needed. +blacklist amd76x_edac diff --git a/includes.container/etc/modprobe.d/intel-microcode-blacklist.conf b/includes.container/etc/modprobe.d/intel-microcode-blacklist.conf new file mode 100644 index 0000000..1dc2c23 --- /dev/null +++ b/includes.container/etc/modprobe.d/intel-microcode-blacklist.conf @@ -0,0 +1,3 @@ +# The microcode module attempts to apply a microcode update when +# it autoloads. This is not always safe, so we block it by default. +blacklist microcode diff --git a/includes.container/etc/modprobe.d/nvidia-graphics-drivers-kms.conf b/includes.container/etc/modprobe.d/nvidia-graphics-drivers-kms.conf new file mode 100644 index 0000000..2879881 --- /dev/null +++ b/includes.container/etc/modprobe.d/nvidia-graphics-drivers-kms.conf @@ -0,0 +1,3 @@ +# This file was generated by nvidia-driver-535 +# Set value to 0 to disable modesetting +options nvidia-drm modeset=1 diff --git a/includes.container/etc/modprobe.d/nvidia-power-management.conf b/includes.container/etc/modprobe.d/nvidia-power-management.conf new file mode 100644 index 0000000..6f3618c --- /dev/null +++ b/includes.container/etc/modprobe.d/nvidia-power-management.conf @@ -0,0 +1 @@ +options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp/ \ No newline at end of file diff --git a/includes.container/etc/prime-discrete b/includes.container/etc/prime-discrete index 19d6322..8ba54f9 100644 --- a/includes.container/etc/prime-discrete +++ b/includes.container/etc/prime-discrete @@ -1 +1 @@ -on-demand +on-demand \ No newline at end of file diff --git a/recipe.yml b/recipe.yml index 5bdd2af..a225346 100644 --- a/recipe.yml +++ b/recipe.yml @@ -19,14 +19,43 @@ stages: - lpkg --unlock - apt-get update - - name: nvidia-official-driver + - name: nvidia-official-repo type: shell commands: - curl -fSsL https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/3bf863cc.pub | gpg --dearmor -o /usr/share/keyrings/nvidia-drivers.gpg - echo 'deb [signed-by=/usr/share/keyrings/nvidia-drivers.gpg] https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/ /' > /etc/apt/sources.list.d/nvidia-drivers.list - apt-get update - - apt-get install nvidia-driver nvidia-vaapi-driver nvidia-settings nvidia-smi -y - - apt-mark hold nvidia-driver nvidia-vaapi-driver nvidia-settings nvidia-smi + + - name: nvidia-official-driver + type: shell + commands: + - apt-mark hold nvidia-kernel-open nvidia-driver nvidia-vaapi-driver nvidia-settings nvidia-persistenced nvidia-smi libnvidia-cfg1 libnvidia-glcore libnvidia-glvkspirv libnvidia-gpucomp libnvidia-fbc1 nvidia-container-toolkit + modules: + - name: install-nvidia + type: apt + source: + packages: + - nvidia-kernel-open + - nvidia-driver + - nvidia-vaapi-driver + - nvidia-settings + - nvidia-persistenced + - nvidia-smi + - libnvidia-cfg1 + - libnvidia-glcore + - libnvidia-glvkspirv + - libnvidia-gpucomp + - libnvidia-fbc1 + - nvidia-container-toolkit + + - name: nvidia-sysd-units + type: shell + commands: + - mkdir -p /etc/systemd/system/systemd-suspend.service.wants + - mkdir -p /etc/systemd/system/systemd-hibernate.service.wants + - ln -s /usr/lib/systemd/system/nvidia-suspend.service /etc/systemd/system/systemd-suspend.service.wants/nvidia-suspend.service + - ln -s /usr/lib/systemd/system/nvidia-hibernate.service /etc/systemd/system/systemd-hibernate.service.wants/nvidia-hibernate.service + - ln -s /usr/lib/systemd/system/nvidia-resume.service /etc/systemd/system/systemd-hibernate.service.wants/nvidia-resume.service - name: extra-utilities type: apt @@ -34,20 +63,12 @@ stages: packages: - switcheroo-control - - name: nvidia-ctk-repo - type: shell - commands: - - curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg - - curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | tee /etc/apt/sources.list.d/nvidia-container-toolkit.list - - apt-get update - - apt-get install nvidia-container-toolkit -y - - apt-mark hold nvidia-container-toolkit - - name: vanilla-tools type: shell source: type: tar - url: https://github.com/Vanilla-OS/vanilla-tools/releases/download/continuous/vanilla-tools.tar.gz + url: https://github.com/Vanilla-OS/vanilla-tools/releases/download/v1.0.0/vanilla-tools.tar.gz + checksum: 0e1d92d9c9154f9a115e97b40ff692afa52ddd0d9f770a8ec67440bf1a48aa72 commands: - mkdir -p /usr/bin - cp /sources/vanilla-tools/vanilla-tools/nrun /usr/bin/nrun @@ -55,36 +76,11 @@ stages: - chmod +x /usr/bin/nrun - chmod +x /usr/bin/prime-switch - - name: vanilla-prime-utility - type: meson - source: - type: git - url: https://github.com/Vanilla-OS/vanilla-prime-utility - branch: main - commit: latest - modules: - - name: vanilla-prime-utility-deps-install - type: apt - source: - packages: - - build-essential - - gettext - - libadwaita-1-dev - - meson - - - name: enable-wayland - type: shell - commands: - - mkdir -p /etc/udev/rules.d - - ln -s /dev/null /etc/udev/rules.d/61-gdm.rules - - name: cleanup type: shell commands: - - apt autoremove -y - - apt clean - - apt remove -y zutty gnome-shell-extension-prefs - - SUDO_FORCE_REMOVE=yes apt purge -y sudo + - apt-get autoremove -y + - apt-get clean - lpkg --lock - name: fsguard @@ -106,4 +102,4 @@ stages: commands: - rm -rf /tmp/* - rm -rf /var/tmp/* - - rm -rf /sources + - rm -rf /sources \ No newline at end of file