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

checks: Add various detections specific to Linux #161

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

mihawk90
Copy link
Contributor

@mihawk90 mihawk90 commented May 31, 2024

Description

This adds various detections aimed at helping us in linux-support to provide help quicker without having to dive deep into the log with every user. This should cover the most of the common questions and issues, and the myriad of possible combinations encountered on Discord.

Changes in detail:

  • renamed wayland.py to linux.py since this isn't just for Wayland anymore
  • moved the snap detection merged in core: Add Detection of unofficial Snap Package #137 to linux.py
  • for X11 vs. Wayland
    • useful for advice on the various capture methods
    • CRITICAL XWayland was already logged
    • INFO Wayland was previously already detected, but not logged
    • INFO X11 Logging + recommended captures
    • WARNING Also logs PipeWire capture sources being used on X11. Currently this is only relevant for very recent GNOME versions and for recent(-ish) KDE versions. KDE doesn't actually support this either, but still advertises availability.
    • CRITICAL On Wayland this also logs when no PipeWire captures are available
  • INFO Log usage of the Flatpak package
    • helps to know this is an official package and is also relevant for plugin installation
  • INFO Distro + Version if available (unfortunately not on Flatpak)
    • useful to advise on package managers and names for xdg-desktop-portals or plugin packages
  • INFO Desktop Environment
    • useful for xdg-desktop-portals and the various limitations of specific DEs
  • INFO Missing default plugins
    • currently checks for Browser, VLC, and WebSocket but can easily be extended if need be
    • while AJA and BlackMagic plugins are technically a default functionality, these are essentially never asked for so I didn't see much reason to include them
  • INFO Missing v4l2loopback module for VCam functionality

Motivation and Context

The current lack of output by the OBS Bot requires us to manually check for the same information on every log we are getting in linux-support. The detections and help texts (suggestions welcome!) should give users some pointers to help themselves when there is currently no supporter around (since linux-support isn't as frequented as the others). Obviously it also helps supporters to give faster responses without having to check every log manually.

Of course Linux has an inherent multitude of possible setups, which I tried to cover as best as possible without checking for every eventuality. It should cover the most frequent issues and questions collected over quite some time.

How Has This Been Tested?

Grabbed a random assortment of logs from the Discord:

#!/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"

Types of changes

  • New feature (non-breaking change which adds functionality)
  • Tweak (non-breaking change to improve existing functionality)
  • Documentation (a change to documentation pages)

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.

Copy link
Member

@RytoEX RytoEX left a comment

Choose a reason for hiding this comment

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

If a commit changes one file in checks/, the commit prefix is that file's name without the file extension.

Always capitalize the first word in the commit message subject after the prefix.

I don't use Linux, so I'll probably need someone else to comment on the substance of the changes themselves.

@mihawk90 mihawk90 force-pushed the linux-detections branch from 1642751 to 49891e9 Compare June 8, 2024 07:03
@mihawk90
Copy link
Contributor Author

mihawk90 commented Jun 8, 2024

Fixed up.

Also added a note regarding the missing default plugins in OP.

Edit:
Adjusted some wording in the PipeWire Source detection to make it more consistent.
Wondering if I should add a note on game captures too though?

@mihawk90 mihawk90 force-pushed the linux-detections branch 6 times, most recently from 2bdb5d6 to aa89b4d Compare June 8, 2024 20:46
@mihawk90
Copy link
Contributor Author

mihawk90 commented Jun 8, 2024

Adjustments for unified PipeWire source in 30.2:

  • Added new pipewire-screen-capture-source detection
  • renamed "Screen Capture" to "Display Capture" throughout the help texts

For the Wayland logging, I already put a note in there that Global Hotkeys won't work, would it make sense to add Browser docks to that note as well?

@mihawk90
Copy link
Contributor Author

Rebased to current master to keep it up to date.

Groundwork for future linux-specific checks similar to the Windows and
MacOS specific checks.
@mihawk90
Copy link
Contributor Author

Rebased to current master and also fixed the name for the VLC plugin being wrong.

@RytoEX
Copy link
Member

RytoEX commented Nov 22, 2024

I still need someone familiar with Linux or Linux support to give some insight here.

checks/linux.py Outdated Show resolved Hide resolved
checks/linux.py Outdated Show resolved Hide resolved
checks/linux.py Outdated Show resolved Hide resolved
checks/linux.py Outdated Show resolved Hide resolved
checks/linux.py Show resolved Hide resolved
checks/linux.py Outdated
if len(hasV4L2Module) > 0:
return [LEVEL_INFO, "VCam not available",
"""Using the Virtual Camera requires the <code>v4l2loopback</code> kernel module to be installed.<br>
If required, please refer to our <a href="https://github.com/obsproject/obs-studio/wiki/install-instructions#prerequisites-for-all-versions">Install Instructions</a> on how to install this on your distribution.<br>
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I figured the KB page doesn't really have useful information to actually get it running, so I linked to the Install Instructions instead to save a round trip.

I don't really mind either way, just figured going to the instructions directly is faster.

Copy link
Member

Choose a reason for hiding this comment

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

I don't have a strong opinion. This is better than no message.

checks/linux.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Penwy Penwy left a comment

Choose a reason for hiding this comment

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

Besides the use of split and indices, I agree with all additions and can speak to their usefulness for linux support.

checks/linux.py Outdated Show resolved Hide resolved
checks/linux.py Outdated Show resolved Hide resolved
@mihawk90 mihawk90 force-pushed the linux-detections branch 3 times, most recently from 9f35c5c to a169dc9 Compare November 23, 2024 00:24
@kkartaltepe
Copy link
Contributor

overall its fine, im not sure I agree with trying to explain which captures to use on your platform for every log uploaded but we can always change it later if it becomes distracting to users.

@tiberium-v
Copy link

tiberium-v commented Nov 23, 2024

I think also they are useful. Also I have the feeling that we have more user in #linux-support, they don't like to follow the instructions for uploading the log and paste it via pastebin or co in. For me, who is sometimes on mobile, it is a pain to access it. So a more verbose log analyzer output is here helpful.

In general, I have the feeling, that the windows side has always more useful information in the analyzer output. Like the windows version/build. So the additions here with info about the linux distro/flatpak and which Display-Server is running is on my side welcome as someone who give support there.

PS: And the possibility that users getting more info's, how a problem can be fixed by their own, is also a good thing.

@RytoEX
Copy link
Member

RytoEX commented Nov 23, 2024

overall its fine, im not sure I agree with trying to explain which captures to use on your platform for every log uploaded but we can always change it later if it becomes distracting to users.

That was the point I was trying to make in this review thread.

@mihawk90
Copy link
Contributor Author

Since there were no objections to the altered wording in the review thread above I went ahead and pushed it.

Let me know if you want further changes 😄

@RytoEX
Copy link
Member

RytoEX commented Dec 10, 2024

Can someone provide sample logs that would cause the INFO Wayland and INFO X11 items to be emitted?

I am tempted to ask that we remove the INFO Wayland and INFO X11 items from this PR so we can land everything else, and then we can consider those two INFO items in a separate PR.

checks/linux.py Outdated Show resolved Hide resolved
@mihawk90
Copy link
Contributor Author

mihawk90 commented Dec 11, 2024

Can someone provide sample logs that would cause the INFO Wayland and INFO X11 items to be emitted?

Log examples are in the PR description, although pretty much all of them should emit it.
There are situations where neither one is logged but that is typically down to misconfigured desktop environments (at which point the info missing is already a hint that something is wrong).

I am tempted to ask that we remove the INFO Wayland and INFO X11 items from this PR so we can land everything else, and then we can consider those two INFO items in a separate PR.

I'm not opposed to removing one or both of the helptexts, however I would strongly advocate for keeping the bullet point itself. This is one of the things we need to check in almost every log, so having it in OBS bot's response on Discord would be a major time-saver. For most questions/issues users come into the support chat for the answer depends on whether the user is running on X11 or Wayland. It was one of the things that kicked off this PR in the first place.

@tiberium-v
Copy link

Can someone provide sample logs that would cause the INFO Wayland and INFO X11 items to be emitted?

I am tempted to ask that we remove the INFO Wayland and INFO X11 items from this PR so we can land everything else, and then we can consider those two INFO items in a separate PR.

If it is okay for my perspective, helping in #linux-support:
The Info a user is on Wayland or X11 is one of the most important from all. When a User asks why they don't see the connecting account button or why the hotkeys are only working when the obs window is in focus, why there is no window capture (on wayland the display and window capture source are combined, on x11 are separated)

Almost every log, I scan the log for two/three things: The build name of obs, sometimes the Distroname if the build name doesn't give me a clear answer (both to check if it is the official package) and if the session type is X11 or wayland.

We had also sometimes user, they know the difference but didn't realize that their session was changed to wayland. Especial on new Ubuntu versions, when they want the newest version, but the update path is not released from Canonical, they do a fresh install and forget, that ubuntu goes default to wayland on a fresh installation.

Since the feature set is quite different in X11 vs wayland and will be for the next couple of years, I think the info is in the log analyzer quite important.

@mihawk90
Copy link
Contributor Author

mihawk90 commented Dec 13, 2024

Removed the helptexts for now. If we decide we want them back we can just revert 03a2708 7a9865a.

As noted above, I'm leaving the bulletpoints in as the display server is crucial information in linux-support.

Copy link
Member

@Fenrirthviti Fenrirthviti left a comment

Choose a reason for hiding this comment

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

Added some verbiage changes and my opinion on the vcam stuff.

checks/linux.py Outdated Show resolved Hide resolved
checks/linux.py Outdated Show resolved Hide resolved
checks/linux.py Outdated Show resolved Hide resolved
checks/linux.py Outdated Show resolved Hide resolved
checks/linux.py Outdated Show resolved Hide resolved
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.

6 participants