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 <marc.herbert@intel.com>
  • Loading branch information
marc-hb committed Mar 30, 2024
1 parent c44b9f7 commit dac8f96
Showing 1 changed file with 41 additions and 4 deletions.
45 changes: 41 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,50 @@ 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

# '*session*' and 'gvfs-*' shows whether someone is currently logged
# in some GNOME or other session or not because Audio daemons differ
# in different cases, see commit 7ffd738bc81d. Some audio daemons
# can also linger after logging out. This also shows whether X11 or
# Wayland runs - or nothing at all! The lack of gnome-session-*
# displayed here can be due a switch to lightdm or to
# AutomaticLogin* not being enabled in /etc/gdm3/custom.conf. For
# more see https://github.com/thesofproject/sof-test/discussions/964
systemctl list-units '*dm*.service'; printf '\n'
systemctl list-unit-files --user '*pipewire*' '*audio*'
printf '\n'
systemctl list-units --user --all '*session*' '*pipewire*' '*audio*' 'gvfs-*'
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 dac8f96

Please sign in to comment.