From 5e86ffb725ae8dae88aca7561ab2567df726cb26 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Tue, 21 Nov 2023 09:52:43 -0800 Subject: [PATCH 01/23] chore: Correct aspect ratio of whitelogo svg --- .../usr/share/pixmaps/fedora_whitelogo.svg | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/system_files/shared/usr/share/pixmaps/fedora_whitelogo.svg b/system_files/shared/usr/share/pixmaps/fedora_whitelogo.svg index 51d189db..88bf3ece 100644 --- a/system_files/shared/usr/share/pixmaps/fedora_whitelogo.svg +++ b/system_files/shared/usr/share/pixmaps/fedora_whitelogo.svg @@ -1,13 +1,13 @@ + transform="matrix(1.1422913,0,0,1.1422913,2.2867623,1.1188993)"> Date: Tue, 21 Nov 2023 23:10:49 -0800 Subject: [PATCH 02/23] chore: Add steamdeck-dsp package --- spec_files/steamdeck-dsp/steamdeck-dsp.spec | 37 +++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 spec_files/steamdeck-dsp/steamdeck-dsp.spec diff --git a/spec_files/steamdeck-dsp/steamdeck-dsp.spec b/spec_files/steamdeck-dsp/steamdeck-dsp.spec new file mode 100644 index 00000000..0c5e0b2d --- /dev/null +++ b/spec_files/steamdeck-dsp/steamdeck-dsp.spec @@ -0,0 +1,37 @@ +Name: steamdeck-dsp +Version: {{{ git_dir_version }}} +Release: 1%{?dist} +Summary: Steamdeck Audio Processing +License: GPLv2 +URL: https://github.com/ublue-os/bazzite +Source: https://gitlab.com/evlaV/valve-hardware-audio-processing/-/archive/main/valve-hardware-audio-processing-main.tar.gz + +BuildRequires: make +BuildRequires: faust +BuildRequires: boost-devel +BuildRequires: lv2-devel + +%description +Steamdeck Audio Processing + +# Disable debug packages +%define debug_package %{nil} + +%prep +%autosetup -n valve-hardware-audio-processing-main + +%build +%make_build FAUSTINC="/usr/include/faust" FAUSTLIB="/usr/share/faust" + +%install +%make_install + +# This lists all the files that are included in the rpm package and that +# are going to be installed into target system where the rpm is installed. +%files +%license valve-hardware-audio-processing-main/LICENSE + +# Finally, changes from the latest release of your application are generated from +# your project's Git history. It will be empty until you make first annotated Git tag. +%changelog +{{{ git_dir_changelog }}} \ No newline at end of file From d6dede706abfe8f86265b9ee6dbb5b9a69443732 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Wed, 22 Nov 2023 09:17:22 -0800 Subject: [PATCH 03/23] fix: Drop DDControl as a default, caused unresponsive monitors for some users. --- Containerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Containerfile b/Containerfile index 5d340646..77fe34b7 100644 --- a/Containerfile +++ b/Containerfile @@ -72,9 +72,6 @@ RUN rpm-ostree install \ xrandr \ rmlint \ compsize \ - ddccontrol \ - ddccontrol-gtk \ - ddccontrol-db \ input-remapper \ system76-scheduler \ hl2linux-selinux \ From 5ab9fd08a244e01973f66298924ebee66ef4157f Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Wed, 22 Nov 2023 11:37:43 -0800 Subject: [PATCH 04/23] chore: Remove brew from custom.just, this is upstreamed now. --- .../usr/share/ublue-os/just/60-custom.just | 27 ------------------- .../usr/share/ublue-os/just/60-custom.just | 27 ------------------- 2 files changed, 54 deletions(-) diff --git a/system_files/deck/shared/usr/share/ublue-os/just/60-custom.just b/system_files/deck/shared/usr/share/ublue-os/just/60-custom.just index 578cdcb5..55fd9bfe 100644 --- a/system_files/deck/shared/usr/share/ublue-os/just/60-custom.just +++ b/system_files/deck/shared/usr/share/ublue-os/just/60-custom.just @@ -105,33 +105,6 @@ install-fleek-themes: echo "Install fleek with ujust install-fleek before running ujust install-fleek-themes." fi -# Install Homebrew for Linux -install-brew: - echo "Installing homebrew ..." - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - -# Add Homebrew to shell rc files -install-brew-to-shell: - #!/usr/bin/env bash - set -euxo pipefail - echo "Adding homebrew to shell configuration" - touch $HOME/.zprofile - touch $HOME/.bash_profile - if grep -q "linuxbrew" $HOME/.zprofile - then - echo "Brew configuration already present in .zprofile" - else - echo "Adding Brew configuration to .zprofile" - echo 'eval "$(/var/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.zprofile - fi - if grep -q "linuxbrew" $HOME/.bash_profile - then - echo "Brew configuration already present in .bash_profile" - else - echo "Adding Brew configuration to .bash_profile" - echo 'eval "$(/var/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.bash_profile - fi - # Install Greenlight xCloud and xHome streaming AppImage get-greenlight: #!/usr/bin/env bash diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just b/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just index 6fb13179..b0097816 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just +++ b/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just @@ -76,33 +76,6 @@ install-fleek-themes: echo "Install fleek with ujust install-fleek before running ujust install-fleek-themes." fi -# Install Homebrew for Linux -install-brew: - echo "Installing homebrew ..." - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - -# Add Homebrew to shell rc files -install-brew-to-shell: - #!/usr/bin/env bash - set -euxo pipefail - echo "Adding homebrew to shell configuration" - touch $HOME/.zprofile - touch $HOME/.bash_profile - if grep -q "linuxbrew" $HOME/.zprofile - then - echo "Brew configuration already present in .zprofile" - else - echo "Adding Brew configuration to .zprofile" - echo 'eval "$(/var/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.zprofile - fi - if grep -q "linuxbrew" $HOME/.bash_profile - then - echo "Brew configuration already present in .bash_profile" - else - echo "Adding Brew configuration to .bash_profile" - echo 'eval "$(/var/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.bash_profile - fi - # Install Greenlight xCloud and xHome streaming AppImage get-greenlight: #!/usr/bin/env bash From 64356cac2e17deca52fc5f012c5c9bb1752c1c55 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Wed, 22 Nov 2023 22:58:09 -0800 Subject: [PATCH 05/23] chore: Include faust2lv2, finish spec file --- spec_files/steamdeck-dsp/steamdeck-dsp.spec | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/spec_files/steamdeck-dsp/steamdeck-dsp.spec b/spec_files/steamdeck-dsp/steamdeck-dsp.spec index 0c5e0b2d..f6f9c9be 100644 --- a/spec_files/steamdeck-dsp/steamdeck-dsp.spec +++ b/spec_files/steamdeck-dsp/steamdeck-dsp.spec @@ -8,8 +8,10 @@ Source: https://gitlab.com/evlaV/valve-hardware-audio-processing/-/archi BuildRequires: make BuildRequires: faust +BuildRequires: faust-tools BuildRequires: boost-devel BuildRequires: lv2-devel +BuildRequires: g++ %description Steamdeck Audio Processing @@ -24,12 +26,22 @@ Steamdeck Audio Processing %make_build FAUSTINC="/usr/include/faust" FAUSTLIB="/usr/share/faust" %install -%make_install +%make_install DEST_DIR="%{buildroot}" +cp LICENSE %{buildroot}%{_datadir}/licenses/%{name}/LICENSE # This lists all the files that are included in the rpm package and that # are going to be installed into target system where the rpm is installed. %files -%license valve-hardware-audio-processing-main/LICENSE +%license LICENSE +%{_prefix}/lib/firmware/amd/* +%{_prefix}/lib/lv2/svg/valve_deck_* +%{_prefix}/lib/lv2/valve_* +%{_datadir}/alsa/ucm2/conf.d/acp5x/*.conf +%{_datadir}/alsa/ucm2/conf.d/sof-nau8821-max/*.conf +%{_datadir}/pipewire/pipewire.conf.d/*.conf +%{_datadir}/wireplumber/bluetooth.lua.d/*.lua +%{_datadir}/wireplumber/main.lua.d/*.lua +%{_datadir}/wireplumber/scripts/*.lua # Finally, changes from the latest release of your application are generated from # your project's Git history. It will be empty until you make first annotated Git tag. From 182aafd525b307fe53fd299c563a0d71755e651b Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Thu, 23 Nov 2023 10:22:51 -0800 Subject: [PATCH 06/23] chore: Ensure folder is created for LICENSE --- spec_files/steamdeck-dsp/steamdeck-dsp.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/spec_files/steamdeck-dsp/steamdeck-dsp.spec b/spec_files/steamdeck-dsp/steamdeck-dsp.spec index f6f9c9be..0dbcad01 100644 --- a/spec_files/steamdeck-dsp/steamdeck-dsp.spec +++ b/spec_files/steamdeck-dsp/steamdeck-dsp.spec @@ -27,6 +27,7 @@ Steamdeck Audio Processing %install %make_install DEST_DIR="%{buildroot}" +mkdir -p %{buildroot}%{_datadir}/licenses/%{name}/ cp LICENSE %{buildroot}%{_datadir}/licenses/%{name}/LICENSE # This lists all the files that are included in the rpm package and that From 460f1110f2acd0e990a962f239ade63f5543b1f9 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Thu, 23 Nov 2023 10:27:57 -0800 Subject: [PATCH 07/23] feat(deck): Switch to new steamdeck-dsp package for audio. chore: Minor adjustments to how services are enabled by default --- Containerfile | 11 ++- README.md | 1 + .../usr/etc/pipewire/99-input-denoising.conf | 71 ------------------- .../bluetooth.lua.d/60-bluez-jupiter.lua | 8 --- .../main.lua.d/60-alsa-acp5x-config.lua | 19 ----- .../main.lua.d/60-alsa-card0-config.lua | 25 ------- .../60-alsa-ps-controller-config.lua | 21 ------ .../shared/usr/bin/bazzite-hardware-setup | 24 ++++--- 8 files changed, 24 insertions(+), 156 deletions(-) delete mode 100644 system_files/deck/shared/usr/etc/pipewire/99-input-denoising.conf delete mode 100644 system_files/deck/shared/usr/etc/wireplumber/bluetooth.lua.d/60-bluez-jupiter.lua delete mode 100644 system_files/deck/shared/usr/etc/wireplumber/main.lua.d/60-alsa-acp5x-config.lua delete mode 100644 system_files/deck/shared/usr/etc/wireplumber/main.lua.d/60-alsa-card0-config.lua delete mode 100644 system_files/deck/shared/usr/etc/wireplumber/main.lua.d/60-alsa-ps-controller-config.lua diff --git a/Containerfile b/Containerfile index 77fe34b7..cdab1ce0 100644 --- a/Containerfile +++ b/Containerfile @@ -387,6 +387,7 @@ RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \ RUN rpm-ostree install \ jupiter-fan-control \ jupiter-hw-support-btrfs \ + steamdeck-dsp \ powerbuttond \ HandyGCCS \ vpower \ @@ -471,18 +472,22 @@ RUN /tmp/image-info.sh && \ systemctl enable sddm.service \ ; fi && \ systemctl enable bazzite-autologin.service && \ - systemctl enable jupiter-fan-control.service && \ systemctl enable btrfs-dedup@run-media-mmcblk0p1.timer && \ - systemctl enable vpower.service && \ systemctl enable ds-inhibit.service && \ systemctl enable cec-onboot.service && \ systemctl enable cec-onpoweroff.service && \ systemctl enable cec-onsleep.service && \ systemctl --global enable steam-web-debug-portforward.service && \ - systemctl --global enable sdgyrodsu.service && \ + systemctl --global disable sdgyrodsu.service && \ systemctl disable input-remapper.service && \ systemctl disable ublue-update.timer && \ systemctl disable handycon.service && \ + systemctl disable jupiter-fan-control.service && \ + systemctl disable vpower.service && \ + systemctl disable jupiter-biosupdate.service && \ + systemctl disable jupiter-controller-update.service && \ + systemctl disable ryzenadj.service && \ + systemctl disable batterylimit.service && \ rm -f /usr/etc/sddm.conf && \ rm -f /usr/etc/default/bazzite && \ rm -rf \ diff --git a/README.md b/README.md index 08f00b6a..b1baa67d 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,7 @@ Ported SteamOS and ChimeraOS packages, among others used by Bazzite, are built o |[sddm-sugar-steamOS](https://github.com/JiayuanWen/sddm-sugar-steamOS)|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/sddm-sugar-steamOS/status_image/last_build.png?)| |[sdgyrodsu](https://github.com/kmicki/SteamDeckGyroDSU)|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/sdgyrodsu/status_image/last_build.png?)| |[steam-patch](https://github.com/KyleGospo/steam-patch)|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/steam-patch/status_image/last_build.png?)| +|steamdeck-dsp|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/steamdeck-dsp/status_image/last_build.png?)| |steamdeck-gnome-presets|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/steamdeck-gnome-presets/status_image/last_build.png?)| |steamdeck-kde-presets|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/steamdeck-kde-presets/status_image/last_build.png?)| |steamdeck-kde-presets-desktop|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/steamdeck-kde-presets-desktop/status_image/last_build.png?)| diff --git a/system_files/deck/shared/usr/etc/pipewire/99-input-denoising.conf b/system_files/deck/shared/usr/etc/pipewire/99-input-denoising.conf deleted file mode 100644 index d0061e29..00000000 --- a/system_files/deck/shared/usr/etc/pipewire/99-input-denoising.conf +++ /dev/null @@ -1,71 +0,0 @@ -context.modules = [ -{ name = libpipewire-module-filter-chain - args = { - node.description = "Noise Canceling source" - media.name = "Noise Canceling source" - filter.graph = { - nodes = [ - { - type = ladspa - name = rnnoise - plugin = /usr/lib64/ladspa/librnnoise_ladspa.so - label = noise_suppressor_stereo - control = { - "VAD Threshold (%)" = 23.0 - "VAD Grace Period (ms)" = 200 - } - } - { - type = ladspa - name = equaliser - plugin = /usr/lib64/ladspa/caps.so - label = Eq10X2 - control = { - "31 Hz" 0 - "63 Hz" 0 - "125 Hz" 0 - "250 Hz" 0 - "500 Hz" 0 - "1 kHz" 0 - "2 kHz" 0 - "4 kHz" 0 - "8 kHz" -3 - "16 kHz" -3 - } - } - { - type = ladspa - name = compressor - plugin = /usr/lib64/ladspa/caps.so - label = CompressX2 - control = { - "measure" 1 - "mode" 1 - "threshold" 0.5 - "strength" 0.25 - "attack" 0.75 - "release" 0.5 - "gain (dB)" 12 - } - } - ] - links = [ - { output = "rnnoise:Output (L)" input = "equaliser:in.l" } - { output = "rnnoise:Output (R)" input = "equaliser:in.r" } - { output = "equaliser:out.l" input = "compressor:in.l" } - { output = "equaliser:out.r" input = "compressor:in.r" } - ] - } - capture.props = { - node.name = "capture.rnnoise_source" - node.passive = true - audio.rate = 48000 - } - playback.props = { - node.name = "rnnoise_source" - media.class = Audio/Source - audio.rate = 48000 - } - } -} -] diff --git a/system_files/deck/shared/usr/etc/wireplumber/bluetooth.lua.d/60-bluez-jupiter.lua b/system_files/deck/shared/usr/etc/wireplumber/bluetooth.lua.d/60-bluez-jupiter.lua deleted file mode 100644 index 2d9ad122..00000000 --- a/system_files/deck/shared/usr/etc/wireplumber/bluetooth.lua.d/60-bluez-jupiter.lua +++ /dev/null @@ -1,8 +0,0 @@ -bluez_monitor.properties = { - -- HFP/HSP backend (default: native). - -- Available values: any, none, hsphfpd, ofono, native - ["bluez5.hfphsp-backend"] = "none", - - -- Disable dummy AVRCP player - ["bluez5.dummy-avrcp-player"] = false -} diff --git a/system_files/deck/shared/usr/etc/wireplumber/main.lua.d/60-alsa-acp5x-config.lua b/system_files/deck/shared/usr/etc/wireplumber/main.lua.d/60-alsa-acp5x-config.lua deleted file mode 100644 index c938af4f..00000000 --- a/system_files/deck/shared/usr/etc/wireplumber/main.lua.d/60-alsa-acp5x-config.lua +++ /dev/null @@ -1,19 +0,0 @@ ---ACP5X card hardware never hibernates, so remove the pops and lags. - -table.insert (alsa_monitor.rules, { - matches = { - { - -- Matches all sources from card acp5x - { "node.name", "matches", "alsa_input.*" }, - { "alsa.card_name", "matches", "acp5x" }, - }, - { - -- Matches all sinks from card acp5x - { "node.name", "matches", "alsa_output.*" }, - { "alsa.card_name", "matches", "acp5x" }, - }, - }, - apply_properties = { - ["session.suspend-timeout-seconds"] = 0, - } -}) diff --git a/system_files/deck/shared/usr/etc/wireplumber/main.lua.d/60-alsa-card0-config.lua b/system_files/deck/shared/usr/etc/wireplumber/main.lua.d/60-alsa-card0-config.lua deleted file mode 100644 index 6a887c98..00000000 --- a/system_files/deck/shared/usr/etc/wireplumber/main.lua.d/60-alsa-card0-config.lua +++ /dev/null @@ -1,25 +0,0 @@ --- HDMI output is always plugged in card 0 (HD_Audio Generic) --- We always give higher priority to nodes from that card --- Disable suspend timeout for HDMI to remove audio delay after idle - -table.insert (alsa_monitor.rules, { - matches = { - { - -- Matches all sources from card HD-Audio Generic - { "node.name", "matches", "alsa_input.*" }, - { "alsa.card_name", "matches", "HD-Audio Generic" }, - }, - { - -- Matches all sinks from card HD-Audio Generic - { "node.name", "matches", "alsa_output.*" }, - { "alsa.card_name", "matches", "HD-Audio Generic" }, - }, - }, - apply_properties = { - ["priority.driver"] = 900, - ["priority.session"] = 900, - ["api.alsa.period-size"] = 256, - ["api.alsa.headroom"] = 1024, - ["session.suspend-timeout-seconds"] = 0 - } -}) diff --git a/system_files/deck/shared/usr/etc/wireplumber/main.lua.d/60-alsa-ps-controller-config.lua b/system_files/deck/shared/usr/etc/wireplumber/main.lua.d/60-alsa-ps-controller-config.lua deleted file mode 100644 index 6ae8fae0..00000000 --- a/system_files/deck/shared/usr/etc/wireplumber/main.lua.d/60-alsa-ps-controller-config.lua +++ /dev/null @@ -1,21 +0,0 @@ --- PS4/PS5 Controller output is always referenced as Wireless Controller --- We always give the lowest priority to nodes from that card - -table.insert (alsa_monitor.rules, { - matches = { - { - -- Matches all sources from card Controller - { "node.name", "matches", "alsa_input.*" }, - { "alsa.card_name", "matches", "Wireless Controller" }, - }, - { - -- Matches all sinks from card Wireless Controller - { "node.name", "matches", "alsa_output.*" }, - { "alsa.card_name", "matches", "Wireless Controller" }, - }, - }, - apply_properties = { - ["priority.driver"] = 99, - ["priority.session"] = 99, - } -}) diff --git a/system_files/desktop/shared/usr/bin/bazzite-hardware-setup b/system_files/desktop/shared/usr/bin/bazzite-hardware-setup index 64f85e46..feb35eb6 100755 --- a/system_files/desktop/shared/usr/bin/bazzite-hardware-setup +++ b/system_files/desktop/shared/usr/bin/bazzite-hardware-setup @@ -116,16 +116,22 @@ else fi if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegame" ]]; then - if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then - RESOLUTION=$(lshw -json -c display | jq -r .[]."configuration"."resolution") - if [[ "${RESOLUTION}" = "1200,1920" ]]; then - echo "Jupiter with DeckHD detected, disabling BIOS updates..." - systemctl disable --now jupiter-biosupdate.service - else - echo "Jupiter hardware detected, skipping further setup..." + if [[ ":Jupiter:Galileo:" =~ ":$SYS_ID:" ]]; then + if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then + RESOLUTION=$(lshw -json -c display | jq -r .[]."configuration"."resolution") + if [[ "${RESOLUTION}" = "1200,1920" ]]; then + echo "Jupiter with DeckHD detected, disabling BIOS updates..." + systemctl disable --now jupiter-biosupdate.service + else + echo "Jupiter hardware detected, skipping further setup..." + fi + elif [[ ":Galileo:" =~ ":$SYS_ID:" ]]; then + echo "Galileo hardware detected, skipping further setup..." fi - elif [[ ":Galileo:" =~ ":$SYS_ID:" ]]; then - echo "Galileo hardware detected, skipping further setup..." + + systemctl enable --now jupiter-fan-control.service + systemctl enable --now vpower.service + systemctl --global enable --now sdgyrodsu.service else echo "Generic device detected. Performing setup..." if [[ ":ROG Ally RC71L_RC71L:AYANEO GEEK:AYANEO 2:AYANEO 2S:AOKZOE A1 AR07:G1618-04:G1619-04:83E1:" =~ ":$SYS_ID:" ]]; then From 0b35edaa6c3d548a066924ebf007b121967f6b0f Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Thu, 23 Nov 2023 10:53:24 -0800 Subject: [PATCH 08/23] fix(deck): Update jupiter-hw-support package --- .../jupiter-hw-support/bazzite-btrfs.patch | 21 ++++++------ .../jupiter-hw-support-btrfs.spec | 10 +++--- .../jupiter-hw-support/priv-write.patch | 34 +++++++++++++------ 3 files changed, 38 insertions(+), 27 deletions(-) diff --git a/spec_files/jupiter-hw-support/bazzite-btrfs.patch b/spec_files/jupiter-hw-support/bazzite-btrfs.patch index e83e6616..c5b80145 100644 --- a/spec_files/jupiter-hw-support/bazzite-btrfs.patch +++ b/spec_files/jupiter-hw-support/bazzite-btrfs.patch @@ -1,18 +1,16 @@ diff --git a/etc/systemd/system/steamos-automount@.service b/etc/systemd/system/steamos-automount@.service -index dd700da..152e231 100644 +index 96e8818..33038bc 100644 --- a/etc/systemd/system/steamos-automount@.service +++ b/etc/systemd/system/steamos-automount@.service -@@ -14,6 +14,7 @@ +@@ -14,5 +14,6 @@ Description=Mount removable drive %i [Service] Type=oneshot RemainAfterExit=true +EnvironmentFile=/etc/default/steamos-btrfs - ExecStart=-/usr/libexec/steamos-automount add %i - ExecStop=-/usr/libexec/steamos-automount remove %i - ExecReload=-/usr/libexec/steamos-automount retrigger %i - + ExecStart=/usr/lib/hwsupport/steamos-automount.sh add %i + ExecStop=/usr/lib/hwsupport/steamos-automount.sh remove %i diff --git a/usr/lib/hwsupport/format-device.sh b/usr/lib/hwsupport/format-device.sh -index b136413..d3cbb16 100755 +index 566eea2..d6803ff 100755 --- a/usr/lib/hwsupport/format-device.sh +++ b/usr/lib/hwsupport/format-device.sh @@ -2,6 +2,8 @@ @@ -24,10 +22,11 @@ index b136413..d3cbb16 100755 # If the script is not run from a tty then send a copy of stdout and # stderr to the journal. In this case stderr is also redirected to stdout. if ! tty -s; then - +diff --git a/usr/lib/hwsupport/steamos-automount.sh b/usr/lib/hwsupport/steamos-automount.sh +index 6dd3a2f..ca1c5ca 100755 --- a/usr/lib/hwsupport/steamos-automount.sh +++ b/usr/lib/hwsupport/steamos-automount.sh -@@ -77,6 +77,7 @@ +@@ -66,6 +66,7 @@ do_mount() dev_json=$(lsblk -o PATH,LABEL,FSTYPE --json -- "$DEVICE" | jq '.blockdevices[0]') ID_FS_LABEL=$(jq -r '.label | select(type == "string")' <<< "$dev_json") ID_FS_TYPE=$(jq -r '.fstype | select(type == "string")' <<< "$dev_json") @@ -35,7 +34,7 @@ index b136413..d3cbb16 100755 #### SteamOS Btrfs Begin #### if [[ -f /etc/default/steamos-btrfs ]]; then -@@ -120,6 +121,7 @@ +@@ -109,6 +110,7 @@ do_mount() UDISKS2_ALLOW='uid=$UID,gid=$GID,umask,dmask,fmask,locale,norecover,ignore_case,windows_names,compression,nocompression,big_writes,nls,nohidden,sys_immutable,sparse,showmeta,prealloc' OPTS="${STEAMOS_BTRFS_SDCARD_NTFS_MOUNT_OPTS:-rw,noatime,lazytime,uid=1000,gid=1000,big_writes,umask=0022,ignore_case,windows_names}" FSTYPE="lowntfs-3g" @@ -43,7 +42,7 @@ index b136413..d3cbb16 100755 if [[ ! -f /etc/filesystems ]] || ! grep -q '\b'"${FSTYPE}"'\b' /etc/filesystems; then echo "${FSTYPE}" >> /etc/filesystems fi -@@ -132,7 +134,7 @@ +@@ -121,7 +123,7 @@ do_mount() if [[ -f "${udisks2_mount_options_conf}" && ! -f "${udisks2_mount_options_conf}.orig" ]]; then mv -f "${udisks2_mount_options_conf}"{,.orig} fi diff --git a/spec_files/jupiter-hw-support/jupiter-hw-support-btrfs.spec b/spec_files/jupiter-hw-support/jupiter-hw-support-btrfs.spec index caac404b..9f9ceece 100644 --- a/spec_files/jupiter-hw-support/jupiter-hw-support-btrfs.spec +++ b/spec_files/jupiter-hw-support/jupiter-hw-support-btrfs.spec @@ -1,5 +1,5 @@ %define packagename jupiter-hw-support -%define packagever jupiter-20231115.1 +%define packagever jupiter-3.5-20231115.1 Name: %{packagename}-btrfs Version: {{{ git_dir_version }}} Release: 1%{?dist} @@ -7,11 +7,11 @@ Summary: Steam Deck Hardware Support Package License: GPLv3 URL: https://github.com/ublue-os/bazzite -Source: https://gitlab.com/evlaV/%{packagename}/-/archive/jupiter-20230927.2/%{packagename}-%{packagever}.tar.gz +Source: https://gitlab.com/evlaV/%{packagename}/-/archive/%{packagever}/%{packagename}-%{packagever}.tar.gz Patch0: fedora.patch Patch1: selinux.patch -Patch2: https://gitlab.com/popsulfr/steamos-btrfs/-/raw/main/files/usr/lib/hwsupport/steamos-automount.sh.patch.old.20231104103824.20231031.1000 -Patch3: https://gitlab.com/popsulfr/steamos-btrfs/-/raw/main/files/usr/lib/hwsupport/format-device.sh.patch.old.20230922091429.20230915.100 +Patch2: https://gitlab.com/popsulfr/steamos-btrfs/-/raw/v1.2.6.20231104/files/usr/lib/hwsupport/steamos-automount.sh.patch.old.20231104103824.20231031.1000 +Patch3: https://gitlab.com/popsulfr/steamos-btrfs/-/raw/v1.2.6.20231104/files/usr/lib/hwsupport/format-device.sh.patch.old.20230922091429.20230915.100 Patch4: user.patch Patch5: bazzite-btrfs.patch Patch6: systemd-run.patch @@ -41,7 +41,7 @@ SteamOS 3.0 Steam Deck Hardware Support Package %define debug_package %{nil} %prep -%autosetup -p1 -n jupiter-hw-support-jupiter-20230927.2-faaccd721214cbb705bdcba8d3eddfdec1ef4e3b +%autosetup -p1 -n %{packagename}-%{packagever} %build diff --git a/spec_files/jupiter-hw-support/priv-write.patch b/spec_files/jupiter-hw-support/priv-write.patch index 87234d6f..6469e54c 100644 --- a/spec_files/jupiter-hw-support/priv-write.patch +++ b/spec_files/jupiter-hw-support/priv-write.patch @@ -1,5 +1,5 @@ diff --git a/usr/bin/steamos-polkit-helpers/steamos-priv-write b/usr/bin/steamos-polkit-helpers/steamos-priv-write -index 907133b..6ba1dd8 100755 +index 296996e..ae0ae3e 100755 --- a/usr/bin/steamos-polkit-helpers/steamos-priv-write +++ b/usr/bin/steamos-polkit-helpers/steamos-priv-write @@ -2,6 +2,9 @@ @@ -12,19 +12,31 @@ index 907133b..6ba1dd8 100755 if [[ $EUID -ne 0 ]]; then exec pkexec --disable-internal-agent "$0" "$@" -@@ -12,16 +15,19 @@ +@@ -12,21 +15,25 @@ WRITE_VALUE="$2" function CommitWrite() { +- if [ ! -z "$WRITE_VALUE" ] +- then +- echo "commit: $WRITE_VALUE -> $WRITE_PATH" | systemd-cat -t p-steamos-priv-write -p warning +- echo "$WRITE_VALUE" > "$WRITE_PATH" + if [[ ":Jupiter:" =~ ":$SYS_ID:" || ":Galileo:" =~ ":$SYS_ID:" || "$ENABLE_HARDWARE_CONTROL_ON_NON_DECK_HARDWARE" = 1 ]]; then - echo "commit: $WRITE_VALUE -> $WRITE_PATH" | systemd-cat -t p-steamos-priv-write -p warning -- echo "$WRITE_VALUE" > "$WRITE_PATH" - chmod a+w "$WRITE_PATH" -+ echo "$WRITE_VALUE" > "$WRITE_PATH" ++ if [ ! -z "$WRITE_VALUE" ] ++ then ++ echo "commit: $WRITE_VALUE -> $WRITE_PATH" | systemd-cat -t p-steamos-priv-write -p warning ++ chmod a+w "$WRITE_PATH" ++ echo "$WRITE_VALUE" > "$WRITE_PATH" ++ fi ++ ++ echo "chmod a+w: $WRITE_PATH" | systemd-cat -t p-steamos-priv-write -p warning + else -+ echo "commit: Skipped - see /etc/default/steam-hardware-control" | systemd-cat -t p-steamos-priv-write -p warning -+ fi - exit 0 ++ echo "commit: Skipped - see /etc/default/steam-hardware-control" | systemd-cat -t p-steamos-priv-write -p warning + fi +- +- chmod a+w "$WRITE_PATH" +- echo "chmod a+w: $WRITE_PATH" | systemd-cat -t p-steamos-priv-write -p warning ++ + exit 0 } function DeclineWrite() @@ -34,8 +46,8 @@ index 907133b..6ba1dd8 100755 exit 1 } -@@ -32,15 +38,90 @@ - +@@ -40,15 +47,90 @@ if [[ "$WRITE_PATH" == /dev/drm_dp_aux0 ]]; then + fi if [[ "$WRITE_PATH" == /sys/class/drm/card*/device/power_dpm_force_performance_level ]]; then - CommitWrite From 6c2335964fab7fcd1375d1376075288898d66040 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Thu, 23 Nov 2023 13:20:01 -0800 Subject: [PATCH 09/23] chore: Enable fuzz --- spec_files/jupiter-hw-support/bazzite-btrfs.patch | 4 ++-- spec_files/jupiter-hw-support/fedora.patch | 10 ++++++++++ .../jupiter-hw-support/jupiter-hw-support-btrfs.spec | 3 +++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/spec_files/jupiter-hw-support/bazzite-btrfs.patch b/spec_files/jupiter-hw-support/bazzite-btrfs.patch index c5b80145..274c06d4 100644 --- a/spec_files/jupiter-hw-support/bazzite-btrfs.patch +++ b/spec_files/jupiter-hw-support/bazzite-btrfs.patch @@ -7,8 +7,8 @@ index 96e8818..33038bc 100644 Type=oneshot RemainAfterExit=true +EnvironmentFile=/etc/default/steamos-btrfs - ExecStart=/usr/lib/hwsupport/steamos-automount.sh add %i - ExecStop=/usr/lib/hwsupport/steamos-automount.sh remove %i + ExecStart=-/usr/libexec/steamos-automount add %i + ExecStop=-/usr/libexec/steamos-automount remove %i diff --git a/usr/lib/hwsupport/format-device.sh b/usr/lib/hwsupport/format-device.sh index 566eea2..d6803ff 100755 --- a/usr/lib/hwsupport/format-device.sh diff --git a/spec_files/jupiter-hw-support/fedora.patch b/spec_files/jupiter-hw-support/fedora.patch index 1020d900..2432a0f4 100644 --- a/spec_files/jupiter-hw-support/fedora.patch +++ b/spec_files/jupiter-hw-support/fedora.patch @@ -328,3 +328,13 @@ index 1a46251..73f2a3d 100755 import evdev import threading + +diff --git a/usr/bin/jupiter-initial-firmware-update b/usr/bin/jupiter-initial-firmware-update +index 1a46251..73f2a3d 100755 +--- jupiter-initial-firmware-update ++++ jupiter-initial-firmware-update +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/sh + + set -euo pipefail diff --git a/spec_files/jupiter-hw-support/jupiter-hw-support-btrfs.spec b/spec_files/jupiter-hw-support/jupiter-hw-support-btrfs.spec index 9f9ceece..520f068b 100644 --- a/spec_files/jupiter-hw-support/jupiter-hw-support-btrfs.spec +++ b/spec_files/jupiter-hw-support/jupiter-hw-support-btrfs.spec @@ -1,5 +1,7 @@ %define packagename jupiter-hw-support %define packagever jupiter-3.5-20231115.1 +%global _default_patch_fuzz 2 + Name: %{packagename}-btrfs Version: {{{ git_dir_version }}} Release: 1%{?dist} @@ -94,6 +96,7 @@ rm -rf %{buildroot}%{_datadir}/alsa %{_bindir}/amd_system_info %{_bindir}/foxnet-biosupdate %{_bindir}/jupiter-biosupdate +%{_bindir}/jupiter-initial-firmware-update %{_bindir}/jupiter-check-support %{_bindir}/jupiter-controller-update %{_bindir}/steamos-polkit-helpers/* From d1c60228dee6e975ca0db67906c8ee9840d6a6fc Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Thu, 23 Nov 2023 15:55:08 -0800 Subject: [PATCH 10/23] feat(deck): Auto-disable bios updates for 32GB RAM decks. --- system_files/desktop/shared/usr/bin/bazzite-hardware-setup | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system_files/desktop/shared/usr/bin/bazzite-hardware-setup b/system_files/desktop/shared/usr/bin/bazzite-hardware-setup index feb35eb6..8ba104a0 100755 --- a/system_files/desktop/shared/usr/bin/bazzite-hardware-setup +++ b/system_files/desktop/shared/usr/bin/bazzite-hardware-setup @@ -122,6 +122,9 @@ if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegam if [[ "${RESOLUTION}" = "1200,1920" ]]; then echo "Jupiter with DeckHD detected, disabling BIOS updates..." systemctl disable --now jupiter-biosupdate.service + elif [[ "$(awk '/MemTotal/{print $(NF-1)}' /proc/meminfo)" == "31664740" ]]; then + echo "Jupiter with 32GB RAM detected, disabling BIOS updates..." + systemctl disable --now jupiter-biosupdate.service else echo "Jupiter hardware detected, skipping further setup..." fi From a1e55faaf72834b6e3afe9d16ea6947847611284 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Fri, 24 Nov 2023 00:02:41 -0800 Subject: [PATCH 11/23] chore: Add new galileo-mura package --- spec_files/galileo-mura/LICENSE | 7 ++++ spec_files/galileo-mura/galileo-mura.spec | 41 +++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 spec_files/galileo-mura/LICENSE create mode 100644 spec_files/galileo-mura/galileo-mura.spec diff --git a/spec_files/galileo-mura/LICENSE b/spec_files/galileo-mura/LICENSE new file mode 100644 index 00000000..2bcfada4 --- /dev/null +++ b/spec_files/galileo-mura/LICENSE @@ -0,0 +1,7 @@ +Copyright 2023 Joshua Ashton for Valve Software + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/spec_files/galileo-mura/galileo-mura.spec b/spec_files/galileo-mura/galileo-mura.spec new file mode 100644 index 00000000..9e9456f8 --- /dev/null +++ b/spec_files/galileo-mura/galileo-mura.spec @@ -0,0 +1,41 @@ +Name: galileo-mura +Version: {{{ git_dir_version }}} +Release: 1%{?dist} +Summary: Utilities for setting and reading mura correction on Galileo +License: MIT +URL: https://github.com/ublue-os/bazzite + +Source: https://gitlab.com/evlaV/galileo-mura-extractor/-/archive/main/galileo-mura-extractor-main.tar.gz + +BuildRequires: systemd-rpm-macros +BuildRequires: gcc +BuildRequires: meson >= 0.54.0 +BuildRequires: ninja-build + +%description +Utilities for setting and reading mura correction on Galileo + +# Disable debug packages +%define debug_package %{nil} + +%prep +%autosetup -n galileo-mura-extractor-main + +%build +%meson +%meson_build + +%install +%meson_install + +# This lists all the files that are included in the rpm package and that +# are going to be installed into target system where the rpm is installed. +%files +%license LICENSE +%attr(4755, root, root) %{_bindir}/galileo-mura-extractor +%{_bindir}/galileo-mura-setup + +# Finally, changes from the latest release of your application are generated from +# your project's Git history. It will be empty until you make first annotated Git tag. +%changelog +{{{ git_dir_changelog }}} From 12b2875b847affac874105292355564d096bc98f Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Fri, 24 Nov 2023 00:08:10 -0800 Subject: [PATCH 12/23] feat(deck): Include new galileo-mura package --- Containerfile | 1 + README.md | 1 + 2 files changed, 2 insertions(+) diff --git a/Containerfile b/Containerfile index cdab1ce0..7a7b29c0 100644 --- a/Containerfile +++ b/Containerfile @@ -388,6 +388,7 @@ RUN rpm-ostree install \ jupiter-fan-control \ jupiter-hw-support-btrfs \ steamdeck-dsp \ + galileo-mura \ powerbuttond \ HandyGCCS \ vpower \ diff --git a/README.md b/README.md index b1baa67d..7eb7e327 100644 --- a/README.md +++ b/README.md @@ -216,6 +216,7 @@ Ported SteamOS and ChimeraOS packages, among others used by Bazzite, are built o |gamescope|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite-multilib/package/gamescope/status_image/last_build.png?)| |[gamescope-session-plus](https://github.com/ChimeraOS/gamescope-session)|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/gamescope-session-plus/status_image/last_build.png?)| |[gamescope-session-steam](https://github.com/ChimeraOS/gamescope-session-steam)|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/gamescope-session-steam/status_image/last_build.png?)| +|galileo-mura|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/galileo-mura/status_image/last_build.png?)| |[gnome-randr-rust](https://github.com/maxwellainatchi/gnome-randr-rust)|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/gnome-randr-rust/status_image/last_build.png?)| |gnome-shell-extension-bazzite-menu|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/gnome-shell-extension-bazzite-menu/status_image/last_build.png?)| |[gnome-shell-extension-caribou-blocker](https://extensions.gnome.org/extension/1326/block-caribou/)|![Build Status](https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/package/gnome-shell-extension-caribou-blocker/status_image/last_build.png?)| From 7c8ad27f7e4be90b5f81fa64833a81f8ca0b15e0 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Fri, 24 Nov 2023 00:36:07 -0800 Subject: [PATCH 13/23] chore: Add xcursorgen call to jupiter-hw-support --- spec_files/jupiter-hw-support/jupiter-hw-support-btrfs.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec_files/jupiter-hw-support/jupiter-hw-support-btrfs.spec b/spec_files/jupiter-hw-support/jupiter-hw-support-btrfs.spec index 520f068b..e9d07e52 100644 --- a/spec_files/jupiter-hw-support/jupiter-hw-support-btrfs.spec +++ b/spec_files/jupiter-hw-support/jupiter-hw-support-btrfs.spec @@ -35,6 +35,8 @@ Requires: e2fsprogs Requires: f3 BuildRequires: systemd-rpm-macros +BuildRequires: xcursorgen +BuildRequires: sed %description SteamOS 3.0 Steam Deck Hardware Support Package @@ -66,6 +68,8 @@ cp -rv usr/lib/udev %{buildroot}%{_prefix}/lib/udev cp -rv usr/bin/* %{buildroot}%{_bindir} cp -rv usr/lib/systemd/system/* %{buildroot}%{_unitdir} cp -rv etc/* %{buildroot}%{_sysconfdir} +sed -i 's@steamos-cursor.png@usr/share/steamos/steamos-cursor.png@g' usr/share/steamos/steamos-cursor-config +xcursorgen usr/share/steamos/steamos-cursor-config %{buildroot}%{_datadir}/icons/steam/cursors/default # Remove unneeded files rm %{buildroot}%{_sysconfdir}/default/grub-steamos rm %{buildroot}%{_datadir}/jupiter_bios_updater/h2offt-g From ab5a5038ebd762a7568e3b1f82fafe334b4eac7c Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Fri, 24 Nov 2023 09:16:12 -0800 Subject: [PATCH 14/23] fix(deck): Improve just scripts for bios handling --- .../usr/share/ublue-os/just/60-custom.just | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/system_files/deck/shared/usr/share/ublue-os/just/60-custom.just b/system_files/deck/shared/usr/share/ublue-os/just/60-custom.just index 55fd9bfe..61bc8dec 100644 --- a/system_files/deck/shared/usr/share/ublue-os/just/60-custom.just +++ b/system_files/deck/shared/usr/share/ublue-os/just/60-custom.just @@ -373,21 +373,31 @@ unhide-grub: # Install Deck HD BIOS install-deckhd-bios: #!/usr/bin/env bash - RESOLUTION=$(sudo lshw -json -c display | jq -r .[]."configuration"."resolution") - if [[ "${RESOLUTION}" = "1200,1920" ]]; then + SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)" + if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then + RESOLUTION=$(sudo lshw -json -c display | jq -r .[]."configuration"."resolution") + if [[ "${RESOLUTION}" = "1200,1920" ]]; then sudo systemctl mask --now jupiter-biosupdate.service wget -q https://deckhd.com/downloads/install.sh -O /tmp/deckhd-install.sh chmod +x /tmp/deckhd-install.sh sudo ./tmp/deckhd-install.sh - else + else echo "Unable to detect DeckHD. Aborting..." + fi + else + echo "This is only applicable to LCD Steam Decks with the DeckHD screen. Aborting..." fi # Enable BIOS & Firmware update services for the Steam Deck enable-deck-bios-firmware-updates: #!/usr/bin/env bash - sudo systemctl enable jupiter-biosupdate.service - sudo systemctl enable jupiter-controller-update.service + SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)" + if [[ ":Jupiter:" =~ ":$SYS_ID:" || ":Galileo:" =~ ":$SYS_ID:" ]]; then + sudo systemctl enable jupiter-biosupdate.service + sudo systemctl enable jupiter-controller-update.service + else + echo "This is only applicable to Valve's Steam Deck. Aborting..." + fi # Disable Steam Deck BIOS updates disable-bios-updates: From 033df7a53293216d2548b8c5c85e83e6827e4bb8 Mon Sep 17 00:00:00 2001 From: RJ Trujillo Date: Fri, 24 Nov 2023 13:36:14 -0700 Subject: [PATCH 15/23] chore: Don't fetch negativo17 fedora multimedia repo twice (#582) chore: Remove redundant rpm-ostree invokation --- Containerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Containerfile b/Containerfile index 7a7b29c0..883f12b8 100644 --- a/Containerfile +++ b/Containerfile @@ -19,15 +19,14 @@ COPY system_files/desktop/shared system_files/desktop/${BASE_IMAGE_NAME} / # 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 RUN sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \ - wget https://negativo17.org/repos/fedora-multimedia.repo -O /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \ + sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \ rpm-ostree install \ /tmp/akmods-rpms/kmods/*xpadneo*.rpm \ /tmp/akmods-rpms/kmods/*xpad-noone*.rpm \ /tmp/akmods-rpms/kmods/*xone*.rpm \ /tmp/akmods-rpms/kmods/*openrazer*.rpm \ /tmp/akmods-rpms/kmods/*v4l2loopback*.rpm \ - /tmp/akmods-rpms/kmods/*wl*.rpm && \ - rpm-ostree install \ + /tmp/akmods-rpms/kmods/*wl*.rpm \ /tmp/akmods-rpms/kmods/*gcadapter_oc*.rpm \ /tmp/akmods-rpms/kmods/*nct6687*.rpm \ /tmp/akmods-rpms/kmods/*openrgb*.rpm \ From 31ae97ad6ccb3584f042ecfe619162ca39be623a Mon Sep 17 00:00:00 2001 From: RJ Trujillo Date: Fri, 24 Nov 2023 17:00:25 -0700 Subject: [PATCH 16/23] chore: Don't enable negativo17 fedora multimedia debug/source repos --- Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index 883f12b8..efb9382d 100644 --- a/Containerfile +++ b/Containerfile @@ -19,7 +19,7 @@ COPY system_files/desktop/shared system_files/desktop/${BASE_IMAGE_NAME} / # 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 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/negativo17-fedora-multimedia.repo && \ + sed -i "0,/enabled/ s@enabled=0@enabled=1@g" /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \ rpm-ostree install \ /tmp/akmods-rpms/kmods/*xpadneo*.rpm \ /tmp/akmods-rpms/kmods/*xpad-noone*.rpm \ From 95fdf2def9c110f2a3124155add7cb890980078c Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Fri, 24 Nov 2023 23:23:07 -0800 Subject: [PATCH 17/23] chore: Use new split gamescope-libs package --- Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index efb9382d..397889aa 100644 --- a/Containerfile +++ b/Containerfile @@ -253,7 +253,7 @@ RUN rpm-ostree override replace \ RUN if grep -qv "nvidia" <<< "${IMAGE_NAME}"; then \ rpm-ostree install \ gamescope.x86_64 \ - gamescope.i686 \ + gamescope-libs.i686 \ rocm-hip \ rocm-opencl \ rocm-clinfo \ From 083dda26c6f7935d1e6a07c53bf629c5924c83a7 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Sun, 26 Nov 2023 15:58:19 -0800 Subject: [PATCH 18/23] feat(desktop): Switch from CoreCtrl to LACT as the default AMD overclocking solution. --- .../usr/share/ublue-os/firstboot/yafti.yml | 2 +- .../usr/share/ublue-os/just/60-custom.just | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/system_files/desktop/shared/usr/share/ublue-os/firstboot/yafti.yml b/system_files/desktop/shared/usr/share/ublue-os/firstboot/yafti.yml index 65819ab5..f6025c76 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/firstboot/yafti.yml +++ b/system_files/desktop/shared/usr/share/ublue-os/firstboot/yafti.yml @@ -77,7 +77,7 @@ screens: show_terminal: true package_manager: yafti.plugin.run packages: - - CoreCtrl (GPU Overclocking): ujust install-corectrl + - LACT (GPU Overclocking): ujust install-lact nvidia-additions: source: yafti.screen.package values: diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just b/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just index b0097816..2ba4576c 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just +++ b/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just @@ -20,13 +20,19 @@ configure-waydroid: deactivate sudo rm -rf /tmp/waydroid_script -# Install CoreCtrl for overclocking & undervolting AMD GPUs -install-corectrl: - echo 'Installing CoreCtrl...' +# Install LACT for overclocking & undervolting AMD GPUs +install-lact: + echo 'Installing LACT...' ublue-update --wait - rpm-ostree install corectrl - echo 'Setting needed kargs for CoreCtrl...' + wget \ + $(curl -s https://api.github.com/repos/ilya-zlobintsev/LACT/releases/latest | \ + jq -r ".assets[] | select(.name | test(\"lact-.*fedora-$(rpm -E %fedora)\")) | .browser_download_url") \ + -P /tmp/lact.rpm + rpm-ostree install /tmp/lact.rpm + rm /tmp/lact.rpm + echo 'Setting needed kargs for LACT...' rpm-ostree kargs --append="amdgpu.ppfeaturemask=0xffffffff" + echo 'Done. Be sure to enable LACT with sudo systemctl enable --now lactd after you reboot.' # Install OpenRazer for Razer gaming hardware install-openrazer: From b3a7eccbdd23ad0fc0dec4452c4a4bfa34da7b17 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Sun, 26 Nov 2023 16:01:19 -0800 Subject: [PATCH 19/23] chore: Switch to upstream nix scripts in ublue-os/config --- .../usr/share/ublue-os/firstboot/yafti.yml | 4 +- .../usr/share/ublue-os/just/60-custom.just | 37 ------------------- .../usr/share/ublue-os/firstboot/yafti.yml | 4 +- .../usr/share/ublue-os/just/60-custom.just | 37 ------------------- 4 files changed, 4 insertions(+), 78 deletions(-) diff --git a/system_files/deck/shared/usr/share/ublue-os/firstboot/yafti.yml b/system_files/deck/shared/usr/share/ublue-os/firstboot/yafti.yml index a8841e41..b39acd50 100644 --- a/system_files/deck/shared/usr/share/ublue-os/firstboot/yafti.yml +++ b/system_files/deck/shared/usr/share/ublue-os/firstboot/yafti.yml @@ -69,8 +69,8 @@ screens: description: Nix is a powerful package manager for Linux and other Unix systems that makes package management reliable and reproducible default: false packages: - - Install Nix Package Support: sudo -A ujust install-nix - - Install Fleek (Requires Nix): ujust install-fleek + - Install Nix Package Support: sudo -A ujust nix-install + - Install Fleek (Requires Nix): ujust fleek-install Oversteer: description: Application to control supported steering wheels default: false diff --git a/system_files/deck/shared/usr/share/ublue-os/just/60-custom.just b/system_files/deck/shared/usr/share/ublue-os/just/60-custom.just index 61bc8dec..f6abcadc 100644 --- a/system_files/deck/shared/usr/share/ublue-os/just/60-custom.just +++ b/system_files/deck/shared/usr/share/ublue-os/just/60-custom.just @@ -68,43 +68,6 @@ install-openrazer: sudo usermod -a -G plugdev $USER && \ echo "Please reboot to apply needed changes." -# Install Nix with the Determinate Nix Installer -install-nix: - #!/usr/bin/env bash - curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sudo bash -s -- install --no-confirm - -# Uninstall Nix -remove-nix: - sudo /nix/nix-installer uninstall - -# Install Fleek (https://getfleek.dev/) -install-fleek: - #!/usr/bin/env bash - if [[ -d "/nix" ]]; then - mkdir -p $HOME/.config/nix - echo "experimental-features = nix-command flakes" >> $HOME/.config/nix/nix.conf - curl -fsSL https://getfleek.dev/installer | env FORCE=1 bash - else - echo "Install nix with ujust install-nix before running ujust install-fleek." - fi - -# Integrate Nix/Fleek applications with system theme -install-fleek-themes: - #!/usr/bin/env bash - if [[ -x "/var/usrlocal/bin/fleek" ]]; then - IMAGE_INFO="/usr/share/ublue-os/image-info.json" - BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) - if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then - fleek add adw-gtk3 --apply - else - fleek add breeze-icons - fleek add libsForQt5.breeze-qt5 - fleek apply - fi - else - echo "Install fleek with ujust install-fleek before running ujust install-fleek-themes." - fi - # Install Greenlight xCloud and xHome streaming AppImage get-greenlight: #!/usr/bin/env bash diff --git a/system_files/desktop/shared/usr/share/ublue-os/firstboot/yafti.yml b/system_files/desktop/shared/usr/share/ublue-os/firstboot/yafti.yml index f6025c76..b2a53d43 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/firstboot/yafti.yml +++ b/system_files/desktop/shared/usr/share/ublue-os/firstboot/yafti.yml @@ -31,8 +31,8 @@ screens: description: Nix is a powerful package manager for Linux and other Unix systems that makes package management reliable and reproducible default: false packages: - - Install Nix Package Support: sudo -A ujust install-nix - - Install Fleek (Requires Nix): ujust install-fleek + - Install Nix Package Support: sudo -A ujust nix-install + - Install Fleek (Requires Nix): ujust fleek-install OpenRazer: description: Enables additional capabilities for Razer Hardware default: false diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just b/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just index 2ba4576c..f81ebece 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just +++ b/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just @@ -45,43 +45,6 @@ install-openrazer: sudo usermod -a -G plugdev $USER && \ echo "Please reboot to apply needed changes." -# Install Nix with the Determinate Nix Installer -install-nix: - #!/usr/bin/env bash - curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sudo bash -s -- install --no-confirm - -# Uninstall Nix -remove-nix: - sudo /nix/nix-installer uninstall - -# Install Fleek (https://getfleek.dev/) -install-fleek: - #!/usr/bin/env bash - if [[ -d "/nix" ]]; then - mkdir -p $HOME/.config/nix - echo "experimental-features = nix-command flakes" >> $HOME/.config/nix/nix.conf - curl -fsSL https://getfleek.dev/installer | env FORCE=1 bash - else - echo "Install nix with ujust install-nix before running ujust install-fleek." - fi - -# Integrate Nix/Fleek applications with system theme -install-fleek-themes: - #!/usr/bin/env bash - if [[ -x "/var/usrlocal/bin/fleek" ]]; then - IMAGE_INFO="/usr/share/ublue-os/image-info.json" - BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) - if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then - fleek add adw-gtk3 --apply - else - fleek add breeze-icons - fleek add libsForQt5.breeze-qt5 - fleek apply - fi - else - echo "Install fleek with ujust install-fleek before running ujust install-fleek-themes." - fi - # Install Greenlight xCloud and xHome streaming AppImage get-greenlight: #!/usr/bin/env bash From d8ee04376d115568354a44aa2c977855e410ab37 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Sun, 26 Nov 2023 16:10:58 -0800 Subject: [PATCH 20/23] feat(desktop): Restore displaylink on desktop images, leave off of deck images until issues with MangoHUD are resolved. --- Containerfile | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Containerfile b/Containerfile index 397889aa..c74d39f8 100644 --- a/Containerfile +++ b/Containerfile @@ -20,18 +20,22 @@ COPY system_files/desktop/shared system_files/desktop/${BASE_IMAGE_NAME} / COPY --from=ghcr.io/ublue-os/akmods:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION} /rpms /tmp/akmods-rpms RUN sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \ sed -i "0,/enabled/ s@enabled=0@enabled=1@g" /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \ + if grep -qv "asus" <<< "${IMAGE_NAME}"; then \ + rpm-ostree install \ + /tmp/akmods-rpms/kmods/*evdi*.rpm \ + ; fi && \ rpm-ostree install \ - /tmp/akmods-rpms/kmods/*xpadneo*.rpm \ - /tmp/akmods-rpms/kmods/*xpad-noone*.rpm \ - /tmp/akmods-rpms/kmods/*xone*.rpm \ - /tmp/akmods-rpms/kmods/*openrazer*.rpm \ - /tmp/akmods-rpms/kmods/*v4l2loopback*.rpm \ - /tmp/akmods-rpms/kmods/*wl*.rpm \ /tmp/akmods-rpms/kmods/*gcadapter_oc*.rpm \ /tmp/akmods-rpms/kmods/*nct6687*.rpm \ + /tmp/akmods-rpms/kmods/*openrazer*.rpm \ /tmp/akmods-rpms/kmods/*openrgb*.rpm \ /tmp/akmods-rpms/kmods/*ryzen-smu*.rpm \ - /tmp/akmods-rpms/kmods/*winesync*.rpm && \ + /tmp/akmods-rpms/kmods/*v4l2loopback*.rpm \ + /tmp/akmods-rpms/kmods/*winesync*.rpm \ + /tmp/akmods-rpms/kmods/*wl*.rpm \ + /tmp/akmods-rpms/kmods/*xone*.rpm \ + /tmp/akmods-rpms/kmods/*xpad-noone*.rpm \ + /tmp/akmods-rpms/kmods/*xpadneo*.rpm && \ sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \ mkdir -p /etc/akmods-rpms/ && \ mv /tmp/akmods-rpms/kmods/*steamdeck*.rpm /etc/akmods-rpms/ @@ -363,6 +367,12 @@ RUN rpm-ostree install \ /etc/akmods-rpms/*steamdeck*.rpm && \ rm -rf /etc/akmods-rpms +# Remove Displaylink/evdi from Deck images until issues with MangoHUD are sorted out. +RUN if [[ -n $(rpm -qa | grep 'evdi\|displayport') ]]; then \ + rpm-ostree remove \ + $(rpm -qa | grep 'evdi\|displayport') \ + ; fi + # Configure KDE & GNOME RUN if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \ rpm-ostree override remove \ From 0a9758813f386cdd9621730f932f0d38bb52fd27 Mon Sep 17 00:00:00 2001 From: HikariKnight <2557889+HikariKnight@users.noreply.github.com> Date: Mon, 27 Nov 2023 01:12:38 +0100 Subject: [PATCH 21/23] feat: add initramfs rebuilding with support for user defined initramfs args (#586) * feat: add support for managing initramfs args without disrupting bazzite-hardware-setup needed_initramfs args * fix: make enable-vfio use new initramfs management * fix: quote the initramfs to not bug rpm-ostree * chore: sort argsfiles from args.d before parsing * chore: bump hw version and cleanup * chore: add missing indent for vfio section * fix: add missing reboot on rebuild of initramfs --- .../bazzite/initramfs/args.d/00-example.conf | 16 ++++++ .../shared/usr/bin/bazzite-hardware-setup | 56 +++++++++++++++---- .../usr/share/ublue-os/just/60-custom.just | 8 +-- 3 files changed, 65 insertions(+), 15 deletions(-) create mode 100644 system_files/desktop/shared/etc/bazzite/initramfs/args.d/00-example.conf diff --git a/system_files/desktop/shared/etc/bazzite/initramfs/args.d/00-example.conf b/system_files/desktop/shared/etc/bazzite/initramfs/args.d/00-example.conf new file mode 100644 index 00000000..e041c634 --- /dev/null +++ b/system_files/desktop/shared/etc/bazzite/initramfs/args.d/00-example.conf @@ -0,0 +1,16 @@ +# 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. +# +# 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 diff --git a/system_files/desktop/shared/usr/bin/bazzite-hardware-setup b/system_files/desktop/shared/usr/bin/bazzite-hardware-setup index 8ba104a0..0ec64d33 100755 --- a/system_files/desktop/shared/usr/bin/bazzite-hardware-setup +++ b/system_files/desktop/shared/usr/bin/bazzite-hardware-setup @@ -7,7 +7,7 @@ BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO) # SCRIPT VERSION -HWS_VER=15 +HWS_VER=16 HWS_VER_FILE="/etc/bazzite/hws_version" HWS_VER_RAN=$(cat $HWS_VER_FILE) @@ -19,17 +19,42 @@ KNOWN_IMAGE_FLAVOR=$(cat $KNOWN_IMAGE_FLAVOR_FILE) KNOWN_FEDORA_VERSION_FILE="/etc/bazzite/fedora_version" KNOWN_FEDORA_VERSION=$(cat $KNOWN_FEDORA_VERSION_FILE) -# 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 ]]; then - if [[ -f $KNOWN_FEDORA_VERSION_FILE && -f $KNOWN_FEDORA_VERSION_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 ]]; then - echo "Hardware setup has already run. Exiting..." - exit 0 +# 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 ]]; then + if [[ -f $KNOWN_FEDORA_VERSION_FILE && -f $KNOWN_FEDORA_VERSION_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 ]]; then + echo "Hardware setup has already run. Exiting..." + exit 0 + fi 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 @@ -62,10 +87,21 @@ for INITRAMFS_ARG in ${NEEDED_INITRAMFS[@]}; do 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 --arg="-I ${NEEDED_INITRAMFS[*]}" + rpm-ostree initramfs --enable "$INITRAMFS_BAZZITE_ARGS" "$INITRAMFS_CUSTOM_ARGS" else echo "No initramfs changes needed" fi diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just b/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just index f81ebece..1546d19f 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just +++ b/system_files/desktop/shared/usr/share/ublue-os/just/60-custom.just @@ -217,10 +217,8 @@ enable-vfio: CPU_VENDOR=$(grep "vendor_id" "/proc/cpuinfo" | uniq | awk -F": " '{ print $2 }') VENDOR_KARG="unset" if [[ ${VIRT_TEST} == *kvm.report_ignored_msrs* ]]; then - rpm-ostree initramfs \ - --enable \ - --arg="--add-drivers" \ - --arg="vfio vfio_iommu_type1 vfio-pci" + echo 'add_drivers+=" vfio vfio_iommu_type1 vfio-pci "' | sudo tee /etc/dracut.conf.d/vfio.conf + sudo touch /etc/bazzite/initramfs/rebuild if [[ ${CPU_VENDOR} == "AuthenticAMD" ]]; then VENDOR_KARG="amd_iommu=on" elif [[ ${CPU_VENDOR} == "GenuineIntel" ]]; then @@ -235,7 +233,7 @@ enable-vfio: --append-if-missing="iommu=pt" \ --append-if-missing="rd.driver.pre=vfio_pci" \ --append-if-missing="vfio_pci.disable_vga=1" - echo "VFIO enabled, make sure you enable IOMMU, VT-d or AMD-v in your BIOS!" + echo "VFIO will be enabled on next boot, make sure you enable IOMMU, VT-d or AMD-v in your BIOS!" echo "Please understand that since this is such a niche use case, support will be very limited!" echo "To add your unused/second GPU device ids to the vfio driver by running" echo 'rpm-ostree kargs --append-if-missing="vfio-pci.ids=xxxx:yyyy,xxxx:yyzz"' From eb775c14175f90ecef32ab7a2d2969a865b05c31 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Sun, 26 Nov 2023 16:20:28 -0800 Subject: [PATCH 22/23] chore: Use AKMODS_FLAVOR for evdi check --- Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index c74d39f8..4a6bb78c 100644 --- a/Containerfile +++ b/Containerfile @@ -20,7 +20,7 @@ COPY system_files/desktop/shared system_files/desktop/${BASE_IMAGE_NAME} / COPY --from=ghcr.io/ublue-os/akmods:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION} /rpms /tmp/akmods-rpms RUN sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \ sed -i "0,/enabled/ s@enabled=0@enabled=1@g" /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \ - if grep -qv "asus" <<< "${IMAGE_NAME}"; then \ + if grep -qv "asus" <<< "${AKMODS_FLAVOR}"; then \ rpm-ostree install \ /tmp/akmods-rpms/kmods/*evdi*.rpm \ ; fi && \ From f6f407e8e16e944fae5b0a7b5ced8877e241bbb4 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Sun, 26 Nov 2023 19:08:44 -0800 Subject: [PATCH 23/23] fix(legion): Disable X11 by default to correct issues with display rotation --- system_files/desktop/shared/usr/bin/bazzite-hardware-setup | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/system_files/desktop/shared/usr/bin/bazzite-hardware-setup b/system_files/desktop/shared/usr/bin/bazzite-hardware-setup index 0ec64d33..feb94eb7 100755 --- a/system_files/desktop/shared/usr/bin/bazzite-hardware-setup +++ b/system_files/desktop/shared/usr/bin/bazzite-hardware-setup @@ -7,7 +7,7 @@ BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO) # SCRIPT VERSION -HWS_VER=16 +HWS_VER=17 HWS_VER_FILE="/etc/bazzite/hws_version" HWS_VER_RAN=$(cat $HWS_VER_FILE) @@ -185,6 +185,11 @@ if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" || $IMAGE_NAME =~ "framegam systemctl disable --now ryzenadj.service systemctl disable --now batterylimit.service systemctl --global disable --now sdgyrodsu.service + + if [[ ":83E1:" =~ ":$SYS_ID:" ]]; then + echo "Lenovo Legion detected. Swapping to X11 by default." + sed -i 's/DESKTOP_WAYLAND=true/DESKTOP_WAYLAND=false/g' /etc/desktop-wayland + fi fi fi