Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux: Unified system info summary #177

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mihawk90
Copy link
Contributor

@mihawk90 mihawk90 commented Jan 29, 2025

Description

After the merging of #161 Linux logs output (typically) 3 separate bullet points for the system information (Distro, Display Server, Desktop Environment), which looks odd and lengthens the page or bot summary.

Since all are merely informational and without help texts, this combines all 3 points into a single one. The Flatpak extension helptext is shown alongside it when appropriate.

For this I chose to extract the simple X11/Wayland checks into their own functions to make them reusable in other check functions.

Motivation and Context

It was noted on Discord in the #documentation channel that the current presentation looks - for lack of a better word - "weird" and might lead users to think that the output is bugged.

Of course the output works exactly as intended because it was primarily meant for OBS Bot output. However I was thinking about shortening the OBS Bot output anyway, but at the time of the PR I just didn't think of this fairly simple solution.

How Has This Been Tested?

I used the same logs as used in #161 to check that there were no regressions in the output. Additionally I used a manually altered log to test:

#!/bin/bash

echo "===== Snap ====="
./loganalyzer.py --url "https://obsproject.com/logs/a8VNcRHD4vjHol3P"

echo "===== Flatpak ====="
./loganalyzer.py --url "https://obsproject.com/logs/MXdrIL75xKFyPNom"

echo "===== Wayland ====="
./loganalyzer.py --url "https://obsproject.com/logs/MXdrIL75xKFyPNom"

echo "===== XWayland ====="
./loganalyzer.py --url "https://obsproject.com/logs/1FaZYJAAwOsKvUxX"

echo "===== Wayland + no pipewire ====="
./loganalyzer.py --url "https://obsproject.com/logs/CN9BBx9uPPjBcGlA"

echo "===== X11 ====="
./loganalyzer.py --url "https://obsproject.com/logs/jBUCYqPE5LRHMRHB"

echo "===== X11 + PipeWire sources ====="
./loganalyzer.py --url "https://obsproject.com/logs/MQhnzM1TFjBgdxrO"

echo "===== Ubuntu 20.04 on Wayland ====="
./loganalyzer.py --url "https://obsproject.com/logs/xU4dQ1JTcnSJFnvx"

echo "===== Borked Log ====="
./loganalyzer.py --file "borked.log"
$ cat borked.log
04:10:50.647: Using EGL/X11
04:10:50.647: CPU Name: AMD Ryzen 9 5900X 12-Core Processor
04:10:50.647: CPU Speed: 3545.114MHz
04:10:50.648: Physical Cores: 12, Logical Cores: 24
04:10:50.648: Physical Memory: 15895MB Total, 1922MB Free
04:10:50.648: Kernel Version: Linux 6.12.9-200.fc41.x86_64
04:10:50.648: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
04:10:50.649: Qt Version: 6.8.1 (runtime), 6.8.1 (compiled)
04:10:50.649: Portable mode: false
04:10:50.684: OBS 31.0.1 (linux)
04:10:50.684: ---------------------------------
04:10:50.710: ---------------------------------
04:10:50.710: audio settings reset:
04:10:50.710: 	samples per sec: 48000
04:10:50.710: 	speakers:        2
04:10:50.710: 	max buffering:   960 milliseconds
04:10:50.710: 	buffering type:  dynamically increasing
04:10:50.718: ---------------------------------
04:10:50.718: Initializing OpenGL...
04:10:50.762: Loading up OpenGL on adapter AMD AMD Radeon RX 7700 XT (radeonsi, navi32, LLVM 19.1.5, DRM 3.59, 6.12.9-200.fc41.x86_64)
04:10:50.762: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 24.3.3, shading language 4.60

Types of changes

  • Tweak (non-breaking change to improve existing functionality)
  • Code cleanup (non-breaking change which makes code smaller or more readable)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

Currently Linux logs output (typically) 3 separate bullet points for the
system information (Distro, Display Server, Desktop Environment), which
looks odd and lengthens the page or bot summary.

Since all are merely informational and without help texts, this combines
all 3 points into a single one. The Flatpak extension helptext is shown
alongside it when appropriate.

For this I chose to extract the simple X11/Wayland checks into their own
functions to make them reusable in other check functions.
@mihawk90 mihawk90 mentioned this pull request Jan 29, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant