diff --git a/.claude/commands/build.md b/.claude/commands/build.md new file mode 100644 index 0000000..9a9239f --- /dev/null +++ b/.claude/commands/build.md @@ -0,0 +1,7 @@ +--- +description: Build the perpixel-silverblue OCI image locally (make container) and report the result +--- + +Build the container image locally by running the `build-container` skill: run `make container` +in the background, watch for `dnf`/`buildah` failures, and report the resulting OCI archive path +(or the exact failing line plus a proposed fix). Do not run `make rebase` unless I ask. diff --git a/.claude/skills/build-container/SKILL.md b/.claude/skills/build-container/SKILL.md new file mode 100644 index 0000000..356384b --- /dev/null +++ b/.claude/skills/build-container/SKILL.md @@ -0,0 +1,44 @@ +--- +name: build-container +description: Build the perpixel-silverblue OCI image locally with `make container` and report the result. Use when asked to build the image, do a local build, test the Containerfile, or verify that changes to packages.sh / build_files actually build. +--- + +# Build the container image locally + +`make container` runs `build.sh`, which calls `buildah bud` with `--no-cache --pull=always`. +This pulls the full Fedora Silverblue base and runs every `dnf install` in `packages.sh`, so a +clean build takes many minutes and a lot of disk/network. The output is an OCI archive at +`/tmp/${TARGET_IMAGE_NAME}.tar.gz` (`/tmp/perpixel-silverblue.tar.gz`). + +## Steps + +1. **Run it in the background** — it is long-running. From the repo root: + ```sh + make container + ``` + Launch with `run_in_background: true` so you keep getting progress and aren't blocked. + +2. **Watch for the common failure modes.** `set -oeux pipefail` means the build aborts on the + first error and the failing line is printed. Most failures are in `packages.sh`: + - **Package not found / obsoleted** — a package name changed or moved. Read the exact `dnf` + error; fix the name in `build_files/scripts/packages.sh`. + - **RPM Fusion "freeworld" conflict** — `mesa-va-drivers-freeworld` / `mesa-vdpau-drivers-freeworld` + replace the stock `mesa-*-drivers`. If `dnf install` reports a conflict, switch that line to + `dnf swap mesa-va-drivers mesa-va-drivers-freeworld -y` (and the vdpau equivalent). + - **i686/multilib not found** — the 32-bit gaming drivers (`*.i686`) require the x86_64 base + package and matching repos; confirm the exact arch-qualified name with `dnf`. + +3. **On success**, report the archive path and the rebase command: + ```sh + make rebase # bootc switch --transport oci-archive /tmp/perpixel-silverblue.tar.gz + ``` + Do not run `make rebase` unless the user asks — it switches the running system's deployment. + +4. **On failure**, surface the exact failing `dnf`/`buildah` line (not a paraphrase), propose the + one-line fix, and offer to apply it and rebuild. + +## Notes + +- buildah runs rootless here (subuid is configured for the user); no `sudo` is needed. +- A failed or interrupted build can leave large layers behind. `buildah images` / `buildah rm --all` + and `make clean` (removes the `/tmp` tarball) help reclaim space. diff --git a/.github/workflows/build-system.yml b/.github/workflows/build-system.yml index 2c116b9..cabf802 100644 --- a/.github/workflows/build-system.yml +++ b/.github/workflows/build-system.yml @@ -44,10 +44,6 @@ jobs: echo "$line" >> $GITHUB_ENV done < ./config.env - # fetch NVIDIA driver version - NVIDIA_VERSION=$(./get_nvidia_versions.sh) - echo "NVIDIA_VERSION=$(./get_nvidia_versions.sh)" >> $GITHUB_ENV - - name: Generate tags id: generate-tags shell: bash @@ -124,7 +120,6 @@ jobs: build-args: | BASE_IMAGE=${{ env.BASE_IMAGE }} FEDORA_VERSION=${{ env.FEDORA_VERSION }} - NVIDIA_VERSION=${{ env.NVIDIA_VERSION }} extra-args: | --no-cache --pull=always diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index a596ea4..7eca95d 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -12,7 +12,7 @@ jobs: - name: Delete old container uses: snok/container-retention-policy@v2.2.1 with: - image-names: perpixel-silverblue, nvidia-*, akmods-* + image-names: perpixel-silverblue cut-off: 1 weeks ago UTC account-type: personal skip-tags: latest @@ -21,7 +21,7 @@ jobs: - name: Delete pr containers uses: snok/container-retention-policy@v2.2.1 with: - image-names: perpixel-silverblue, nvidia*, akmods* + image-names: perpixel-silverblue cut-off: 1 day ago UTC account-type: personal filter-tags: "pr-*" diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..27d3c02 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,34 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## What this is + +A custom Fedora Silverblue OCI image (bootc/ostree). The build layers extra packages, the COSMIC desktop, and hardware tweaks onto the upstream `fedora-ostree-desktops/silverblue` base, then publishes it to `ghcr.io/perpixel/perpixel-silverblue`. End users `rpm-ostree rebase` / `bootc switch` onto the published image — there is no application code, only build orchestration and system config. + +## Commands + +```sh +make container # build the image locally via build.sh -> oci-archive:/tmp/perpixel-silverblue.tar.gz +make rebase # bootc switch onto the freshly built local archive +make update # bootc update to the latest local image +make clean # remove the /tmp tarball +``` + +There is no test suite or linter. "Building" means producing the container image; validation is done by booting into it. The local build (`build.sh`) shells out to `buildah bud` with `--no-cache`, so a full build is slow and downloads the whole base image. + +## Build flow + +1. `config.env` is the single source of truth for build variables (`TARGET_IMAGE_NAME`, `BASE_IMAGE`, `FEDORA_VERSION`). It is sourced by `Makefile`, `build.sh`, and the GitHub workflow alike — change values here, not in the consumers. +2. `Containerfile` runs `build_files/scripts/install.sh`, which calls `packages.sh`. **`packages.sh` is where almost all real customization lives** — package installs/removals, RPM Fusion setup, kernel selection. To add/remove packages, edit the `dnf install`/`dnf remove` lists there (the README points at an Ansible playbook that no longer exists). +3. `system_files/` is copied verbatim onto `/` in the image. These are drop-in config files (systemd units, `/etc/environment`, etc.). + +## Hardware target: AMD + +This image targets AMD GPUs using the in-tree `amdgpu` driver — there are no out-of-tree kernel modules to build. VA-API video decode comes from RPM Fusion's `mesa-va-drivers-freeworld` (carries the codecs the stock Fedora package strips); `rocm` provides compute; `/etc/environment` sets `LIBVA_DRIVER_NAME=radeonsi`. For Steam/Proton, `packages.sh` also installs the 32-bit (`.i686`) Mesa DRI/Vulkan/GL drivers. Note F44 RPM Fusion has no `mesa-vdpau-drivers-freeworld` — VA-API is the only freeworld video path. (This repo was previously NVIDIA-based with source-built drivers; that machinery — `get_nvidia_versions.sh`, the builder stage, `nvidia-installer.sh`, `kernel-installer.sh`, the LTS-kernel option — has all been removed.) + +`build-pipewire-aptx.sh` is orphaned (not called by any script). + +## CI + +`.github/workflows/build-all.yml` is the entry point (PRs, weekly cron, manual dispatch). It calls `build-system.yml` (buildah build + push to GHCR; injects `config.env` into the env) then `cleanup.yml` (prunes old GHCR images). PRs get `pr-` tags; pushes get `` and dated tags. CI does an aggressive disk cleanup step first because the base image is large. diff --git a/Containerfile b/Containerfile index 6914c8d..6eb6134 100644 --- a/Containerfile +++ b/Containerfile @@ -1,30 +1,13 @@ ARG BASE_IMAGE="${BASE_IMAGE}" ARG FEDORA_VERSION="${FEDORA_VERSION}" -# ARG NVIDIA_VERSION="${NVIDIA_VERSION}" -ARG USE_LTS_KERNEL="${USE_LTS_KERNEL}" - -# Build NVIDIA drivers and other source packages - -# FROM ${BASE_IMAGE}:${FEDORA_VERSION} as builder -# ARG NVIDIA_VERSION="${NVIDIA_VERSION}" -# ARG USE_LTS_KERNEL="${USE_LTS_KERNEL}" -# ARG BUILDROOT=/build -# COPY build_files/ "${BUILDROOT}" -# RUN rpm-ostree cliwrap install-to-root / \ -# && "${BUILDROOT}"/scripts/build-nvidia-modules.sh # Build final image FROM ${BASE_IMAGE}:${FEDORA_VERSION} -# ARG NVIDIA_VERSION="${NVIDIA_VERSION}" -ARG USE_LTS_KERNEL="${USE_LTS_KERNEL}" ARG BUILDROOT=/build # Copy build scripts COPY build_files/ "${BUILDROOT}" -# Copy built modules from builder step -# COPY --from=builder /tmp/built /tmp/builder -# RUN ls -la /tmp/builder/nvidia # Copy configuration files to root COPY ./system_files/. / # Run installer and commit image diff --git a/Makefile b/Makefile index ccbe396..14ffdfc 100644 --- a/Makefile +++ b/Makefile @@ -17,13 +17,13 @@ container: rebase: @echo "Rebasing to local image: $(TARGET_IMAGE_NAME)..." - # rpm-ostree rebase ostree-unverified-image:oci-archive:/tmp/$(TARGET_IMAGE_NAME).tar.gz - bootc switch ostree-unverified-image:oci-archive:/tmp/$(TARGET_IMAGE_NAME).tar.gz + # rpm-ostree alternative: rpm-ostree rebase ostree-unverified-image:oci-archive:/tmp/$(TARGET_IMAGE_NAME).tar.gz + bootc switch --transport oci-archive /tmp/$(TARGET_IMAGE_NAME).tar.gz update: @echo "Updating to latest local image..." - # rpm-ostree update - bootc update + # rpm-ostree alternative: rpm-ostree upgrade + bootc upgrade clean: @echo "Cleaning up..." diff --git a/README.md b/README.md index 68a6d35..6193cbb 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,9 @@ [![build-all](https://github.com/perpixel/perpixel-silverblue/actions/workflows/build-all.yml/badge.svg)](https://github.com/perpixel/perpixel-silverblue/actions/workflows/build-all.yml) -Custom image of Fedora Silverblue for myself. Nvidia drivers built from source. +Custom image of Fedora Silverblue for myself. Built for AMD hardware (amdgpu / +Mesa / ROCm), with the COSMIC desktop and a curated package set layered on top +of the upstream Silverblue base. ### Project Structure @@ -11,22 +13,21 @@ Custom image of Fedora Silverblue for myself. Nvidia drivers built from source. - `Makefile`: Main entry point for building and managing the image. - `build.sh`: Wrapper script for `buildah` to build the image. - `Containerfile`: Container image definition (Dockerfile equivalent). -- `build_files/`: Scripts and playbooks used during the build. +- `build_files/`: Scripts used during the build. +- `system_files/`: Files copied verbatim onto `/` in the image. ### Configuration -The project is configured via `config.env`. You can modify the following variables: +The project is configured via `config.env`: - `TARGET_IMAGE_NAME`: Name of the resulting image. -- `BASE_IMAGE`: Upstream base image (e.g., Fedora Silverblue). +- `BASE_IMAGE`: Upstream base image (Fedora Silverblue). - `FEDORA_VERSION`: Version of Fedora to use. -- `USE_LTS_KERNEL`: Set to `true` to use the LTS kernel from COPR. -- `NVIDIA_VERSION`: Specific NVIDIA driver version to build. ### Customization -To add or remove packages, edit: -`build_files/playbooks/install-packages.ansible.yaml` +To add or remove packages, edit the `dnf install` / `dnf remove` lists in +`build_files/scripts/packages.sh`. ### Rebase from ghcr.io @@ -37,13 +38,6 @@ rpm-ostree rebase ostree-unverified-image:docker://ghcr.io/perpixel/ ### Local build ``` sh -make build -# Then rebase: -make rebase -``` - -### Kernel args - -``` sh -sudo rpm-ostree kargs --append=rd.driver.blacklist=nouveau --append=modprobe.blacklist=nouveau +make container # build the image locally +make rebase # build and rebase onto the local image ``` diff --git a/build.sh b/build.sh index d5018ff..ae0e54f 100755 --- a/build.sh +++ b/build.sh @@ -5,7 +5,6 @@ set -oex pipefail # Resolve script directory to locate config.env SCRIPT_DIR=$(dirname "$(readlink -f "$0")") CONFIG_FILE="${SCRIPT_DIR}/config.env" -NVIDIA_VERSION=$(./get_nvidia_versions.sh) # Load configuration if [ -f "${CONFIG_FILE}" ]; then @@ -23,8 +22,6 @@ buildah bud --pull=true \ --tag=oci-archive:/tmp/${TARGET_IMAGE_NAME}.tar.gz \ --build-arg BASE_IMAGE=${BASE_IMAGE} \ --build-arg FEDORA_VERSION=${FEDORA_VERSION} \ - --build-arg NVIDIA_VERSION=${NVIDIA_VERSION} \ - --build-arg USE_LTS_KERNEL=${USE_LTS_KERNEL} \ --no-cache \ --pull=always \ --volume $(pwd):/workspace:z \ diff --git a/build_files/scripts/build-nvidia-modules.sh b/build_files/scripts/build-nvidia-modules.sh deleted file mode 100755 index 4b48c4a..0000000 --- a/build_files/scripts/build-nvidia-modules.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -set -oeux pipefail - -ARCH="$(rpm -E '%_arch')" -BUILT_DIR=/tmp/built -KERNEL_VERSION=$(rpm -q --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}' kernel) - -# Import external functions -source "$(dirname "$0")"/functions.sh - -# Disable repos unwanted repos -disable-repo /etc/yum.repos.d/fedora-cisco-openh264.repo -disable-repo /etc/yum.repos.d/fedora-updates-testing.repo -# disable-repo /etc/yum.repos.d/fedora-updates-archive.repo - -mkdir -p /tmp/nvidia -cd /tmp/nvidia - -if [ ${USE_LTS_KERNEL} = true ]; then - source "$(dirname "$0")"/kernel-installer.sh --devel - KERNEL_VERSION=$(rpm -q --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}' kernel-longterm-devel) -else - # Install build requirements - # Getting kernel source from Koji in order to avoid build failure when silverblue image kernel is outdated - dnf install koji gcc-c++ kmod patch -y - koji download-build --arch="${ARCH}" kernel-"${KERNEL_VERSION}" - dnf install -y kernel-devel-*.rpm - rm -rf /tmp/nvidia/*.rpm -fi - -# Clone open NVIDIA kernel modules from Github -git clone --depth 1 --branch "${NVIDIA_VERSION}" https://github.com/NVIDIA/open-gpu-kernel-modules /tmp/nvidia/src - -# Build kernel modules -cd /tmp/nvidia/src -ln -s kernel-open kernel - -# Kernel patchs -# patch -p1 <"${BUILDROOT}"/patchs/nvidia/make_modeset_default.patch -# patch -p1 <"${BUILDROOT}"/patchs/nvidia/8ac26d3c66ea88b0f80504bdd1e907658b41609d.patch - -# Build -export CC="gcc -std=gnu17" -make modules -j"$(nproc)" KERNEL_UNAME="${KERNEL_VERSION}" SYSSRC="/usr/src/kernels/${KERNEL_VERSION}" IGNORE_CC_MISMATCH=1 IGNORE_XEN_PRESENCE=1 IGNORE_PREEMPT_RT_PRESENCE=1 - -# Copy modules - -mkdir -p "${BUILT_DIR}"/nvidia/"${KERNEL_VERSION}" -install -D -m 0755 ./kernel/nvidia*.ko ${BUILT_DIR}/nvidia/"${KERNEL_VERSION}" -ls -la ${BUILT_DIR}/nvidia/"${KERNEL_VERSION}" -cd / -rm -rf /tmp/nvidia diff --git a/build_files/scripts/kernel-installer.sh b/build_files/scripts/kernel-installer.sh deleted file mode 100755 index a92d015..0000000 --- a/build_files/scripts/kernel-installer.sh +++ /dev/null @@ -1,33 +0,0 @@ -# install longterm kernel from copr -# longterm kernel https://copr.fedorainfracloud.org/coprs/kwizart/kernel-longterm-6.6/ - -set -oeux pipefail - -DEV_ONLY=false - -while [[ $# -gt 0 ]]; do - case $1 in - --devel) - DEV_ONLY=true - shift - ;; - esac -done - -dnf5 copr enable kwizart/kernel-longterm-6.18 -y - -if [ "${DEV_ONLY}" == true ]; then - dnf install -y g++ kmod patch kernel-longterm-devel - KERNEL_VERSION=$(rpm -q --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}' kernel-longterm-devel) -else - rpm-ostree cliwrap install-to-root / - rpm -e kernel kernel-{core,modules-core,modules,modules-extra,tools,tools-libs} virtualbox-guest-additions - rpm-ostree install kernel-longterm kernel-longterm-{core,modules,modules-extra,modules-core} - # rpm-ostree override remove kernel kernel-{core,modules,modules-extra,modules-core,tools,tools-libs} \ - # --install kernel-longterm \ - # --install kernel-longterm-modules-core \ - # --install kernel-longterm-core \ - # --install kernel-longterm-modules \ - # --install kernel-longterm-modules-extra - KERNEL_VERSION=$(rpm -q --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}' kernel-longterm) -fi diff --git a/build_files/scripts/nvidia-installer.sh b/build_files/scripts/nvidia-installer.sh deleted file mode 100755 index c86d7c2..0000000 --- a/build_files/scripts/nvidia-installer.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -ARCH=$(rpm -E '%_arch') - -_libdir=/usr/lib64 -_datadir=/usr/share -_unitdir=/usr/lib/systemd/system -_systemd_util_dir=/usr/lib/systemd - -if [ ! -d "nvidia_tmp" ]; then - # download - curl -O https://download.nvidia.com/XFree86/Linux-"${ARCH}"/"${NVIDIA_VERSION}"/NVIDIA-Linux-"${ARCH}"-"${NVIDIA_VERSION}".run - - # extract - sh ./NVIDIA-Linux-"${ARCH}"-"${NVIDIA_VERSION}".run --extract-only --target nvidia_tmp -fi - -if [ ! -d "nvidia_tmp" ]; then - echo "failed to extract nvidia driver package does exist." - exit 1 -fi - -# Import external functions -source "$(dirname "$0")"/functions.sh -# Disable repos unwanted repos -disable-repo /etc/yum.repos.d/fedora-updates-testing.repo -disable-repo /etc/yum.repos.d/fedora-updates-archive.repo - -dnf install -y xorg-x11-server-devel - -pushd nvidia_tmp - -./nvidia-installer -s \ - --no-kernel-modules \ - --x-library-path=${_libdir} \ - --no-x-check \ - --no-check-for-alternate-installs \ - --skip-module-load \ - --skip-depmod \ - --no-rebuild-initramfs \ - --glvnd-egl-config-path=${_libdir} \ - --no-questions \ - --no-systemd \ - --no-kernel-module-source \ - --no-dkms \ - --log-file-name=/tmp/nvidia-installer.log - -cat /tmp/nvidia-installer.log - -# EGL loader -install -p -m 0644 -D 10_nvidia.json ${_datadir}/glvnd/egl_vendor.d/10_nvidia.json -install -p -m 0644 -D *_nvidia_*.json ${_datadir}/glvnd/egl_vendor.d/ - -mkdir -p ${_unitdir}/ -install -p -m 0644 systemd/system/*.service ${_unitdir}/ -install -p -m 0755 -D systemd/system-sleep/nvidia ${_systemd_util_dir}/system-sleep/nvidia -install -p -m 0644 -D nvidia-dbus.conf ${_datadir}/dbus-1/system.d/nvidia-dbus.conf - -systemctl enable nvidia-hibernate nvidia-resume nvidia-suspend -ldconfig - -mkdir -p /usr/share/pixmaps -install -pm 0644 nvidia-settings.png /usr/share/pixmaps/nvidia-settings.png - -# nvidia-persistenced -tar -xf nvidia-persistenced-init.tar.bz2 -pushd nvidia-persistenced-init -install -p -m 0644 ./systemd/nvidia-persistenced.service.template ${_unitdir}/nvidia-persistenced.service -sed -i -e "s/__USER__/root/" ${_unitdir}/nvidia-persistenced.service -systemctl enable nvidia-persistenced -popd - -popd - -curl -s -L https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo | - tee /etc/yum.repos.d/nvidia-container-toolkit.repo -dnf install nvidia-container-toolkit -y -# nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml - -exit 0 diff --git a/build_files/scripts/packages.sh b/build_files/scripts/packages.sh index 98d21be..14245fa 100644 --- a/build_files/scripts/packages.sh +++ b/build_files/scripts/packages.sh @@ -2,32 +2,12 @@ set -ouex pipefail -# Variables -WITH_NVIDIA=false - -# 1. Install longterm kernel -if [[ "${USE_LTS_KERNEL}" == "true" ]]; then - bash "${BUILDROOT}/scripts/kernel-installer.sh" - KERNEL_VERSION=$(rpm -q --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}' kernel-longterm) -else - # Get kernel version from standard kernel - KERNEL_VERSION=$(ls /usr/lib/modules/ | head -n 1) -fi - -# 2. Install Nvidia kernel modules -if [[ "${WITH_NVIDIA}" == "true" ]]; then - echo "Installing Nvidia kernel modules for ${KERNEL_VERSION}..." - mkdir -p "/usr/lib/modules/${KERNEL_VERSION}/kernel/drivers/video/" - cp /tmp/builder/nvidia/"${KERNEL_VERSION}"/*.ko "/usr/lib/modules/${KERNEL_VERSION}/kernel/drivers/video/" - depmod "${KERNEL_VERSION}" -fi - -# 3. Install RPM Fusion repo +# 1. Install RPM Fusion repo dnf install -y \ https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -# 4. Install new packages +# 2. Install new packages dnf install -y \ bootc \ distrobox \ @@ -37,18 +17,28 @@ dnf install -y \ ifuse \ inxi \ kitty \ - libva-nvidia-driver \ libva-utils \ libtree-sitter \ lm_sensors \ material-icons-fonts \ + mesa-va-drivers-freeworld \ opencl-filesystem \ + radeontop \ ripgrep \ steam \ stow \ + vdpauinfo \ + vulkan-tools \ xclip \ zsh +# 32-bit (multilib) graphics drivers for Steam / Proton gaming +dnf install -y \ + mesa-dri-drivers.i686 \ + mesa-vulkan-drivers.i686 \ + mesa-libGL.i686 \ + mesa-libEGL.i686 + dnf install -y \ cosmic-app-library \ cosmic-applets \ @@ -80,7 +70,7 @@ dnf install -y \ # dnf5 copr enable scottames/ghostty # dnf install ghostty -# 5. Install development packages +# 3. Install development packages dnf install -y \ binutils \ cmake \ @@ -94,18 +84,13 @@ dnf install -y \ patch \ rocm -# 6. Remove packages +# 4. Remove packages dnf remove -y \ firefox \ firefox-langpacks \ virtualbox-guest-additions -# 7. Install Nvidia drivers -if [[ "${WITH_NVIDIA}" == "true" ]]; then - bash "${BUILDROOT}/scripts/nvidia-installer.sh" -fi - -# 8. Cleanup +# 5. Cleanup rm -rf /tmp/* rm -rf /var/* dnf -y clean all diff --git a/config.env b/config.env index 61b58e4..6966612 100755 --- a/config.env +++ b/config.env @@ -1,5 +1,3 @@ TARGET_IMAGE_NAME=perpixel-silverblue BASE_IMAGE=quay.io/fedora-ostree-desktops/silverblue FEDORA_VERSION=44 -USE_LTS_KERNEL=false -NVIDIA_VERSION=595.58.03 diff --git a/get_nvidia_versions.sh b/get_nvidia_versions.sh deleted file mode 100755 index 579d170..0000000 --- a/get_nvidia_versions.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -URL="https://www.nvidia.com/en-us/drivers/unix/" - -# Fetch the page content and strip newlines -CONTENT=$(curl -s "$URL" | tr '\n' ' ') - -# Extract Linux x86_64/AMD64/EM64T Latest Production Branch Version -PRODUCTION_VERSION=$(echo "$CONTENT" | grep -oP 'Linux x86_64/AMD64/EM64T.*?Latest Production Branch Version:<\/span> \K[^<]+') - -# Output only the version for command substitution -echo "$PRODUCTION_VERSION" diff --git a/system_files/etc/environment b/system_files/etc/environment index 58e3d9e..cdf553c 100644 --- a/system_files/etc/environment +++ b/system_files/etc/environment @@ -1,15 +1,4 @@ -# Nvidia / Graphics -# GDK_GL=gles -# GBM_BACKEND=nvidia-drm -# __GLX_VENDOR_LIBRARY_NAME=nvidia -# __GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1 -# NVD_BACKEND=direct - -# HARDWARE ACCELERATION -# LIBVA_DRIVER_NAME=nvidia -# LIBVA_DRIVERS_PATH=/run/host/usr/lib64/dri - -# Firefox / Mozilla -# MOZ_DISABLE_RDD_SANDBOX=1 -# MOZ_X11_EGL=1 -# MOZ_LOG=PlatformDecoderModule:0 +# Hardware video acceleration (AMD / Mesa) +# radeonsi VA-API driver is provided by mesa-va-drivers-freeworld (RPM Fusion), +# which ships the codecs the stock Fedora package strips. Verify with `vainfo`. +LIBVA_DRIVER_NAME=radeonsi diff --git a/system_files/usr/lib/dracut/dracut.conf.d/10-nvidia.conf b/system_files/usr/lib/dracut/dracut.conf.d/10-nvidia.conf deleted file mode 100644 index 5b2d6db..0000000 --- a/system_files/usr/lib/dracut/dracut.conf.d/10-nvidia.conf +++ /dev/null @@ -1,2 +0,0 @@ -# force_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm " -# install_optional_items+=" /usr/lib/modprobe.d/nvidia.conf " diff --git a/system_files/usr/lib/modprobe.d/nvidia.conf b/system_files/usr/lib/modprobe.d/nvidia.conf deleted file mode 100644 index 2506b8a..0000000 --- a/system_files/usr/lib/modprobe.d/nvidia.conf +++ /dev/null @@ -1,27 +0,0 @@ -## Nouveau must be blacklisted here as well beside from the initrd to avoid a -## delayed loading (for example on Optimus laptops where the Nvidia card is not -## driving the main display). - -blacklist nouveau - -## Make a soft dependency for nvidia-uvm as adding the module loading to -## /usr/lib/modules-load.d/nvidia-uvm.conf for systemd consumption, makes the -## configuration file to be added to the initrd but not the module, throwing an -## error on plymouth about not being able to find the module. -## Ref: /usr/lib/dracut/modules.d/00systemd/module-setup.sh - -## Even adding the module is not the correct thing, as we don't want it to be -## included in the initrd, so use this configuration file to specify the -## dependency. -# softdep nvidia post: nvidia-uvm - -# options nvidia-drm modeset=1 -# options nvidia-drm fbdev=1 - -## Preserve all video memory allocations -## This changes the default video memory save/restore strategy to save and restore all video memory allocations. -## Also, the /proc/driver/nvidia/suspend power management mechanism (with a system management tool, such as systemd) -## is required for using this interface. - -# options nvidia NVreg_PreserveVideoMemoryAllocations=1 -# options nvidia NVreg_TemporaryFilePath=/var/tmp diff --git a/system_files/usr/lib/systemd/system/systemd-homed.service.d/nvidia-fix.conf b/system_files/usr/lib/systemd/system/systemd-homed.service.d/nvidia-fix.conf deleted file mode 100644 index 6b2bfb7..0000000 --- a/system_files/usr/lib/systemd/system/systemd-homed.service.d/nvidia-fix.conf +++ /dev/null @@ -1,5 +0,0 @@ -# /usr/lib/systemd/system/systemd-homed.service.d/nvidia-fix.conf -# - -# [Service] -# Environment="SYSTEMD_HOME_LOCK_FREEZE_SESSION=false" diff --git a/system_files/usr/lib/udev/rules.d/60-nvidia.rules b/system_files/usr/lib/udev/rules.d/60-nvidia.rules deleted file mode 100644 index f4290fe..0000000 --- a/system_files/usr/lib/udev/rules.d/60-nvidia.rules +++ /dev/null @@ -1,13 +0,0 @@ -# Device nodes are created by nvidia-modprobe, which is called by the nvidia DDX. -# In case the DDX is not started, the device nodes are never created, so call -# nvidia-modprobe in the udev rules to cover the Wayland/EGLStream and compute -# case without a started display. -# KERNEL=="nvidia", RUN+="/usr/bin/nvidia-modprobe" - -# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind -# ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto" -# ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto" - -# Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind -# ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on" -# ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="on"