Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions initial-setup.spec
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ Summary: Run the initial-setup GUI in Wayland
Requires: %{name}-gui = %{version}-%{release}
Requires: weston
Requires: xorg-x11-server-Xwayland
Requires: kbd

Provides: firstboot(gui-backend)
Conflicts: firstboot(gui-backend)
Expand Down
18 changes: 17 additions & 1 deletion scripts/run-gui-backend.guiweston
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,24 @@ EOF

chmod +x ${RUN_SCRIPT}

weston --config=${CONFIG_FILE} --socket=wl-firstboot-0
original_vt=
if [ -n "$XDG_VTNR" ]; then
original_vt=$(fgconsole)
# change to VT on which we run to get access to devices
chvt "${XDG_VTNR}"
fi
Comment on lines +27 to +32

cards=$(ls -d /sys/class/drm/card*| grep -v -- -| cut -d / -f 5)
primary_card=$(echo "$cards" | head -1 )
secondary_cards=$(echo "$cards"|
tail -n +2|
xargs printf "%s,")

weston --config=${CONFIG_FILE} --socket=wl-firstboot-0 --drm-device="$primary_card" --additional-devices="$secondary_cards"
Comment on lines +34 to +40

@KKoukiou KKoukiou Jun 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this i wrong. I have only one card and I don't get this:

kkoukiou@fedora:~/repos/anaconda-webui$ cards=$(ls -d /sys/class/drm/card*| grep -v -- -| cut -d / -f 5)
kkoukiou@fedora:~/repos/anaconda-webui$ primary_card=$(echo "$cards" | head -1 )
kkoukiou@fedora:~/repos/anaconda-webui$ echo $primary_card
card1
kkoukiou@fedora:~/repos/anaconda-webui$ secondary_cards=$(echo "$cards"|
                  tail -n +2|
                  xargs printf "%s,")
kkoukiou@fedora:~/repos/anaconda-webui$ echo $secondary_card

@rvykydal rvykydal Jun 3, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KKoukiou I think the difference is you are echoing $secondary_card instead of $secondary_cards
My check:

[prnot5 ~/work/scratch]$ cards=$(ls -d /sys/class/drm/card*| grep -v -- -| cut -d / -f 5)
[prnot5 ~/work/scratch]$ primary_card=$(echo "$cards" | head -1 )
[prnot5 ~/work/scratch]$ echo $primary_card
card1
[prnot5 ~/work/scratch]$ secondary_cards=$(echo "$cards"|
                  tail -n +2|
                  xargs printf "%s,")
[prnot5 ~/work/scratch]$ echo $secondary_cards
,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But as I said below I am not sure if comma is harmful for the command option.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--additional-devices=, seems to work just fine. weston uses strtok() to parse that option, it it skips empty names.

exit_code=$(< ${EXIT_CODE_SAVE})

rm ${CONFIG_FILE} ${RUN_SCRIPT} ${EXIT_CODE_SAVE}
if [ -n "$original_vt" ]; then
chvt "$original_vt"
fi
exit $exit_code