Merge branch 'testing'

This commit is contained in:
Kyle Gospodnetich 2024-04-13 23:39:58 -07:00
commit f28af959a7
82 changed files with 786 additions and 511 deletions

View File

@ -30,7 +30,6 @@ on:
workflow_dispatch:
env:
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
KERNEL_VERSION: 6.7.11-201.fsync
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
@ -40,6 +39,7 @@ jobs:
push-ghcr:
name: Make
runs-on: ubuntu-22.04
continue-on-error: false
permissions:
contents: read
packages: write
@ -85,7 +85,7 @@ jobs:
- name: Matrix Variables
run: |
echo "AKMODS_FLAVOR=fsync" >> $GITHUB_ENV
echo "AKMODS_FLAVOR=fsync-lts" >> $GITHUB_ENV
echo "BASE_IMAGE_NAME=${{ matrix.base_image_name }}" >> $GITHUB_ENV
if [[ "${{ matrix.base_image_flavor }}" == "framework" ]]; then
@ -283,3 +283,12 @@ jobs:
if: github.event_name != 'pull_request'
run: |
echo "${{ toJSON(steps.push.outputs) }}"
build_iso:
name: build iso
needs: [push-ghcr]
if: github.ref_name == 'testing'
# Eventually would be nice for building images in PRs
#if: ${{ endsWith(github.event.pull_request.title, '[ISO]') }}
uses: ./.github/workflows/build_iso.yml
secrets: inherit

View File

@ -2,73 +2,157 @@ name: Build ISOs
on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- '.github/workflows/build_iso.yml'
env:
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-iso
cancel-in-progress: true
jobs:
build-iso:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
container:
image: fedora:${{ matrix.major_version }}
options: "--privileged"
volumes:
- "/:/host"
strategy:
fail-fast: false
matrix:
image_name: [bazzite, bazzite-nvidia, bazzite-gnome, bazzite-gnome-nvidia, bazzite-deck, bazzite-deck-gnome, bazzite-ally, bazzite-ally-gnome, bazzite-asus, bazzite-gnome-asus, bazzite-asus-nvidia, bazzite-gnome-asus-nvidia]
image_name:
- bazzite
- bazzite-nvidia
- bazzite-gnome
- bazzite-gnome-nvidia
- bazzite-deck
- bazzite-deck-gnome
- bazzite-ally
- bazzite-ally-gnome
- bazzite-asus
- bazzite-gnome-asus
- bazzite-asus-nvidia
- bazzite-gnome-asus-nvidia
major_version: [39]
image_tag: [stable]
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
- name: Checkout Repo
uses: actions/checkout@v4
- name: Set Image Tag
id: generate-tag
shell: bash
run: |
TAG="stable"
if [[ "${{ github.ref_name }}" == "testing" ]]; then
TAG="testing"
fi
# Would like to implement in the future. This will allow us to support image tags from a PR.
#if [[ github.event.number ]]; then
# TAG="pr-${{ github.event.number }}-${{ matrix.major_version }}"
#fi
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- name: Set EXTRA_BOOT_PARAMS
id: generate-extra-params
shell: bash
run: |
EXTRA_BOOT_PARAMS=""
if [[ "${{ matrix.image_name }}" == "bazzite-deck" || "${{ matrix.image_name }}" == "bazzite-deck-gnome" || "${{ matrix.image_name }}" == "bazzite-deck-budgie" ]]; then
if [[ "${{ matrix.image_name }}" =~ "deck" ]]; then
EXTRA_BOOT_PARAMS="inst.resolution=1280x800"
fi
echo "EXTRA_BOOT_PARAMS=$EXTRA_BOOT_PARAMS" >> $GITHUB_ENV
echo "extra-boot-params=${EXTRA_BOOT_PARAMS}" >> $GITHUB_OUTPUT
- name: Set Flatpaks Directory Shortname
id: generate-flatpak-dir-shortname
shell: bash
run: |
FLATPAK_DIR_SHORTNAME="scripts/kde_flatpaks"
if [[ "${{ matrix.image_name }}" =~ "gnome" ]]; then
FLATPAK_DIR_SHORTNAME="scripts/gnome_flatpaks"
fi
echo "flatpak-dir-shortname=${FLATPAK_DIR_SHORTNAME}" >> $GITHUB_OUTPUT
- name: Determine Flatpak Dependencies
id: flatpak_dependencies
shell: bash
run: |
set -ex
image="ghcr.io/ublue-os/${{ matrix.image_name }}:${{ steps.generate-tag.outputs.tag }}"
# Make temp space
TEMP_FLATPAK_INSTALL_DIR=$(mktemp -d -p ${{ github.workspace }} flatpak.XXX)
# Get list of refs from directory
FLATPAK_REFS_DIR=${{ github.workspace }}/${{ steps.generate-flatpak-dir-shortname.outputs.flatpak-dir-shortname }}
FLATPAK_REFS_DIR_LIST=$(cat ${FLATPAK_REFS_DIR}/* | tr '\n' ' ' )
# Generate install script
cat << EOF > ${TEMP_FLATPAK_INSTALL_DIR}/script.sh
cat /temp_flatpak_install_dir/script.sh
mkdir -p /flatpak/flatpak /flatpak/triggers
mkdir /var/tmp || true
chmod -R 1777 /var/tmp
flatpak config --system --set languages "*"
flatpak remote-add --system flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --system -y ${FLATPAK_REFS_DIR_LIST}
ostree refs --repo=\${FLATPAK_SYSTEM_DIR}/repo | grep '^deploy/' | grep -v 'org\.freedesktop\.Platform\.openh264' | sed 's/^deploy\///g' > /output/flatpaks_with_deps
EOF
docker run --rm --privileged \
--entrypoint bash \
-e FLATPAK_SYSTEM_DIR=/flatpak/flatpak \
-e FLATPAK_TRIGGERSDIR=/flatpak/triggers \
--volume ${FLATPAK_REFS_DIR}:/output \
--volume ${TEMP_FLATPAK_INSTALL_DIR}:/temp_flatpak_install_dir \
${image} /temp_flatpak_install_dir/script.sh
docker rmi ${image}
- name: Build ISOs
uses: ublue-os/isogenerator@1.0.9
uses: jasonn3/build-container-installer@v1.2.0
id: build
with:
ARCH: x86_64
IMAGE_NAME: ${{ matrix.image_name }}
IMAGE_REPO: ${{ env.IMAGE_REGISTRY }}
VARIANT: 'Kinoite'
VERSION: ${{ matrix.major_version }}
IMAGE_TAG: ${{ matrix.image_tag }}
SECURE_BOOT_KEY_URL: 'https://github.com/ublue-os/akmods/raw/main/certs/public_key.der'
ENROLLMENT_PASSWORD: 'ublue-os'
EXTRA_BOOT_PARAMS: ${{ env.EXTRA_BOOT_PARAMS }}
arch: x86_64
image_name: ${{ matrix.image_name }}
image_repo: ghcr.io/ublue-os
variant: 'Kinoite'
version: ${{ matrix.major_version }}
image_tag: ${{ steps.generate-tag.outputs.tag }}
secure_boot_key_url: 'https://github.com/ublue-os/akmods/raw/main/certs/public_key.der'
enrollment_password: 'ublue-os'
iso_name: ${{ matrix.image_name }}-${{ steps.generate-tag.outputs.tag }}.iso
enable_cache_dnf: "false"
enable_cache_skopeo: "false"
flatpak_remote_refs_dir: ${{ steps.generate-flatpak-dir-shortname.outputs.flatpak-dir-shortname }}
enable_flatpak_dependencies: "false"
extra_boot_params: ${{ steps.generate-extra-params.outputs.extra-boot-params }}
- name: Move ISOs to Upload Directory
id: upload-directory
shell: bash
run: |
ISO_UPLOAD_DIR=${{ github.workspace }}/upload
mkdir ${ISO_UPLOAD_DIR}
mv ${{ steps.build.outputs.iso_path }}/${{ steps.build.outputs.iso_name }} ${ISO_UPLOAD_DIR}
mv ${{ steps.build.outputs.iso_path }}/${{ steps.build.outputs.iso_name }}-CHECKSUM ${ISO_UPLOAD_DIR}
echo "iso-upload-dir=${ISO_UPLOAD_DIR}" >> $GITHUB_OUTPUT
- name: Upload ISOs and Checksum to Job Artifacts
if: github.event_name == 'pull_request'
if: github.ref_name == 'testing'
#if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.image_name }}-${{ matrix.image_tag }}-${{ matrix.major_version}}
path: ${{ steps.build.outputs.output-directory }}
name: ${{ matrix.image_name }}-${{ steps.generate-tag.outputs.tag }}-${{ matrix.major_version}}
path: ${{ steps.upload-directory.outputs.iso-upload-dir }}
if-no-files-found: error
retention-days: 0
compression-level: 0
overwrite: true
- name: Upload ISOs and Checksum to R2
if: github.event_name == 'workflow_dispatch'
if: github.event_name == 'workflow_dispatch' && github.ref_name == 'main'
shell: bash
env:
RCLONE_CONFIG_R2_TYPE: s3
@ -77,15 +161,17 @@ jobs:
RCLONE_CONFIG_R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
RCLONE_CONFIG_R2_REGION: auto
RCLONE_CONFIG_R2_ENDPOINT: ${{ secrets.R2_ENDPOINT }}
SOURCE_DIR: ${{ steps.build.outputs.output-directory }}
SOURCE_DIR: ${{ steps.upload-directory.outputs.iso-upload-dir }}
run: |
dnf install -y rclone
sudo apt-get update
sudo apt-get install -y rclone
rclone copy $SOURCE_DIR R2:bazzite
- name: Upload ISOs to archive.org
if: github.event_name == 'workflow_dispatch' && github.ref_name == 'main'
uses: qoijjj/internet-archive-upload@v7
with:
access-key: ${{ secrets.IA_ACCESS_KEY }}
secret-key: ${{ secrets.IA_SECRET_KEY }}
identifier: ${{ matrix.image_name }}
files: ${{ steps.build.outputs.output-directory }}
files: ${{ steps.upload-directory.outputs.iso-upload-dir }}

View File

@ -12,7 +12,7 @@ FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS bazzite
ARG IMAGE_NAME="${IMAGE_NAME:-bazzite}"
ARG IMAGE_VENDOR="${IMAGE_VENDOR:-ublue-os}"
ARG IMAGE_FLAVOR="${IMAGE_FLAVOR:-main}"
ARG AKMODS_FLAVOR="${AKMODS_FLAVOR:-fsync}"
ARG AKMODS_FLAVOR="${AKMODS_FLAVOR:-fsync-lts}"
ARG IMAGE_BRANCH="${IMAGE_BRANCH:-main}"
ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME:-kinoite}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-39}"
@ -41,14 +41,15 @@ RUN wget https://raw.githubusercontent.com/ublue-os/COPR-command/main/copr -O /u
wget https://copr.fedorainfracloud.org/coprs/sentry/switcheroo-control_discrete/repo/fedora-"${FEDORA_MAJOR_VERSION}"/sentry-switcheroo-control_discrete-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/_copr_sentry-switcheroo-control_discrete.repo && \
wget https://copr.fedorainfracloud.org/coprs/matte-schwartz/sunshine/repo/fedora-"${FEDORA_MAJOR_VERSION}"/matte-schwartz-sunshine-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/_copr_matte-schwartz-sunshine.repo && \
wget https://pkgs.tailscale.com/stable/fedora/tailscale.repo -O /etc/yum.repos.d/tailscale.repo && \
sed -i 's@gpgcheck=1@gpgcheck=0@g' /etc/yum.repos.d/tailscale.repo
sed -i 's@gpgcheck=1@gpgcheck=0@g' /etc/yum.repos.d/tailscale.repo && \
ostree container commit
# Install kernel-fsync
RUN wget https://copr.fedorainfracloud.org/coprs/sentry/kernel-fsync/repo/fedora-$(rpm -E %fedora)/sentry-kernel-fsync-fedora-$(rpm -E %fedora).repo -O /etc/yum.repos.d/_copr_sentry-kernel-fsync.repo && \
RUN wget https://copr.fedorainfracloud.org/coprs/sentry/kernel-ba/repo/fedora-$(rpm -E %fedora)/sentry-kernel-ba-fedora-$(rpm -E %fedora).repo -O /etc/yum.repos.d/_copr_sentry-kernel-ba.repo && \
rpm-ostree cliwrap install-to-root / && \
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:sentry:kernel-fsync \
--from repo=copr:copr.fedorainfracloud.org:sentry:kernel-ba \
kernel \
kernel-core \
kernel-modules \
@ -56,7 +57,8 @@ RUN wget https://copr.fedorainfracloud.org/coprs/sentry/kernel-fsync/repo/fedora
kernel-modules-extra \
kernel-uki-virt \
kernel-headers \
kernel-devel
kernel-devel && \
ostree container commit
# Setup firmware
RUN mkdir -p /tmp/linux-firmware-neptune && \
@ -91,10 +93,7 @@ RUN mkdir -p /tmp/linux-firmware-neptune && \
git clone https://gitlab.com/asus-linux/firmware.git --depth 1 /tmp/asus-firmware && \
cp -rf /tmp/asus-firmware/* /usr/lib/firmware/ && \
rm -rf /tmp/asus-firmware \
; fi
# Setup Surface devices
RUN if [[ "${IMAGE_FLAVOR}" =~ "surface" ]]; then \
; elif [[ "${IMAGE_FLAVOR}" =~ "surface" ]]; then \
wget https://pkg.surfacelinux.com/fedora/linux-surface.repo -P /etc/yum.repos.d && \
rpm-ostree override remove \
libwacom \
@ -103,7 +102,8 @@ RUN if [[ "${IMAGE_FLAVOR}" =~ "surface" ]]; then \
iptsd \
libwacom-surface \
libwacom-surface-data \
; fi
; fi && \
ostree container commit
# Add ublue packages, add needed negativo17 repo and then immediately disable due to incompatibility with RPMFusion
COPY --from=ghcr.io/ublue-os/akmods:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION} /rpms /tmp/akmods-rpms
@ -122,9 +122,9 @@ RUN sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo
/tmp/akmods-rpms/kmods/*bmi160*.rpm \
/tmp/akmods-rpms/kmods/*bmi260*.rpm \
/tmp/akmods-rpms/kmods/*bmi323*.rpm \
/tmp/akmods-rpms/kmods/*rtl8814au*.rpm \
/tmp/akmods-rpms/kmods/*ryzen-smu*.rpm && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \
ostree container commit
# Update packages that commonly cause build issues
RUN rpm-ostree override replace \
@ -218,7 +218,8 @@ RUN rpm-ostree override replace \
|| true && \
rpm-ostree override remove \
glibc32 \
|| true
|| true && \
ostree container commit
# Install Valve's patched Mesa, Pipewire & Bluez
# Install patched switcheroo control with proper discrete GPU support
@ -254,7 +255,8 @@ RUN rpm-ostree override remove \
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:sentry:switcheroo-control_discrete \
switcheroo-control
switcheroo-control && \
ostree container commit
# Remove unneeded packages
RUN rpm-ostree override remove \
@ -268,7 +270,8 @@ RUN rpm-ostree override remove \
rpm-ostree override remove \
tlp \
tlp-rdw \
|| true
|| true && \
ostree container commit
# Install new packages
RUN rpm-ostree install \
@ -306,7 +309,6 @@ RUN rpm-ostree install \
yad \
f3 \
pulseaudio-utils \
playerctl \
unrar \
lzip \
libxcrypt-compat \
@ -331,11 +333,11 @@ RUN rpm-ostree install \
cockpit-system \
cockpit-navigator \
cockpit-storaged \
wl-clipboard \
lsb_release && \
pip install --prefix=/usr topgrade && \
rpm-ostree install \
ublue-update && \
mkdir -p /usr/etc/xdg/autostart && \
echo "X-GNOME-Autostart-enabled=false" >> /usr/etc/xdg/autostart/sealertauto.desktop && \
sed -i '1s/^/[include]\npaths = ["\/etc\/ublue-os\/topgrade.toml"]\n\n/' /usr/share/ublue-update/topgrade-user.toml && \
sed -i 's/min_battery_percent.*/min_battery_percent = 20.0/' /usr/etc/ublue-update/ublue-update.toml && \
@ -345,7 +347,8 @@ RUN rpm-ostree install \
sed -i 's@Name=tuned-gui@Name=TuneD Manager@g' /usr/share/applications/tuned-gui.desktop && \
wget https://raw.githubusercontent.com/KyleGospo/steam-proton-mf-wmv/master/installcab.py -O /usr/bin/installcab && \
wget https://github.com/KyleGospo/steam-proton-mf-wmv/blob/master/install-mf-wmv.sh -O /usr/bin/install-mf-wmv && \
wget https://raw.githubusercontent.com/jlu5/icoextract/master/exe-thumbnailer.thumbnailer -O /usr/share/thumbnailers/exe-thumbnailer.thumbnailer
wget https://raw.githubusercontent.com/jlu5/icoextract/master/exe-thumbnailer.thumbnailer -O /usr/share/thumbnailers/exe-thumbnailer.thumbnailer && \
ostree container commit
# Install Steam & Lutris, plus supporting packages
# Remove Feral gamemode, System76 Scheduler supersedes this
@ -411,8 +414,7 @@ RUN rpm-ostree install \
mangohud.i686 \
vk_hdr_layer.x86_64 \
vk_hdr_layer.i686 \
gperftools-libs.i686 \
goverlay && \
gperftools-libs.i686 && \
if [[ ! "${IMAGE_FLAVOR}" =~ "surface" ]]; then \
rpm-ostree install \
obs-vkcapture.x86_64 \
@ -443,7 +445,8 @@ RUN rpm-ostree install \
mkdir -p /tmp/zluda && \
tar --strip-components 1 -xvzf /tmp/zluda.tar.gz -C /tmp/zluda && \
mv /tmp/zluda /usr/lib64/zluda && \
rm -f /tmp/zluda.tar.gz
rm -f /tmp/zluda.tar.gz && \
ostree container commit
# Configure KDE & GNOME
RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
@ -472,7 +475,6 @@ RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
kdeconnectd \
kdeplasma-addons \
rom-properties-kf5 \
qvtf \
joystickwake \
ptyxis && \
mkdir -p /tmp/kwin-system76-scheduler-integration && \
@ -493,7 +495,7 @@ RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nNoDisplay=true@g' /usr/share/applications/yad-icon-browser.desktop && \
rm -f /usr/share/kglobalaccel/org.kde.konsole.desktop && \
systemctl enable kde-sysmonitor-workaround.service \
; else \
; else \
rpm-ostree override replace \
--experimental \
--from repo=copr:copr.fedorainfracloud.org:kylegospo:gnome-vrr \
@ -530,7 +532,6 @@ RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
gnome-shell-extension-hotedge \
gnome-shell-extension-caffeine \
rom-properties-gtk3 \
pixbufloader-vtf \
openssh-askpass && \
rpm-ostree override remove \
gnome-software-rpm-ostree \
@ -542,7 +543,8 @@ RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nNoDisplay=true@g' /usr/share/applications/org.gnome.Terminal.desktop && \
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nNoDisplay=true@g' /usr/share/applications/gnome-system-monitor.desktop && \
systemctl enable dconf-update.service \
; fi
; fi && \
ostree container commit
# Install Gamescope, ROCM, and Waydroid on non-Nvidia images
RUN rpm-ostree install \
@ -555,11 +557,17 @@ RUN rpm-ostree install \
waydroid \
cage \
wlr-randr && \
sed -i~ -E 's/=.\$\(command -v (nft|ip6?tables-legacy).*/=/g' /usr/lib/waydroid/data/scripts/waydroid-net.sh
sed -i~ -E 's/=.\$\(command -v (nft|ip6?tables-legacy).*/=/g' /usr/lib/waydroid/data/scripts/waydroid-net.sh && \
ostree container commit
# Cleanup & Finalize
COPY system_files/shared /
RUN /tmp/image-info.sh && \
COPY system_files/overrides /
RUN wget https://raw.githubusercontent.com/ublue-os/bazzite/main/scripts/image-info.sh -O /tmp/image-info.sh && \
chmod +x /tmp/image-info.sh && \
/tmp/image-info.sh && \
wget https://raw.githubusercontent.com/ublue-os/bazzite/main/scripts/initramfs.sh -O /tmp/initramfs.sh && \
chmod +x /tmp/initramfs.sh && \
/tmp/initramfs.sh && \
rm -f /etc/profile.d/toolbox.sh && \
sed -i 's@/usr/bin/steam@/usr/bin/bazzite-steam@g' /usr/share/applications/steam.desktop && \
sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nNoDisplay=true@g' /usr/share/applications/fish.desktop && \
@ -625,7 +633,8 @@ RUN /tmp/image-info.sh && \
systemctl enable bazzite-hardware-setup.service && \
systemctl enable tailscaled.service && \
systemctl enable dev-hugepages1G.mount && \
systemctl enable joycond && \
systemctl enable joycond.service && \
systemctl enable custom-device-pollrates.service && \
systemctl --global enable bazzite-user-setup.service && \
systemctl --global enable podman.socket && \
systemctl --global enable systemd-tmpfiles-setup.service && \
@ -641,14 +650,6 @@ RUN /tmp/image-info.sh && \
sed -i 's@Exec=waydroid first-launch@Exec=/usr/bin/waydroid-launcher first-launch\nX-Steam-Library-Capsule=/usr/share/applications/Waydroid/capsule.png\nX-Steam-Library-Hero=/usr/share/applications/Waydroid/hero.png\nX-Steam-Library-Logo=/usr/share/applications/Waydroid/logo.png\nX-Steam-Library-StoreCapsule=/usr/share/applications/Waydroid/store-logo.png\nX-Steam-Controller-Template=Desktop@g' /usr/share/applications/Waydroid.desktop && \
wget https://raw.githubusercontent.com/KyleGospo/waydroid-scripts/main/waydroid-choose-gpu.sh -O /usr/bin/waydroid-choose-gpu && \
chmod +x /usr/bin/waydroid-choose-gpu && \
mkdir -p /usr/etc/default && \
rm -rf \
/tmp/* \
/var/* && \
mkdir -p /var/tmp && \
chmod -R 1777 /var/tmp && \
mkdir -p /var/lib/bluetooth && \
chmod -R 755 /var/lib/bluetooth && \
ostree container commit
FROM bazzite as bazzite-deck
@ -670,7 +671,8 @@ RUN sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_kylegospo-obs-vkcapture.repo && \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_kylegospo-wallpaper-engine-kde-plugin.repo && \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_hhd-dev-hhd.repo && \
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ycollet-audinux.repo
sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ycollet-audinux.repo && \
ostree container commit
# Configure KDE & GNOME
RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
@ -678,13 +680,14 @@ RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
steamdeck-kde-presets-desktop && \
rpm-ostree install \
steamdeck-kde-presets \
; else \
; else \
rpm-ostree install \
steamdeck-gnome-presets \
gnome-shell-extension-caribou-blocker \
sddm && \
wget https://raw.githubusercontent.com/doitsujin/dxvk/master/dxvk.conf -O /usr/etc/dxvk-example.conf \
; fi
; fi && \
ostree container commit
# Install new packages
# Dock updater - done manually due to proprietary parts preventing it from being on Copr
@ -717,7 +720,8 @@ RUN rpm-ostree install \
--depth 1 \
/tmp/jupiter-dock-updater-bin && \
mv -v /tmp/jupiter-dock-updater-bin/packaged/usr/lib/jupiter-dock-updater /usr/lib/jupiter-dock-updater && \
rm -rf /tmp/jupiter-dock-updater-bin
rm -rf /tmp/jupiter-dock-updater-bin && \
ostree container commit
# Install Steam Deck patched Wireplumber & UPower
RUN rpm-ostree override replace \
@ -726,7 +730,8 @@ RUN rpm-ostree override replace \
wireplumber \
wireplumber-libs \
upower \
upower-libs
upower-libs && \
ostree container commit
# Install Gamescope Session & Supporting changes
# Add bootstraplinux_ubuntu12_32.tar.xz used by gamescope-session (Thanks ChimeraOS! - https://chimeraos.org/)
@ -736,11 +741,13 @@ RUN wget https://steamdeck-packages.steamos.cloud/archlinux-mirror/jupiter-main/
rm -f /tmp/steam-jupiter.pkg.tar.zst && \
rpm-ostree install \
gamescope-session-plus \
gamescope-session-steam
gamescope-session-steam && \
ostree container commit
# Cleanup & Finalize
COPY system_files/shared /
RUN /tmp/image-info.sh && \
RUN wget https://raw.githubusercontent.com/ublue-os/bazzite/main/scripts/image-info.sh -O /tmp/image-info.sh && \
chmod +x /tmp/image-info.sh && \
/tmp/image-info.sh && \
mkdir -p "/usr/etc/xdg/autostart" && \
cp "/usr/share/applications/steam.desktop" "/usr/etc/xdg/autostart/steam.desktop" && \
sed -i 's@/usr/bin/bazzite-steam %U@/usr/bin/bazzite-steam -silent %U@g' /usr/etc/xdg/autostart/steam.desktop && \
@ -787,13 +794,6 @@ RUN /tmp/image-info.sh && \
systemctl disable batterylimit.service && \
rm -f /usr/etc/sddm.conf && \
rm -f /usr/etc/default/bazzite && \
rm -rf \
/tmp/* \
/var/* && \
mkdir -p /var/tmp && \
chmod -R 1777 /var/tmp && \
mkdir -p /var/lib/bluetooth && \
chmod -R 755 /var/lib/bluetooth && \
ostree container commit
FROM bazzite as bazzite-nvidia
@ -801,14 +801,13 @@ FROM bazzite as bazzite-nvidia
ARG IMAGE_NAME="${IMAGE_NAME:-bazzite-nvidia}"
ARG IMAGE_VENDOR="${IMAGE_VENDOR:-ublue-os}"
ARG IMAGE_FLAVOR="${IMAGE_FLAVOR:-nvidia}"
ARG AKMODS_FLAVOR="${AKMODS_FLAVOR:-fsync}"
ARG AKMODS_FLAVOR="${AKMODS_FLAVOR:-fsync-lts}"
ARG IMAGE_BRANCH="${IMAGE_BRANCH:-main}"
ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME:-kinoite}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-39}"
ARG NVIDIA_MAJOR_VERSION="550"
# Fetch NVIDIA driver
COPY --from=ghcr.io/ublue-os/akmods-nvidia:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION}-${NVIDIA_MAJOR_VERSION} /rpms /tmp/akmods-rpms
COPY system_files/nvidia/shared system_files/nvidia/${BASE_IMAGE_NAME} /
# Remove everything that doesn't work well with NVIDIA
@ -819,12 +818,15 @@ RUN rpm-ostree override remove \
if [[ "${BASE_IMAGE_NAME}" == "kinoite" ]]; then \
rpm-ostree override remove \
colord-kde \
; fi
; fi && \
ostree container commit
# Install NVIDIA driver
COPY --from=ghcr.io/ublue-os/akmods-nvidia:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION}-${NVIDIA_MAJOR_VERSION} /rpms /tmp/akmods-rpms
RUN wget https://raw.githubusercontent.com/ublue-os/hwe/main/nvidia-install.sh -O /tmp/nvidia-install.sh && \
chmod +x /tmp/nvidia-install.sh && \
IMAGE_NAME="${BASE_IMAGE_NAME}" RPMFUSION_MIRROR="" /tmp/nvidia-install.sh
IMAGE_NAME="${BASE_IMAGE_NAME}" RPMFUSION_MIRROR="" /tmp/nvidia-install.sh && \
ostree container commit
# Install Explicit Sync Patches
RUN wget https://copr.fedorainfracloud.org/coprs/gloriouseggroll/nvidia-explicit-sync/repo/fedora-$(rpm -E %fedora)/gloriouseggroll-nvidia-explicit-sync-fedora-$(rpm -E %fedora).repo?arch=x86_64 -O /etc/yum.repos.d/_copr_gloriouseggroll-nvidia-explicit-sync.repo && \
@ -836,18 +838,15 @@ RUN wget https://copr.fedorainfracloud.org/coprs/gloriouseggroll/nvidia-explicit
--experimental \
--from repo=copr:copr.fedorainfracloud.org:gloriouseggroll:nvidia-explicit-sync \
egl-wayland \
|| true
|| true && \
ostree container commit
# Cleanup & Finalize
RUN rm -rf \
/tmp/* \
/var/* && \
RUN wget https://raw.githubusercontent.com/ublue-os/bazzite/main/scripts/initramfs.sh -O /tmp/initramfs.sh && \
chmod +x /tmp/initramfs.sh && \
/tmp/initramfs.sh && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_gloriouseggroll-nvidia-explicit-sync.repo && \
rm -f /usr/share/vulkan/icd.d/nouveau_icd.*.json && \
rm -rf /usr/lib64/zluda && \
echo "import \"/usr/share/ublue-os/just/95-bazzite-nvidia.just\"" >> /usr/share/ublue-os/justfile && \
mkdir -p /var/tmp && \
chmod -R 1777 /var/tmp && \
mkdir -p /var/lib/bluetooth && \
chmod -R 755 /var/lib/bluetooth && \
ostree container commit

View File

@ -126,7 +126,6 @@ Variant designed for usage as an alternative to SteamOS on the Steam Deck, and f
- Applies SteamOS's kernel parameters.
- Color calibrated display profiles for matte and reflective Steam Deck screens included.
- Default-disabled power-user features, including:
- Service for low-risk undervolting of the Steam Deck via [RyzenAdj](https://github.com/FlyGoat/RyzenAdj) and [Ryzen SMU](https://gitlab.com/leogx9r/ryzen_smu), see `ryzenadj.service` and `/etc/default/ryzenadj`.
- Service for limiting the max charge level of the battery, see `batterylimit.service` and `/etc/default/batterylimit`. <sup><sub>(Works even when the device is off)</sub></sup>
- Built in support for display overclocking. For example, add `GAMESCOPE_OVERRIDE_REFRESH_RATE=40,70` to `/etc/environment`.
- Ability to use X11 on the desktop if desired by editing `/etc/default/desktop-wayland`.

View File

@ -1,101 +0,0 @@
ublue_variants:
- label: ublue-os/bazzite
ks: /kickstart/ublue-os.ks
flavors:
- label: bazzite
info: Bazzite
- label: ublue-os/bazzite-deck
ks: /kickstart/ublue-os-deck.ks
flavors:
- label: bazzite-deck
info: Bazzite (Steam Deck & HTPC Edition)
- label: ublue-os/bazzite-gnome
ks: /kickstart/ublue-os.ks
flavors:
- label: bazzite-gnome
info: Bazzite GNOME
- label: ublue-os/bazzite-deck-gnome
ks: /kickstart/ublue-os-deck.ks
flavors:
- label: bazzite-deck-gnome
info: Bazzite GNOME (Steam Deck & HTPC Edition)
- label: ublue-os/bazzite-nvidia
ks: /kickstart/ublue-os-nvidia.ks
flavors:
- label: bazzite-nvidia
info: Bazzite (For NVIDIA GPUs)
- label: ublue-os/bazzite-gnome-nvidia
ks: /kickstart/ublue-os-nvidia.ks
flavors:
- label: bazzite-gnome-nvidia
info: Bazzite GNOME (For NVIDIA GPUs)
- label: ublue-os/bazzite-asus
ks: /kickstart/ublue-os.ks
flavors:
- label: bazzite-asus
info: Bazzite (ASUS Laptop Edition)
- label: ublue-os/bazzite-asus-nvidia
ks: /kickstart/ublue-os.ks
flavors:
- label: bazzite-asus-nvidia
info: Bazzite (ASUS Laptop Edition for NVIDIA GPUs)
- label: ublue-os/bazzite-gnome-asus
ks: /kickstart/ublue-os.ks
flavors:
- label: bazzite-gnome-asus
info: Bazzite GNOME (ASUS Laptop Edition)
- label: ublue-os/bazzite-gnome-asus-nvidia
ks: /kickstart/ublue-os.ks
flavors:
- label: bazzite-gnome-asus-nvidia
info: Bazzite GNOME (ASUS Laptop Edition for NVIDIA GPUs)
- label: ublue-os/bazzite-ally
ks: /kickstart/ublue-os.ks
flavors:
- label: bazzite-ally
info: Bazzite (ASUS Ally Edition)
- label: ublue-os/bazzite-ally-gnome
ks: /kickstart/ublue-os.ks
flavors:
- label: bazzite-ally-gnome
info: Bazzite GNOME (ASUS Ally Edition)
- label: ublue-os/bazzite-framework
ks: /kickstart/ublue-os.ks
flavors:
- label: bazzite-framework
info: Bazzite (Framework Edition)
- label: ublue-os/bazzite-gnome-framework
ks: /kickstart/ublue-os.ks
flavors:
- label: bazzite-gnome-framework
info: Bazzite GNOME (Framework Edition)
- label: ublue-os/bazzite-framegame
ks: /kickstart/ublue-os.ks
flavors:
- label: bazzite-framegame
info: Bazzite (Framegame Edition)
- label: ublue-os/bazzite-framegame-gnome
ks: /kickstart/ublue-os.ks
flavors:
- label: bazzite-framegame-gnome
info: Bazzite GNOME (Framegame Edition)
- label: ublue-os/bazzite-surface
ks: /kickstart/ublue-os.ks
flavors:
- label: bazzite-surface
info: Bazzite (Surface Edition)
- label: ublue-os/bazzite-surface-nvidia
ks: /kickstart/ublue-os-nvidia.ks
flavors:
- label: bazzite-surface-nvidia
info: Bazzite (Surface Edition for NVIDIA GPUs)
- label: ublue-os/bazzite-gnome-surface
ks: /kickstart/ublue-os.ks
flavors:
- label: bazzite-gnome-surface
info: Bazzite GNOME (Surface Edition)
- label: ublue-os/bazzite-gnome-surface-nvidia
ks: /kickstart/ublue-os-nvidia.ks
flavors:
- label: bazzite-gnome-surface-nvidia
info: Bazzite GNOME (Surface Edition for NVIDIA GPUs)

View File

@ -0,0 +1,31 @@
app/org.mozilla.firefox/x86_64/stable
app/com.mattjakeman.ExtensionManager/x86_64/stable
app/io.github.fastrizwaan.WineZGUI/x86_64/stable
app/io.github.dvlv.boxbuddyrs/x86_64/stable
app/it.mijorus.gearlever/x86_64/stable
app/com.github.tchx84.Flatseal/x86_64/stable
app/io.github.flattool.Warehouse/x86_64/stable
app/io.missioncenter.MissionCenter/x86_64/stable
app/com.vysp3r.ProtonPlus/x86_64/stable
app/io.github.celluloid_player.Celluloid/x86_64/stable
app/org.gnome.Calculator/x86_64/stable
app/org.gnome.Calendar/x86_64/stable
app/org.gnome.Characters/x86_64/stable
app/org.gnome.Contacts/x86_64/stable
app/org.gnome.Evince/x86_64/stable
app/org.gnome.Logs/x86_64/stable
app/org.gnome.Loupe/x86_64/stable
app/org.gnome.NautilusPreviewer/x86_64/stable
app/org.gnome.TextEditor/x86_64/stable
app/org.gnome.Weather/x86_64/stable
app/org.gnome.baobab/x86_64/stable
app/org.gnome.clocks/x86_64/stable
app/org.gnome.font-viewer/x86_64/stable
runtime/org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/23.08
runtime/org.freedesktop.Platform.VulkanLayer.vkBasalt/x86_64/23.08
runtime/org.freedesktop.Platform.VulkanLayer.OBSVkCapture/x86_64/23.08
runtime/com.obsproject.Studio.Plugin.OBSVkCapture/x86_64/stable
runtime/com.obsproject.Studio.Plugin.Gstreamer/x86_64/stable
runtime/com.obsproject.Studio.Plugin.GStreamerVaapi/x86_64/stable
runtime/org.gtk.Gtk3theme.adw-gtk3/x86_64/3.22
runtime/org.gtk.Gtk3theme.adw-gtk3-dark/x86_64/3.22

View File

@ -0,0 +1,20 @@
app/org.mozilla.firefox/x86_64/stable
app/org.kde.gwenview/x86_64/stable
app/org.kde.okular/x86_64/stable
app/org.kde.kcalc/x86_64/stable
app/org.kde.haruna/x86_64/stable
app/org.kde.filelight/x86_64/stable
app/io.github.fastrizwaan.WineZGUI/x86_64/stable
app/io.github.dvlv.boxbuddyrs/x86_64/stable
app/it.mijorus.gearlever/x86_64/stable
app/com.github.tchx84.Flatseal/x86_64/stable
app/io.github.flattool.Warehouse/x86_64/stable
app/net.davidotek.pupgui2/x86_64/stable
runtime/org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/23.08
runtime/org.freedesktop.Platform.VulkanLayer.vkBasalt/x86_64/23.08
runtime/org.freedesktop.Platform.VulkanLayer.OBSVkCapture/x86_64/23.08
runtime/com.obsproject.Studio.Plugin.OBSVkCapture/x86_64/stable
runtime/com.obsproject.Studio.Plugin.Gstreamer/x86_64/stable
runtime/com.obsproject.Studio.Plugin.GStreamerVaapi/x86_64/stable
runtime/org.gtk.Gtk3theme.adw-gtk3/x86_64/3.22
runtime/org.gtk.Gtk3theme.adw-gtk3-dark/x86_64/3.22

View File

@ -0,0 +1,349 @@
diff --git a/src/drm.cpp b/src/drm.cpp
index c975bfd..686c9b0 100644
--- a/src/drm.cpp
+++ b/src/drm.cpp
@@ -1044,15 +1044,15 @@ static bool refresh_state( drm_t *drm )
crtc->has_vrr_enabled = crtc->props.contains( "VRR_ENABLED" );
if (!crtc->has_vrr_enabled)
drm_log.infof("CRTC %" PRIu32 " has no VRR_ENABLED support", crtc->id);
- crtc->has_valve1_regamma_tf = crtc->props.contains( "VALVE1_CRTC_REGAMMA_TF" );
- if (!crtc->has_valve1_regamma_tf)
- drm_log.infof("CRTC %" PRIu32 " has no VALVE1_CRTC_REGAMMA_TF support", crtc->id);
+ crtc->has_amd_regamma_tf = crtc->props.contains( "AMD_CRTC_REGAMMA_TF" );
+ if (!crtc->has_amd_regamma_tf)
+ drm_log.infof("CRTC %" PRIu32 " has no AMD_CRTC_REGAMMA_TF support", crtc->id);
crtc->current.active = crtc->initial_prop_values["ACTIVE"];
if (crtc->has_vrr_enabled)
drm->current.vrr_enabled = crtc->initial_prop_values["VRR_ENABLED"];
- if (crtc->has_valve1_regamma_tf)
- drm->current.output_tf = (drm_valve1_transfer_function) crtc->initial_prop_values["VALVE1_CRTC_REGAMMA_TF"];
+ if (crtc->has_amd_regamma_tf)
+ drm->current.output_tf = (amdgpu_transfer_function) crtc->initial_prop_values["AMD_CRTC_REGAMMA_TF"];
}
for (size_t i = 0; i < drm->planes.size(); i++) {
@@ -1060,7 +1060,7 @@ static bool refresh_state( drm_t *drm )
if (!get_object_properties(drm, plane->id, DRM_MODE_OBJECT_PLANE, plane->props, plane->initial_prop_values)) {
return false;
}
- plane->has_color_mgmt = plane->props.contains( "VALVE1_PLANE_BLEND_TF" );
+ plane->has_color_mgmt = plane->props.contains( "AMD_PLANE_BLEND_TF" );
}
return true;
@@ -1597,8 +1597,8 @@ void finish_drm(struct drm_t *drm)
add_crtc_property(req, &drm->crtcs[i], "CTM", 0);
if ( drm->crtcs[i].has_vrr_enabled )
add_crtc_property(req, &drm->crtcs[i], "VRR_ENABLED", 0);
- if ( drm->crtcs[i].has_valve1_regamma_tf )
- add_crtc_property(req, &drm->crtcs[i], "VALVE1_CRTC_REGAMMA_TF", 0);
+ if ( drm->crtcs[i].has_amd_regamma_tf )
+ add_crtc_property(req, &drm->crtcs[i], "AMD_CRTC_REGAMMA_TF", 0);
add_crtc_property(req, &drm->crtcs[i], "ACTIVE", 0);
}
for ( size_t i = 0; i < drm->planes.size(); i++ ) {
@@ -1617,22 +1617,22 @@ void finish_drm(struct drm_t *drm)
add_plane_property(req, plane, "rotation", DRM_MODE_ROTATE_0);
if (plane->props.count("alpha") > 0)
add_plane_property(req, plane, "alpha", 0xFFFF);
- if (plane->props.count("VALVE1_PLANE_DEGAMMA_TF") > 0)
- add_plane_property(req, plane, "VALVE1_PLANE_DEGAMMA_TF", DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT );
- if (plane->props.count("VALVE1_PLANE_HDR_MULT") > 0)
- add_plane_property(req, plane, "VALVE1_PLANE_HDR_MULT", 0x100000000ULL);
- if (plane->props.count("VALVE1_PLANE_SHAPER_TF") > 0)
- add_plane_property(req, plane, "VALVE1_PLANE_SHAPER_TF", DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT );
- if (plane->props.count("VALVE1_PLANE_SHAPER_LUT") > 0)
- add_plane_property(req, plane, "VALVE1_PLANE_SHAPER_LUT", 0 );
- if (plane->props.count("VALVE1_PLANE_LUT3D") > 0)
- add_plane_property(req, plane, "VALVE1_PLANE_LUT3D", 0 );
- if (plane->props.count("VALVE1_PLANE_BLEND_TF") > 0)
- add_plane_property(req, plane, "VALVE1_PLANE_BLEND_TF", DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT );
- if (plane->props.count("VALVE1_PLANE_BLEND_LUT") > 0)
- add_plane_property(req, plane, "VALVE1_PLANE_BLEND_LUT", 0 );
- if (plane->props.count("VALVE1_PLANE_CTM") > 0)
- add_plane_property(req, plane, "VALVE1_PLANE_CTM", 0 );
+ if (plane->props.count("AMD_PLANE_DEGAMMA_TF") > 0)
+ add_plane_property(req, plane, "AMD_PLANE_DEGAMMA_TF", AMDGPU_TRANSFER_FUNCTION_DEFAULT );
+ if (plane->props.count("AMD_PLANE_HDR_MULT") > 0)
+ add_plane_property(req, plane, "AMD_PLANE_HDR_MULT", 0x100000000ULL);
+ if (plane->props.count("AMD_PLANE_SHAPER_TF") > 0)
+ add_plane_property(req, plane, "AMD_PLANE_SHAPER_TF", AMDGPU_TRANSFER_FUNCTION_DEFAULT );
+ if (plane->props.count("AMD_PLANE_SHAPER_LUT") > 0)
+ add_plane_property(req, plane, "AMD_PLANE_SHAPER_LUT", 0 );
+ if (plane->props.count("AMD_PLANE_LUT3D") > 0)
+ add_plane_property(req, plane, "AMD_PLANE_LUT3D", 0 );
+ if (plane->props.count("AMD_PLANE_BLEND_TF") > 0)
+ add_plane_property(req, plane, "AMD_PLANE_BLEND_TF", AMDGPU_TRANSFER_FUNCTION_DEFAULT );
+ if (plane->props.count("AMD_PLANE_BLEND_LUT") > 0)
+ add_plane_property(req, plane, "AMD_PLANE_BLEND_LUT", 0 );
+ if (plane->props.count("AMD_PLANE_CTM") > 0)
+ add_plane_property(req, plane, "AMD_PLANE_CTM", 0 );
}
// We can't do a non-blocking commit here or else risk EBUSY in case the
// previous page-flip is still in flight.
@@ -2222,37 +2222,37 @@ struct LiftoffStateCacheEntryKasher
std::unordered_set<LiftoffStateCacheEntry, LiftoffStateCacheEntryKasher> g_LiftoffStateCache;
-static inline drm_valve1_transfer_function colorspace_to_plane_degamma_tf(GamescopeAppTextureColorspace colorspace)
+static inline amdgpu_transfer_function colorspace_to_plane_degamma_tf(GamescopeAppTextureColorspace colorspace)
{
switch ( colorspace )
{
default: // Linear in this sense is SRGB. Linear = sRGB image view doing automatic sRGB -> Linear which doesn't happen on DRM side.
case GAMESCOPE_APP_TEXTURE_COLORSPACE_SRGB:
- return DRM_VALVE1_TRANSFER_FUNCTION_SRGB;
+ return AMDGPU_TRANSFER_FUNCTION_SRGB_EOTF;
case GAMESCOPE_APP_TEXTURE_COLORSPACE_PASSTHRU:
case GAMESCOPE_APP_TEXTURE_COLORSPACE_SCRGB:
// Use LINEAR TF for scRGB float format as 80 nit = 1.0 in scRGB, which matches
// what PQ TF decodes to/encodes from.
// AMD internal format is FP16, and generally expected for 1.0 -> 80 nit.
// which just so happens to match scRGB.
- return DRM_VALVE1_TRANSFER_FUNCTION_LINEAR;
+ return AMDGPU_TRANSFER_FUNCTION_IDENTITY;
case GAMESCOPE_APP_TEXTURE_COLORSPACE_HDR10_PQ:
- return DRM_VALVE1_TRANSFER_FUNCTION_PQ;
+ return AMDGPU_TRANSFER_FUNCTION_PQ_EOTF;
}
}
-static inline drm_valve1_transfer_function colorspace_to_plane_shaper_tf(GamescopeAppTextureColorspace colorspace)
+static inline amdgpu_transfer_function colorspace_to_plane_shaper_tf(GamescopeAppTextureColorspace colorspace)
{
switch ( colorspace )
{
default:
case GAMESCOPE_APP_TEXTURE_COLORSPACE_SRGB:
- return DRM_VALVE1_TRANSFER_FUNCTION_SRGB;
+ return AMDGPU_TRANSFER_FUNCTION_SRGB_INV_EOTF;
case GAMESCOPE_APP_TEXTURE_COLORSPACE_SCRGB: // scRGB Linear -> PQ for shaper + 3D LUT
case GAMESCOPE_APP_TEXTURE_COLORSPACE_HDR10_PQ:
- return DRM_VALVE1_TRANSFER_FUNCTION_PQ;
+ return AMDGPU_TRANSFER_FUNCTION_PQ_INV_EOTF;
case GAMESCOPE_APP_TEXTURE_COLORSPACE_PASSTHRU:
- return DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT;
+ return AMDGPU_TRANSFER_FUNCTION_DEFAULT;
}
}
@@ -2403,8 +2403,8 @@ drm_prepare_liftoff( struct drm_t *drm, const struct FrameInfo_t *frameInfo, boo
if ( drm_supports_color_mgmt( drm ) )
{
- drm_valve1_transfer_function degamma_tf = colorspace_to_plane_degamma_tf( entry.layerState[i].colorspace );
- drm_valve1_transfer_function shaper_tf = colorspace_to_plane_shaper_tf( entry.layerState[i].colorspace );
+ amdgpu_transfer_function degamma_tf = colorspace_to_plane_degamma_tf( entry.layerState[i].colorspace );
+ amdgpu_transfer_function shaper_tf = colorspace_to_plane_shaper_tf( entry.layerState[i].colorspace );
if ( entry.layerState[i].ycbcr )
{
@@ -2416,27 +2416,27 @@ drm_prepare_liftoff( struct drm_t *drm, const struct FrameInfo_t *frameInfo, boo
//
// Doing LINEAR/DEFAULT here introduces banding so... this is the best way.
// (sRGB DEGAMMA does NOT work on YUV planes!)
- degamma_tf = DRM_VALVE1_TRANSFER_FUNCTION_BT709;
- shaper_tf = DRM_VALVE1_TRANSFER_FUNCTION_BT709;
+ degamma_tf = AMDGPU_TRANSFER_FUNCTION_BT709_OETF;
+ shaper_tf = AMDGPU_TRANSFER_FUNCTION_BT709_INV_OETF;
}
if (!g_bDisableDegamma)
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_DEGAMMA_TF", degamma_tf );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_DEGAMMA_TF", degamma_tf );
else
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_DEGAMMA_TF", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_DEGAMMA_TF", 0 );
if ( !g_bDisableShaperAnd3DLUT )
{
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_SHAPER_LUT", drm->pending.shaperlut_id[ ColorSpaceToEOTFIndex( entry.layerState[i].colorspace ) ] );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_SHAPER_TF", shaper_tf );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_LUT3D", drm->pending.lut3d_id[ ColorSpaceToEOTFIndex( entry.layerState[i].colorspace ) ] );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_SHAPER_LUT", drm->pending.shaperlut_id[ ColorSpaceToEOTFIndex( entry.layerState[i].colorspace ) ] );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_SHAPER_TF", shaper_tf );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_LUT3D", drm->pending.lut3d_id[ ColorSpaceToEOTFIndex( entry.layerState[i].colorspace ) ] );
// Josh: See shaders/colorimetry.h colorspace_blend_tf if you have questions as to why we start doing sRGB for BLEND_TF despite potentially working in Gamma 2.2 space prior.
}
else
{
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_SHAPER_LUT", 0 );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_SHAPER_TF", 0 );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_LUT3D", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_SHAPER_LUT", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_SHAPER_TF", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_LUT3D", 0 );
}
}
}
@@ -2444,25 +2444,25 @@ drm_prepare_liftoff( struct drm_t *drm, const struct FrameInfo_t *frameInfo, boo
{
if ( drm_supports_color_mgmt( drm ) )
{
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_DEGAMMA_TF", DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_SHAPER_LUT", 0 );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_SHAPER_TF", 0 );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_LUT3D", 0 );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_CTM", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_DEGAMMA_TF", AMDGPU_TRANSFER_FUNCTION_DEFAULT );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_SHAPER_LUT", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_SHAPER_TF", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_LUT3D", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_CTM", 0 );
}
}
if ( drm_supports_color_mgmt( drm ) )
{
if (!g_bDisableBlendTF && !bSinglePlane)
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_BLEND_TF", drm->pending.output_tf );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_BLEND_TF", drm->pending.output_tf );
else
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_BLEND_TF", DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_BLEND_TF", AMDGPU_TRANSFER_FUNCTION_DEFAULT );
if (frameInfo->layers[i].ctm != nullptr)
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_CTM", frameInfo->layers[i].ctm->blob );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_CTM", frameInfo->layers[i].ctm->blob );
else
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_CTM", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_CTM", 0 );
}
}
else
@@ -2474,12 +2474,12 @@ drm_prepare_liftoff( struct drm_t *drm, const struct FrameInfo_t *frameInfo, boo
if ( drm_supports_color_mgmt( drm ) )
{
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_DEGAMMA_TF", DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_SHAPER_LUT", 0 );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_SHAPER_TF", 0 );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_LUT3D", 0 );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_BLEND_TF", DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT );
- liftoff_layer_set_property( drm->lo_layers[ i ], "VALVE1_PLANE_CTM", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_DEGAMMA_TF", AMDGPU_TRANSFER_FUNCTION_DEFAULT );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_SHAPER_LUT", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_SHAPER_TF", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_LUT3D", 0 );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_BLEND_TF", AMDGPU_TRANSFER_FUNCTION_DEFAULT );
+ liftoff_layer_set_property( drm->lo_layers[ i ], "AMD_PLANE_CTM", 0 );
}
}
}
@@ -2575,17 +2575,17 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI
if ( !g_bDisableRegamma && !bSinglePlane )
{
drm->pending.output_tf = g_bOutputHDREnabled
- ? DRM_VALVE1_TRANSFER_FUNCTION_PQ
- : DRM_VALVE1_TRANSFER_FUNCTION_SRGB;
+ ? AMDGPU_TRANSFER_FUNCTION_PQ_EOTF
+ : AMDGPU_TRANSFER_FUNCTION_SRGB_EOTF;
}
else
{
- drm->pending.output_tf = DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT;
+ drm->pending.output_tf = AMDGPU_TRANSFER_FUNCTION_DEFAULT;
}
}
else
{
- drm->pending.output_tf = DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT;
+ drm->pending.output_tf = AMDGPU_TRANSFER_FUNCTION_DEFAULT;
}
uint32_t flags = DRM_MODE_ATOMIC_NONBLOCK;
@@ -2666,9 +2666,9 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI
if (ret < 0)
return ret;
}
- if (crtc->has_valve1_regamma_tf)
+ if (crtc->has_amd_regamma_tf)
{
- int ret = add_crtc_property(drm->req, crtc, "VALVE1_CRTC_REGAMMA_TF", 0);
+ int ret = add_crtc_property(drm->req, crtc, "AMD_CRTC_REGAMMA_TF", 0);
if (ret < 0)
return ret;
}
@@ -2719,9 +2719,9 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI
return ret;
}
- if (drm->crtc->has_valve1_regamma_tf)
+ if (drm->crtc->has_amd_regamma_tf)
{
- ret = add_crtc_property(drm->req, drm->crtc, "VALVE1_CRTC_REGAMMA_TF", drm->pending.output_tf);
+ ret = add_crtc_property(drm->req, drm->crtc, "AMD_CRTC_REGAMMA_TF", drm->pending.output_tf);
if (ret < 0)
return ret;
}
@@ -2763,9 +2763,9 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI
return ret;
}
- if ( drm->crtc->has_valve1_regamma_tf && drm->pending.output_tf != drm->current.output_tf )
+ if ( drm->crtc->has_amd_regamma_tf && drm->pending.output_tf != drm->current.output_tf )
{
- int ret = add_crtc_property(drm->req, drm->crtc, "VALVE1_CRTC_REGAMMA_TF", drm->pending.output_tf );
+ int ret = add_crtc_property(drm->req, drm->crtc, "AMD_CRTC_REGAMMA_TF", drm->pending.output_tf );
if (ret < 0)
return ret;
}
diff --git a/src/drm.hpp b/src/drm.hpp
index 6810797..bc0befb 100644
--- a/src/drm.hpp
+++ b/src/drm.hpp
@@ -150,7 +150,7 @@ struct crtc {
bool has_degamma_lut;
bool has_ctm;
bool has_vrr_enabled;
- bool has_valve1_regamma_tf;
+ bool has_amd_regamma_tf;
struct {
bool active;
@@ -212,19 +212,22 @@ struct fb {
std::atomic< uint32_t > n_refs;
};
-enum drm_valve1_transfer_function {
- DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT,
-
- DRM_VALVE1_TRANSFER_FUNCTION_SRGB,
- DRM_VALVE1_TRANSFER_FUNCTION_BT709,
- DRM_VALVE1_TRANSFER_FUNCTION_PQ,
- DRM_VALVE1_TRANSFER_FUNCTION_LINEAR,
- DRM_VALVE1_TRANSFER_FUNCTION_UNITY,
- DRM_VALVE1_TRANSFER_FUNCTION_HLG,
- DRM_VALVE1_TRANSFER_FUNCTION_GAMMA22,
- DRM_VALVE1_TRANSFER_FUNCTION_GAMMA24,
- DRM_VALVE1_TRANSFER_FUNCTION_GAMMA26,
- DRM_VALVE1_TRANSFER_FUNCTION_MAX,
+enum amdgpu_transfer_function {
+ AMDGPU_TRANSFER_FUNCTION_DEFAULT,
+ AMDGPU_TRANSFER_FUNCTION_SRGB_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_BT709_INV_OETF,
+ AMDGPU_TRANSFER_FUNCTION_PQ_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_IDENTITY,
+ AMDGPU_TRANSFER_FUNCTION_GAMMA22_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_GAMMA24_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_GAMMA26_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_SRGB_INV_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_BT709_OETF,
+ AMDGPU_TRANSFER_FUNCTION_PQ_INV_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_GAMMA22_INV_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_GAMMA24_INV_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_GAMMA26_INV_EOTF,
+ AMDGPU_TRANSFER_FUNCTION_COUNT
};
struct drm_t {
@@ -267,7 +270,7 @@ struct drm_t {
uint32_t shaperlut_id[ EOTF_Count ];
enum drm_screen_type screen_type = DRM_SCREEN_TYPE_INTERNAL;
bool vrr_enabled = false;
- drm_valve1_transfer_function output_tf = DRM_VALVE1_TRANSFER_FUNCTION_DEFAULT;
+ amdgpu_transfer_function output_tf = AMDGPU_TRANSFER_FUNCTION_DEFAULT;
} current, pending;
bool wants_vrr_enabled = false;

View File

@ -28,15 +28,13 @@ sleep 1
# Debug: Get current outputs
kscreen-doctor --outputs 2>&1 | tee -a /tmp/bazrotfix.log
# Fix default scale on for Steam Deck hardware
if /usr/libexec/hardware/valve-hardware; then
kscreen-doctor output.1.scale.1.00 2>&1 | tee -a /tmp/bazrotfix.log
fi
# Fix desktop orientation
# Rotation options: right, normal, left, inverted
echo $(date '+%Y-%m-%d %H:%M:%S') Fixing desktop orientation... | tee -a /tmp/bazrotfix.log
if [[ ! -z "$IS_GAMEMODE" ]]; then
if /usr/libexec/hardware/valve-hardware; then
# Fix default scale on for Steam Deck hardware
kscreen-doctor output.1.scale.1.00 2>&1 | tee -a /tmp/bazrotfix.log
elif [[ ! -z "$IS_GAMEMODE" ]]; then
kscreen-doctor output.1.rotation.normal 2>&1 | tee -a /tmp/bazrotfix.log
elif [[ ":83E1:Loki Max:AIR Plus:" =~ ":$SYS_ID:" ]]; then
kscreen-doctor output.1.rotation.left 2>&1 | tee -a /tmp/bazrotfix.log

View File

@ -26,7 +26,10 @@ done
if command -v ublue-update > /dev/null; then
if [ -n "${CHECK}" ]; then
if [ ! -f '/etc/gamemode-update-check' ]; then
touch /etc/gamemode-update-check
exit 7 # Skip the first update to simplify new installs.
elif [ -n "${CHECK}" ]; then
if [ -f '/tmp/upgrade-installed' ]; then
exit 7 # Upgrade already installed
else

View File

@ -1,8 +0,0 @@
# https://github.com/NGnius/PowerTools/issues/84#issuecomment-1482736698
# https://www.amd.com/system/files/documents/faq-curve-optimizer.pdf
# Expect your UV to be 3-5x your set curve value. IE: -5 = -15mv to -25mv
# 0x100000 - 5 (Range: -30, 30)
UNDERVOLT_AMOUNT=0xFFFFB
# WARNING: As with any undervolt exercise caution.
# There is no guarantee you won't damage your hardware.
# USE AT YOUR OWN RISK.

View File

@ -1,11 +0,0 @@
[Unit]
Description=CPU Curve Undervolt for Steam Deck
[Service]
Type=oneshot
EnvironmentFile=-/etc/default/%p
ExecStartPre=/usr/bin/sleep 10
ExecStart=/usr/bin/ryzenadj --set-coall=${UNDERVOLT_AMOUNT}
[Install]
WantedBy=multi-user.target suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target ac.target battery.target

View File

@ -0,0 +1,2 @@
# Fixes a bug that causes battery drain on the ASUS Ally when the device is fully powered off
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{idVendor}=="1c7a", ATTR{idProduct}=="0588", ATTR{power/control}="auto"

View File

@ -1,2 +1,2 @@
# Lenovo Legion Go
# Lenovo Legion Go Controller
ACTION=="add", ATTRS{idVendor}=="17ef", ATTRS{idProduct}=="6182", RUN+="/sbin/modprobe xpad" RUN+="/bin/sh -c 'echo 17ef 6182 > /sys/bus/usb/drivers/xpad/new_id'"

View File

@ -1,22 +0,0 @@
# Anything commented out with # on a new line will be ignored
# These files follow the "rpm-ostree initramfs" syntax, please consult
# "rpm-ostree initramfs --help" for more information
#
# You can do 1 initramfs argument per line or do them all in 1 line.
# If you need to just add drivers to dracut, you should instead just add
# config files for dracut into /etc/dracut.conf.d/ and trigger an initramfs
# rebuild using "sudo touch /etc/bazzite/initramfs/rebuild" which
# will rebuild the initramfs on next boot using bazzite-hardware-setup.
# Documentation: https://universal-blue.discourse.group/docs?topic=399
#
# NOTE: If you need to add files to initramfs (like modprobe files),
# please add them to a .conf file in /etc/dracut.conf.d/
# with the line (spaces before and after paths are important!)
# install_items+=" /path/to/file1 /path/to/file2 "
#
# Multiline Example:
#--arg="--add-drivers"
#--arg="vfio vfio_iommu_type1 vfio-pci"
#
# Single Line Example:
#--arg="--add-drivers" --arg="vfio vfio_iommu_type1 vfio-pci

View File

@ -0,0 +1,29 @@
#!/usr/bin/bash
set -m
# Gather device poll rate settings from /etc/custom-device-pollrates/custom-device-pollrates.conf
DEVICES=$(grep -v '^\s*$\|^\s*\#' /etc/custom-device-pollrates/custom-device-pollrates.conf | paste -sd, -)
# Set new polling rate for devices
echo "$DEVICES" | sudo tee /sys/module/usbcore/parameters/interrupt_interval_override > /dev/null
# Reload all USB devices
for xhci in /sys/bus/pci/drivers/?hci_hcd ; do
if ! cd $xhci ; then
echo Failed to change directory to $xhci
exit 1
fi
echo Resetting devices from $xhci...
for i in ????:??:??.? ; do
echo -n "$i" > unbind
echo -n "$i" > bind
done
sleep 1
done

View File

@ -0,0 +1,25 @@
# Format:
# vendorid:deviceid:rate
#
# Polling Rates:
# 1=1000Hz,2=500Hz,4=250Hz,8=125Hz
#
# Ex (PS5 DualSense, 1000Mhz polling rate):
# 054c:0ce6:1
#
# One entry per line
#
#
# To allow these devices to have custom
# pollrates, uncomment the device or alternatively
# add a new device configuration line, then restart
# the service with:
#
# sudo systemctl restart custom-device-pollrates.service
# -------------SONY-------------
# DS4
#054c:09cc:1
# DS5
#054c:0ce6:1
# -------------SONY-------------

View File

@ -1 +0,0 @@
XDG_DATA_DIRS="$HOME/.nix-profile/share:/nix/var/nix/profiles/default/share:$XDG_DATA_DIRS"

View File

@ -0,0 +1 @@
compress="zstd"

View File

@ -0,0 +1 @@
add_dracutmodules+=" fido2 tpm2-tss pkcs11 pcsc "

View File

@ -0,0 +1,10 @@
[Unit]
Description=Set custom polling rates for specific devices
[Service]
Type=simple
ExecStart=/usr/bin/bash /usr/bin/custom-device-pollrates
[Install]
WantedBy=multi-user.target

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# SCRIPT VERSION
VER=22
VER=23
VER_FILE="/etc/bazzite/flatpak_manager_version"
VER_RAN=$(cat $VER_FILE)
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
@ -22,24 +22,6 @@ if [[ -f $VER_FILE && $VER = $VER_RAN ]]; then
fi
fi
# Opt out of and remove Fedora's flatpak repo
if grep -qz 'fedora' <<< $(flatpak remotes); then
/usr/lib/fedora-third-party/fedora-third-party-opt-out
/usr/bin/fedora-third-party disable
flatpak remote-delete fedora --force
fi
# Ensure Flathub is enabled
flatpak remote-add --if-not-exists --system flathub /usr/etc/flatpak/remotes.d/flathub.flatpakrepo
flatpak remote-modify --system --enable flathub
# Installed flatpaks
FLATPAK_LIST=$(flatpak list --columns=application)
# Flatpak list files
INSTALL_LIST_FILE="/usr/share/ublue-os/bazzite/flatpak/install"
REMOVE_LIST_FILE="/usr/share/ublue-os/bazzite/flatpak/remove"
# Flatpak theming support
flatpak override \
--filesystem=xdg-config/gtk-4.0:ro \
@ -98,28 +80,11 @@ mkdir -p /var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/x86_64/stab
rm -f /var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/x86_64/stable/defaults/pref/*bazzite*.js
/usr/bin/cp -rf /usr/share/ublue-os/firefox-config/* /var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/x86_64/stable/defaults/pref/
# Install flatpaks in list
if [[ -f $INSTALL_LIST_FILE ]]; then
if [[ -n $FLATPAK_LIST ]]; then
INSTALL_LIST=$(echo $FLATPAK_LIST | grep -vf - $INSTALL_LIST_FILE)
else
INSTALL_LIST=$(cat $INSTALL_LIST_FILE)
fi
if [[ -n $INSTALL_LIST ]]; then
if ! flatpak install --system --noninteractive flathub ${INSTALL_LIST[@]}; then
# exit on error
exit 1
fi
fi
fi
# Update Flatpaks
# Use until yafti rework is done
flatpak --system update -y
# Remove flatpaks in list once
if [[ ! -f $VER_FILE && -f $REMOVE_LIST_FILE ]]; then
REMOVE_LIST=$(echo $FLATPAK_LIST | grep -f - $REMOVE_LIST_FILE)
if [[ -n $REMOVE_LIST ]]; then
flatpak remove --system --noninteractive ${REMOVE_LIST[@]}
fi
fi
notify-send "Welcome to Bazzite" "Your computer is ready!" --app-name="Flatpak Manager Service" -u NORMAL
mkdir -p /etc/bazzite
echo $VER > $VER_FILE

View File

@ -7,7 +7,7 @@ IMAGE_FLAVOR=$(jq -r '."image-flavor"' < $IMAGE_INFO)
FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO)
# SCRIPT VERSION
HWS_VER=36
HWS_VER=37
HWS_VER_FILE="/etc/bazzite/hws_version"
HWS_VER_RAN=$(cat $HWS_VER_FILE)
@ -21,89 +21,12 @@ KNOWN_IMAGE_FLAVOR=$(cat $KNOWN_IMAGE_FLAVOR_FILE)
KNOWN_FEDORA_VERSION_FILE="/etc/bazzite/fedora_version"
KNOWN_FEDORA_VERSION=$(cat $KNOWN_FEDORA_VERSION_FILE)
# INITRAMFS CONFIG
INITRAMFS_DIR="/etc/bazzite/initramfs"
INITRAMFS_REBUILD_TRIGGER="$INITRAMFS_DIR/rebuild"
INITRAMFS_BAZZITE_ARG_FILE="$INITRAMFS_DIR/hardware-setup.args"
INITRAMFS_BAZZITE_ARGS=$(cat $INITRAMFS_BAZZITE_ARG_FILE)
INITRAMFS_CUSTOM_ARGS_DIR="$INITRAMFS_DIR/args.d"
INITRAMFS_CUSTOM_ARGS=""
# If the /etc/bazzite/initramfs/args.d dir exists
if [[ -d "$INITRAMFS_CUSTOM_ARGS_DIR" ]]; then
# Grab all the content of the files (minus comments) and join them together with spaces
INITRAMFS_CUSTOM_ARGS=$(grep -RvP "^(#|$)" $INITRAMFS_CUSTOM_ARGS_DIR/ | sort | perl -pe 's/(^$INITRAMFS_CUSTOM_ARGS_DIR\/.+:|\\\n$)//g' | tr '\n' ' ')
fi
# If no rebuild is requested
if [[ ! -f $INITRAMFS_REBUILD_TRIGGER ]]; then
# RUN REMAINDER OF SCRIPT ONLY IF UPDATED
if [[ -f $HWS_VER_FILE && $HWS_VER = "$HWS_VER_RAN" ]]; then
if [[ -f $KNOWN_IMAGE_NAME_FILE && -f $KNOWN_IMAGE_FLAVOR_FILE && -f $KNOWN_FEDORA_VERSION_FILE && -f $KNOWN_IMAGE_BRANCH_FILE ]]; then
# Run script if image has been rebased
if [[ $IMAGE_NAME = "$KNOWN_IMAGE_NAME" && $IMAGE_FLAVOR = "$KNOWN_IMAGE_FLAVOR" && $FEDORA_VERSION = "$KNOWN_FEDORA_VERSION" && $IMAGE_BRANCH = "$KNOWN_IMAGE_BRANCH" ]]; then
echo "Hardware setup v$HWS_VER has already run. Exiting..."
exit 0
fi
fi
fi
else
# REMOVE REBUILD TRIGGER TO AVOID INFINITE BOOT LOOP!
rm $INITRAMFS_REBUILD_TRIGGER
# Rebuild current initramfs (this will add any new configs added to /etc/dracut.conf.d/) then reboot
echo "Initramfs rebuild triggered, using: $INITRAMFS_BAZZITE_ARGS $INITRAMFS_CUSTOM_ARGS"
plymouth display-message --text="Updating initramfs - Please wait, this may take a while" || true
rpm-ostree initramfs --enable "${INITRAMFS_BAZZITE_ARGS} ${INITRAMFS_CUSTOM_ARGS}" --reboot
exit 0
fi
# GLOBAL
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
MINIMUM_FREE_ZRAM=$(awk '/MemTotal/ {printf "%.0f", $2 * 0.01}' /proc/meminfo)
CURRENT_FREE_ZRAM=$(sysctl vm.min_free_kbytes | awk '{print $3}')
KARGS=$(rpm-ostree kargs)
NEEDED_KARGS=()
INITRAMFS=$(rpm-ostree initramfs)
NEEDED_INITRAMFS=("/etc/crypttab")
NEEDS_INITRAMFS_APPLICATION=false
# INITRAMFS
echo "Current initramfs: $INITRAMFS"
if [[ $IMAGE_FLAVOR =~ "nvidia" ]]; then
NEEDED_INITRAMFS+=("/usr/lib/modprobe.d/nvidia.conf")
else
NEEDED_INITRAMFS+=("/etc/modprobe.d/amdgpu.conf")
fi
if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegame" ]]; then
NEEDED_INITRAMFS+=("/etc/modprobe.d/deck-blacklist.conf")
fi
for INITRAMFS_ARG in ${NEEDED_INITRAMFS[@]}; do
if [[ ! $INITRAMFS =~ "$INITRAMFS_ARG" ]]; then
NEEDS_INITRAMFS_APPLICATION=true
fi
done
# If there is nothing in INITRAMFS_BAZZITE_ARGS
if [[ ! $INITRAMFS_BAZZITE_ARGS ]]; then
# Make sure we will have /etc/bazzite/initramfs/bazzite.args for the future
mkdir -p /etc/bazzite/initramfs/args.d
echo "--arg=\"-I ${NEEDED_INITRAMFS[*]}\"" > $INITRAMFS_BAZZITE_ARG_FILE
INITRAMFS_BAZZITE_ARGS=$(cat $INITRAMFS_BAZZITE_ARG_FILE)
fi
if $NEEDS_INITRAMFS_APPLICATION; then
echo "Found needed initramfs changes, applying the following: ${NEEDED_INITRAMFS[*]}"
echo "--arg=\"-I ${NEEDED_INITRAMFS[*]}\"" > $INITRAMFS_BAZZITE_ARG_FILE
INITRAMFS_BAZZITE_ARGS=$(cat $INITRAMFS_BAZZITE_ARG_FILE)
echo "Building initramfs with following custom args: $INITRAMFS_CUSTOM_ARGS"
plymouth display-message --text="Updating initramfs - Please wait, this may take a while" || true
rpm-ostree initramfs --enable "${INITRAMFS_BAZZITE_ARGS} ${INITRAMFS_CUSTOM_ARGS}"
else
echo "No initramfs changes needed"
fi
# KERNEL ARGUMENTS
echo "Current kargs: $KARGS"
@ -183,7 +106,7 @@ if [[ $KARGS =~ "nomodeset" ]]; then
NEEDED_KARGS+=("--delete-if-present=nomodeset")
fi
if [[ ! $KARGS =~ "gpu_sched.sched_policy" ]]; then
if [[ ! $KARGS =~ "gpu_sched.sched_policy" && ! $IMAGE_FLAVOR =~ "nvidia" ]]; then
echo "Fixing GPU scheduler default"
NEEDED_KARGS+=("--append-if-missing=gpu_sched.sched_policy=0")
fi
@ -273,8 +196,3 @@ echo $IMAGE_NAME > $KNOWN_IMAGE_NAME_FILE
echo $IMAGE_FLAVOR > $KNOWN_IMAGE_FLAVOR_FILE
echo $FEDORA_VERSION > $KNOWN_FEDORA_VERSION_FILE
echo $IMAGE_BRANCH > $KNOWN_IMAGE_BRANCH_FILE
if [[ $IMAGE_FLAVOR =~ "nvidia" ]]; then
echo "Nvidia image detected, rebooting to avoid screen freeze issue in 550."
systemctl reboot
fi

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -12,7 +12,7 @@ name='X-Pardus-Apps.directory'
translate=true
[org/gnome/desktop/app-folders/folders/Utilities]
apps=['yafti.desktop', 'system-update.desktop', 'webapp-manager.desktop', 'tuned-gui.desktop', 'rog-control-center.desktop', 'fish.desktop', 'tuned-gui.desktop', 'nvtop.desktop', 'yelp.desktop', 'btop.desktop', 'com.github.tchx84.Flatseal.desktop', 'io.github.flattool.Warehouse.desktop', 'it.mijorus.gearlever.desktop', 'com.mattjakeman.ExtensionManager.desktop', 'org.gnome.tweaks.desktop', 'com.github.GradienceTeam.Gradience', 'io.github.fastrizwaan.WineZGUI.desktop', 'setroubleshoot.desktop']
apps=['yafti.desktop', 'system-update.desktop', 'webapp-manager.desktop', 'tuned-gui.desktop', 'rog-control-center.desktop', 'fish.desktop', 'tuned-gui.desktop', 'nvtop.desktop', 'yelp.desktop', 'btop.desktop', 'com.github.tchx84.Flatseal.desktop', 'io.github.flattool.Warehouse.desktop', 'it.mijorus.gearlever.desktop', 'com.mattjakeman.ExtensionManager.desktop', 'org.gnome.tweaks.desktop', 'com.github.GradienceTeam.Gradience', 'io.github.fastrizwaan.WineZGUI.desktop', 'setroubleshoot.desktop', 'org.rncbc.qsynth.desktop']
categories=['X-GNOME-Utilities']
name='X-GNOME-Utilities.directory'
translate=true

View File

@ -0,0 +1 @@
force_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm "

View File

Before

Width:  |  Height:  |  Size: 815 B

After

Width:  |  Height:  |  Size: 815 B

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View File

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 77 KiB

View File

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

View File

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

View File

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View File

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

View File

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

View File

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View File

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 93 KiB

View File

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,28 +0,0 @@
#!/usr/bin/bash
set -oue pipefail
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
IMAGE_REF="ostree-image-signed:docker://ghcr.io/$IMAGE_VENDOR/$IMAGE_NAME"
case $FEDORA_MAJOR_VERSION in
38|39)
IMAGE_TAG="stable"
;;
*)
IMAGE_TAG="$FEDORA_MAJOR_VERSION"
;;
esac
cat > $IMAGE_INFO <<EOF
{
"image-name": "$IMAGE_NAME",
"image-flavor": "$IMAGE_FLAVOR",
"image-vendor": "$IMAGE_VENDOR",
"image-ref": "$IMAGE_REF",
"image-tag": "$IMAGE_TAG",
"image-branch": "$IMAGE_BRANCH",
"base-image-name": "$BASE_IMAGE_NAME",
"fedora-version": "$FEDORA_MAJOR_VERSION"
}
EOF