Skip to content

Commit 5903f27

Browse files
authored
Merge pull request #76 from ublue-os/main
[pull] main from ublue-os:main
2 parents b442f2f + ebe4cd9 commit 5903f27

File tree

14 files changed

+180
-64
lines changed

14 files changed

+180
-64
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ jobs:
321321
# Reprocess raw-img using rechunker which will delete it
322322
- name: Run Rechunker
323323
id: rechunk
324-
uses: hhd-dev/rechunk@v1.0.1
324+
uses: hhd-dev/rechunk@v1.1.1
325325
with:
326326
rechunk: 'ghcr.io/hhd-dev/rechunk:v1.0.1'
327327
ref: 'raw-img'

.github/workflows/build_mkdocs/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ runs:
4040
python-version: "3.12"
4141

4242
- name: Install Poetry
43-
uses: abatilo/actions-poetry@v2
43+
uses: abatilo/actions-poetry@v4
4444

4545
- name: Configure Poetry
4646
working-directory: ${{ inputs.working_dir }}
@@ -75,7 +75,7 @@ runs:
7575
7676
- name: Setup Pages
7777
if: ${{ inputs.upload_github_page == 'true' }}
78-
uses: actions/configure-pages@v4
78+
uses: actions/configure-pages@v5
7979
with:
8080
token: ${{ inputs.github_token }}
8181

Containerfile

+9
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
197197
--from repo=updates \
198198
libxcrypt \
199199
|| true && \
200+
rpm-ostree override replace \
201+
--experimental \
202+
--from repo=updates \
203+
SDL2 \
204+
|| true && \
200205
if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
201206
rpm-ostree override replace \
202207
--experimental \
@@ -999,7 +1004,11 @@ RUN /usr/libexec/containerbuild/image-info && \
9991004
systemctl enable cec-onpoweroff.service && \
10001005
systemctl enable cec-onsleep.service && \
10011006
systemctl enable bazzite-tdpfix.service && \
1007+
systemctl enable bazzite-grub-boot-success.timer && \
1008+
systemctl enable bazzite-grub-boot-success.service && \
10021009
systemctl --global disable sdgyrodsu.service && \
1010+
systemctl --global disable grub-boot-success.timer && \
1011+
systemctl disable grub-boot-indeterminate.service && \
10031012
systemctl disable input-remapper.service && \
10041013
systemctl disable ublue-update.timer && \
10051014
systemctl disable jupiter-fan-control.service && \

artifacthub-repo.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repositoryID: 6f68e5bb-ffaf-4a70-9c1b-b154b772044e
2+
owners: # (optional, used to claim repository ownership)
3+
- name: Jorge Castro
4+
email: jorge.castro@gmail.com
5+
#ignore: # (optional, packages that should not be indexed by Artifact Hub)
6+
# - name: package1
7+
# - name: package2 # Exact match

spec_files/gamescope/gamescope.spec

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Name: gamescope
1010
#Version: 100.%{gamescope_tag}
11-
Version: 103.%{short_commit}
11+
Version: 105.%{short_commit}
1212
Release: 1.bazzite
1313
Summary: Micro-compositor for video games on Wayland
1414

@@ -113,8 +113,7 @@ sed -i 's^../thirdparty/SPIRV-Headers/include/spirv/^/usr/include/spirv/^' src/m
113113
cd gamescope
114114
export PKG_CONFIG_PATH=pkgconfig
115115
%meson \
116-
--auto-features=enabled \
117-
-Dforce_fallback_for=vkroots,wlroots,libliftoff
116+
-Dforce_fallback_for=libdisplay-info,libliftoff,wlroots,vkroots
118117
%meson_build
119118

120119
%install

spec_files/gamescope/handheld.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Subject: [NA] add dev script
1010

1111
diff --git a/sync.sh b/sync.sh
1212
new file mode 100755
13-
index 0000000..878bf6c
13+
index 0000000..676d652
1414
--- /dev/null
1515
+++ b/sync.sh
1616
@@ -0,0 +1,21 @@
@@ -30,7 +30,7 @@ index 0000000..878bf6c
3030
+scp build/src/gamescope ${HOST}:gamescope
3131
+
3232
+ssh $HOST /bin/bash << EOF
33-
+ sudo rpm-ostree usroverlay --hotfix
33+
+ sudo rpm-ostree usroverlay
3434
+ sudo mv ~/gamescope /usr/bin/gamescope
3535
+ bazzite-session-select gamescope
3636
+ # sudo reboot
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# In the future this can do more complex checks to ensure the update is
2+
# successful. For now, just assume the user will hold the button or
3+
# something within 5 minutes if boot fails.
4+
5+
[Unit]
6+
Description=Mark boot as successful and reset counter
7+
DefaultDependencies=no
8+
Before=shutdown.target
9+
10+
[Service]
11+
Type=oneshot
12+
ExecStart=/usr/libexec/bazzite-grub-boot-success
13+
14+
[Install]
15+
WantedBy=hibernate.target hybrid-sleep.target suspend-then-hibernate.target halt.target reboot.target shutdown.target
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[Unit]
2+
Description=Mark update as successful after the system has been alive for 3 minutes.
3+
4+
[Timer]
5+
OnStartupSec=3min
6+
7+
[Install]
8+
WantedBy=timers.target
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
set -eo pipefail
4+
5+
maxbootcount=2
6+
7+
if ! /usr/bin/grub2-editenv - set boot_success=1; then
8+
exit 1
9+
fi
10+
11+
if ! /usr/bin/grub2-editenv - set boot_indeterminate=0; then
12+
exit 1
13+
fi
14+
15+
if [ ! -f /usr/bin/bootc ] ||
16+
[ "$(sudo /usr/bin/bootc status --json | jq ".status.rollback")" == "null" ]; then
17+
if ! /usr/bin/grub2-editenv - unset boot_counter; then
18+
exit 1
19+
fi
20+
echo "Marking boot as succeeded, setting boot_success=1 and unsetting boot_counter (missing rollback)"
21+
else
22+
if ! /usr/bin/grub2-editenv - set boot_counter="$maxbootcount"; then
23+
exit 1
24+
fi
25+
echo "Marking boot as succeeded, setting boot_counter=$maxbootcount and boot_success=1"
26+
fi

system_files/desktop/shared/usr/bin/bazzite-steam

+52-7
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@ if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" ]]; then
1515
fi
1616
fi
1717

18+
DECK_STARTUP="/usr/share/ublue-os/bazzite/bazzite.webm"
19+
DECK_SUSPEND="/usr/share/ublue-os/bazzite/bazzite-suspend.webm"
20+
OLED_STARTUP="/usr/share/ublue-os/bazzite/bazzite-oled.webm"
21+
OLED_SUSPEND="/usr/share/ublue-os/bazzite/bazzite-suspend-oled.webm"
22+
1823
# Check for Galileo model
1924
if [[ ":Galileo:" =~ ":$SYS_ID:" ]]; then
20-
VIDEO_STARTUP="/usr/share/ublue-os/bazzite/bazzite-oled.webm"
21-
VIDEO_SUSPEND="/usr/share/ublue-os/bazzite/bazzite-suspend-oled.webm"
25+
VIDEO_STARTUP=$OLED_STARTUP
26+
VIDEO_SUSPEND=$OLED_SUSPEND
2227
else
23-
VIDEO_STARTUP="/usr/share/ublue-os/bazzite/bazzite.webm"
24-
VIDEO_SUSPEND="/usr/share/ublue-os/bazzite/bazzite-suspend.webm"
28+
VIDEO_STARTUP=$DECK_STARTUP
29+
VIDEO_SUSPEND=$DECK_SUSPEND
2530
fi
2631

2732
# Install Bazzite's Steam Game Mode Startup & Suspend Videos
@@ -30,13 +35,38 @@ if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" ]]; then
3035
if [ ! -f $HOME/.local/share/Steam/config/uioverrides/movies/bazzite_novideo ]; then
3136

3237
LOCATION_STARTUP=$HOME/.local/share/Steam/config/uioverrides/movies/deck_startup.webm
33-
LOCATION_SUSPEND=$HOME/.local/share/Steam/config/uioverrides/movies/deck-suspend-animation.webm
34-
LOCATION_THROBBER=$HOME/.local/share/Steam/config/uioverrides/movies/deck-suspend-animation-from-throbber.webm
35-
38+
LOCATION_STARTUP_DECK=$HOME/.local/share/Steam/steamui/movies/deck_startup.webm
39+
LOCATION_STARTUP_OLED=$HOME/.local/share/Steam/steamui/movies/oled_startup.webm
40+
3641
if ! cmp --silent $VIDEO_STARTUP $LOCATION_STARTUP; then
3742
cp $VIDEO_STARTUP $LOCATION_STARTUP
3843
fi
3944

45+
if ! cmp --silent $DECK_STARTUP $LOCATION_STARTUP_DECK; then
46+
cp $DECK_STARTUP $LOCATION_STARTUP_DECK
47+
fi
48+
49+
if ! cmp --silent $OLED_STARTUP $LOCATION_STARTUP_OLED; then
50+
cp $OLED_STARTUP $LOCATION_STARTUP_OLED
51+
fi
52+
53+
LOCATION_SUSPEND_OLD=$HOME/.local/share/Steam/config/uioverrides/movies/deck-suspend-animation.webm
54+
LOCATION_THROBBER_OLD=$HOME/.local/share/Steam/config/uioverrides/movies/deck-suspend-animation-from-throbber.webm
55+
LOCATION_SUSPEND=$HOME/.local/share/Steam/config/uioverrides/movies/steam_os_suspend.webm
56+
LOCATION_THROBBER=$HOME/.local/share/Steam/config/uioverrides/movies/deck-suspend-animation-from-throbber.webm
57+
LOCATION_SUSPEND_DECK=$HOME/.local/share/Steam/steamui/movies/deck-suspend-animation-from-throbber.webm
58+
LOCATION_THROBBER_DECK=$HOME/.local/share/Steam/steamui/movies/deck-suspend-animation.webm
59+
LOCATION_SUSPEND_OLED=$HOME/.local/share/Steam/steamui/movies/oled-suspend-animation-from-throbber.webm
60+
LOCATION_THROBBER_OLED=$HOME/.local/share/Steam/steamui/movies/oled-suspend-animation.webm
61+
62+
if ! cmp --silent $VIDEO_SUSPEND $LOCATION_SUSPEND_OLD; then
63+
cp $VIDEO_SUSPEND $LOCATION_SUSPEND_OLD
64+
fi
65+
66+
if ! cmp --silent $VIDEO_SUSPEND $LOCATION_THROBBER_OLD; then
67+
cp $VIDEO_SUSPEND $LOCATION_THROBBER_OLD
68+
fi
69+
4070
if ! cmp --silent $VIDEO_SUSPEND $LOCATION_SUSPEND; then
4171
cp $VIDEO_SUSPEND $LOCATION_SUSPEND
4272
fi
@@ -45,6 +75,21 @@ if [[ $IMAGE_NAME =~ "deck" || $IMAGE_NAME =~ "ally" ]]; then
4575
cp $VIDEO_SUSPEND $LOCATION_THROBBER
4676
fi
4777

78+
if ! cmp --silent $DECK_SUSPEND $LOCATION_SUSPEND_DECK; then
79+
cp $DECK_SUSPEND $LOCATION_SUSPEND_DECK
80+
fi
81+
82+
if ! cmp --silent $DECK_SUSPEND $LOCATION_THROBBER_DECK; then
83+
cp $DECK_SUSPEND $LOCATION_THROBBER_DECK
84+
fi
85+
86+
if ! cmp --silent $OLED_SUSPEND $LOCATION_SUSPEND_OLED; then
87+
cp $OLED_SUSPEND $LOCATION_SUSPEND_OLED
88+
fi
89+
90+
if ! cmp --silent $OLED_SUSPEND $LOCATION_THROBBER_OLED; then
91+
cp $OLED_SUSPEND $LOCATION_THROBBER_OLED
92+
fi
4893
fi
4994

5095
# Required to maintain the Steam update branch between desktop & Steam Game Mode

system_files/desktop/shared/usr/libexec/bazzite-hardware-setup

+44
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,50 @@ if [ ! -f /etc/bazzite/fixups/snapper_cleanup ] &&
340340
fi
341341
touch /etc/bazzite/fixups/snapper_cleanup
342342

343+
if [ ! -f /etc/bazzite/fixups/grub_fixup ]; then
344+
# Grub settings
345+
# Set grub timeout to 3 seconds
346+
if [ -z $(grep "GRUB_TIMEOUT=" /etc/default/grub) ]; then
347+
echo "GRUB_TIMEOUT=3" >> /etc/default/grub
348+
else
349+
sed -i 's/GRUB_TIMEOUT=[0-9]*/GRUB_TIMEOUT=3/' /etc/default/grub
350+
fi
351+
352+
# Nuke hidden timeout as it will cause issues if GRUB_TIMEOUT exists
353+
if [ -n $(grep "GRUB_HIDDEN_TIMEOUT=" /etc/default/grub) ]; then
354+
sed -i 's/GRUB_HIDDEN_TIMEOUT=[0-9]*//' /etc/default/grub
355+
fi
356+
357+
# set timeout style to menu to show grub during countdown
358+
# (unless GRUB_TIMEOUT=0)
359+
if [ -z $(grep "GRUB_TIMEOUT_STYLE=" /etc/default/grub) ]; then
360+
echo "GRUB_TIMEOUT_STYLE=menu" >> /etc/default/grub
361+
else
362+
sed -i 's/GRUB_TIMEOUT_STYLE=.*/GRUB_TIMEOUT_STYLE=menu/' /etc/default/grub
363+
fi
364+
365+
# Autohide grub menu if boot is successful
366+
# menu_auto_hide=2 hides grub menu if previous boot is successful
367+
# menu_auto_hide=1 same, except not if Windows/Other OS is installed
368+
# Deck images cant use grub menu and often dual boot, so hide it always
369+
# For desktop images, hide it only if no other OS is installed
370+
if [[ $IMAGE_NAME =~ "deck" ]]; then
371+
grub2-editenv - set menu_auto_hide=2
372+
else
373+
grub2-editenv - set menu_auto_hide=1
374+
fi
375+
376+
# Update grub
377+
if [ -d /sys/firmware/efi ]; then
378+
echo "Updating EFI grub config"
379+
grub2-mkconfig -o /etc/grub2-efi.cfg
380+
else
381+
echo "Updating BIOS grub config"
382+
grub2-mkconfig -o /etc/grub2.cfg
383+
fi
384+
fi
385+
touch /etc/bazzite/fixups/grub_fixup
386+
343387
mkdir -p /etc/bazzite
344388
echo $HWS_VER > $HWS_VER_FILE
345389
echo $IMAGE_NAME > $KNOWN_IMAGE_NAME_FILE

system_files/desktop/shared/usr/libexec/ublue-motd

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ if [[ -f "$TIP_FILE" ]]; then
3333
THEME=$(gsettings get org.gnome.desktop.interface accent-color || echo "'purple'")
3434
THEME=${THEME//\'/}
3535
THEME=${MOTD_FORCE_THEME:-$THEME}
36-
36+
3737
sed -e "s/%IMAGE_NAME%/$IMAGE_NAME_ESCAPED/g" -e "s/%IMAGE_BRANCH%/$IMAGE_BRANCH_ESCAPED/g" -e "s/%TIP%/$TIP_ESCAPED/g" /usr/share/ublue-os/motd/bazzite.md | tr '~' '\n' | /usr/bin/glow -s /usr/share/ublue-os/motd/themes/$COLOR_SCHEME/$THEME.json -w 78 -
3838
fi

system_files/desktop/shared/usr/share/ublue-os/just/80-bazzite.just

+10-48
Original file line numberDiff line numberDiff line change
@@ -16,54 +16,16 @@ _install-system-flatpaks:
1616
# Configure grub bootmenu visibility and fix duplicate entries
1717
configure-grub ACTION="":
1818
#!/usr/bin/bash
19-
source /usr/lib/ujust/ujust.sh
20-
sudo touch /etc/default/grub
21-
GRUB_STATE="$(grep -P "^GRUB_TIMEOUT_STYLE=hidden" /etc/default/grub)"
22-
OPTION={{ ACTION }}
23-
if [ "$GRUB_STATE" == "GRUB_TIMEOUT_STYLE=hidden" ]; then
24-
GRUB_STATE="${b}Hidden${n}"
25-
else
26-
GRUB_STATE="${b}Not Hidden${n}"
27-
fi
28-
if [ "$OPTION" == "help" ]; then
29-
echo "Usage: ujust configure-grub <option>"
30-
echo " <option>: Specify the quick option to skip the prompt"
31-
echo " Use 'hide' to select Hide Grub"
32-
echo " Use 'unhide' to select Unhide Grub"
33-
echo " Use 'fix' to select Fix double ostree entry"
34-
exit 0
35-
elif [ "$OPTION" == "" ]; then
36-
echo "${bold}Grub menu configuration${normal}"
37-
echo "Grub menu is set to: $GRUB_STATE"
38-
OPTION=$(Choose "Hide Grub" "Unhide Grub" "Fix double ostree entry")
39-
fi
40-
if [[ "${OPTION,,}" =~ ^hide ]]; then
41-
grep -q '^GRUB_TIMEOUT=' /etc/default/grub || echo 'GRUB_TIMEOUT=0' | sudo tee -a /etc/default/grub 1>/dev/null
42-
sudo sed -i 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=0/g' /etc/default/grub
43-
echo 'GRUB_TIMEOUT_STYLE=hidden' | sudo tee -a /etc/default/grub 1>/dev/null
44-
echo 'GRUB_HIDDEN_TIMEOUT=1' | sudo tee -a /etc/default/grub 1>/dev/null
45-
if [ -d /sys/firmware/efi ]; then
46-
sudo grub2-mkconfig -o /etc/grub2-efi.cfg
47-
else
48-
sudo grub2-mkconfig -o /etc/grub2.cfg
49-
fi
50-
elif [[ "${OPTION,,}" =~ ^unhide ]]; then
51-
sudo sed -i '/GRUB_HIDDEN_TIMEOUT=1/d' /etc/default/grub
52-
sudo sed -i '/GRUB_TIMEOUT_STYLE=hidden/d' /etc/default/grub
53-
sudo sed -i 's/GRUB_TIMEOUT=0/GRUB_TIMEOUT=5/g' /etc/default/grub
54-
if [ -d /sys/firmware/efi ]; then
55-
sudo grub2-mkconfig -o /etc/grub2-efi.cfg
56-
else
57-
sudo grub2-mkconfig -o /etc/grub2.cfg
58-
fi
59-
elif [[ "${OPTION,,}" =~ ^fix ]]; then
60-
sudo grub2-switch-to-blscfg
61-
if [ -d /sys/firmware/efi ]; then
62-
sudo grub2-mkconfig -o /etc/grub2-efi.cfg
63-
else
64-
sudo grub2-mkconfig -o /etc/grub2.cfg
65-
fi
66-
fi
19+
echo "Editing grub is no longer recommended and this script has been removed"
20+
echo
21+
echo "Reason:"
22+
echo "Grub is auto-hidden now on successful boots and reappears only if you"
23+
echo "shutdown too early. You can still access it by holding shift. Deck"
24+
echo "images will also automatically rollback after 2 failed boots, so grub"
25+
echo "will need to be visible for you to see that."
26+
echo
27+
echo "You can edit /etc/default/grub to change settings manually, then:"
28+
echo "grub2-mkconfig -o /etc/grub2-efi.cfg"
6729

6830
# Add user to "input" group required by certain controller drivers
6931
add-user-to-input-group:

system_files/desktop/shared/usr/share/ublue-os/motd/bazzite.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
- **󰈙** [Documentation](http://docs.bazzite.gg/)
1414
- **󰙯** [Discord](https://discord.bazzite.gg/)
1515
- **󰫑** [Mastodon](https://fosstodon.org/@UniversalBlue)
16+
- **** [Bluesky](https://bsky.app/profile/bazzite.gg)

0 commit comments

Comments
 (0)