Skip to content

Commit

Permalink
kernel-boot-log.sh: add new show_daemons_session_display()
Browse files Browse the repository at this point in the history
We started showing part of i915_display_info a long time ago but only
when `systemctl is-system-running` failed. Because of recent HDMI issues
like thesofproject/linux#4861 and others we
want to show more and we want to show it always.

Signed-off-by: Marc Herbert <[email protected]>
  • Loading branch information
marc-hb committed Mar 29, 2024
1 parent c44b9f7 commit d3ed65a
Showing 1 changed file with 35 additions and 4 deletions.
39 changes: 35 additions & 4 deletions test-case/verify-kernel-boot-log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ main()
# print the BIOS version
sudo dmidecode --type 0

show_daemons_session_display

wait_is_system_running --system
[ "$(id -un)" = root ] ||
wait_is_system_running --user
Expand Down Expand Up @@ -68,15 +70,44 @@ wait_is_system_running()
systemctl "$manager" --no-pager --failed
systemctl "$manager" | grep -v active
systemctl "$manager" is-system-running
# See https://github.com/thesofproject/sof-test/discussions/964
DISPLAY=:0 xrandr --listmonitors
DISPLAY=:1024 xrandr --listmonitors
sudo grep -i connected /sys/kernel/debug/dri/0/i915_display_info

# This subshell is best-effort diagnostics: don't let the exit
# status of the previous command(s) affect the test result
true
)
die "Some services are not running correctly"
}


show_daemons_session_display()
{
( set +e
# --all *session* shows whether someone is logged in or not because
# audio daemons differ, see commit 7ffd738bc81d. Also shows whether
# X11 or Wayland runs - or nothing at all! See
# https://github.com/thesofproject/sof-test/discussions/964
systemctl list-unit-files --user '*pipewire*' '*audio*'
printf '\n'
systemctl list-units --user --all '*session*' '*pipewire*' '*audio*'
printf '\n'

# See https://github.com/thesofproject/sof-test/discussions/964
# and https://github.com/thesofproject/linux/issues/4861
(set -x
DISPLAY=:0 xrandr --listmonitors
DISPLAY=:1024 xrandr --listmonitors
)
printf '\n'
sudo grep -B3 -A1 -i -e connected -e enabled -e active -e audio \
/sys/kernel/debug/dri/0/i915_display_info
printf '\n'

( set -x; gsettings get org.gnome.desktop.session idle-delay )
printf '\n'
)
}


# Flood usually from gdm3 but keep this function generic
# https://github.com/thesofproject/sof-test/discussions/998
detect_log_flood()
Expand Down

0 comments on commit d3ed65a

Please sign in to comment.