Significant upgrade to sound server running detections, much more granular and

hopefully more accurate, with more useful reporting values. Also added some nice
useful audio api/server tool and info items.

Packagers: this corrects possibly wrong or misleading audio server reports,
particularly related to PulseAudio/PipeWire, which can lead to support issues
and lack of clarity due to ambiguous or wrong reports about sound Servers
present, active, or off. Upgrading your package is highly recommended.

--------------------------------------------------------------------------------
SPECIAL THANKS:

1. Thanks to people like Chimera dev Daniel "q66" Kolesa for experimenting with
non systemd (uses dinit/dinitctl), non GCC, non GNU linux, and for making early
pre-alpha versions run in vm, and for being easy to test!

Not so much because I personally want or care about or view as a positive
skipping GNU tools or GCC in favor of clang and BSD tools, but more because
these experiments help make the general overall Linux ecosystem more robust.
Including inxi.

2. Thanks for the Manjaro people for noting this issue on their forums.

--------------------------------------------------------------------------------
KNOWN ISSUES:

1a. AUDIO: jack_control and pw-cli won't run as root, exit with error. This
forces back to fallback process present tests for active running state.

1b. AUDIO: pactl will start pipewire/pipewire-pulse/pulseaudio if stopped and
not masked, so not using since that would make inxi alter the state of the
system.

1c. AUDIO: pipewire-alsa, pulseaudio-jack depend on file exist globs, tested on
Arch Linux, Debian base, but unknown if paths exist on other Linux pimary
distros. Easy to add to globbing tests, but no going to check them all!

2. SERVICES: systemctl status [service] can fail if service loaded using --user
which is a new one on me, not sure how to handle that.

3. It would be nice to get inxi issues like the sound server/api glitches
handled by filing an issue on inxi github, and not to rely on my seeing a random
distro forum post, which I only found by pure coincidence.

--------------------------------------------------------------------------------
BUGS:

1. AUDIO: See Fixes 3a,b,c. In some cases false report of pulseaudio and
pipewire running: yes create unclear output and results, or misleading. Thanks
to manjaro users to noticing this and mentioning it in a forum post.

Note: it's much more effective to file issues on inxi github than to hope I will
see a random forum post one day.

2. DEBUGGER: Bug in debugger, somewhere introduced '-- list' (instead of
'--list') for bluetoothctl which made older systems hang when running the
debugger. No idea when or how that space got introduced.

--------------------------------------------------------------------------------
FIXES:

1. INFO: Compilers showed Compilers: gcc: N/A when clang/gcc not installed, this
was not intended, but was a small glitch in main::get_gcc_data(), where it
assigned undef as array contents when gcc not defined. This was exposed by
Chimera, which uses clang, but would have happened any time gcc not installed on
system.

2. SYSTEM: tiny fix, was getting ',' at end of kernel compiler version.

3a. AUDIO: For pipewire, made process detection test more robust, now excludes
pipewire-pulse in case where that might be running without pipewire on/enabled.

3b. AUDIO: bigger fix, more robust tests for audio servers running for jack,
pipewire, pulseaudio, these look for more explicit server tool reports. Certain
not to be reliable always, and fail for superuser, will probably need more
tweaking. Also notes for jack, pulse, pipewire if only positive detection found
via ps aux: active (process) to avoid incorrect data, and root specific messages
depending on situation.

3c. AUDIO: was testing for pactl to determine if pulseaudio installed, but found
case where pactl could be installed without pulseaudio. Now tests for pulseaudio
installed.

3d. AUDIO: weak fix for Linux OSS4 version, using /etc/oss4/version.dat file,
which may or may not exist on all distros.

3e. AUDIO: alsa-oss compat can create /dev/sndstat file, which would then lead
to positive OSS detection even if it's not present. This is corrected, and will
not show if asound/version exists and no ossinfo. For linux, relying on ossinfo
presence, which comes from oss4-base.

3f. AUDIO: Older ALSA /proc/asound/version had a date string in parentheses
after the Driver Version, so now explicitly get the string after Version.

--------------------------------------------------------------------------------
ENHANCEMENTS:

1. REPOS: added support for /etc/apk/repositories.d/*.list, which works pretty
much the same as /etc/apt/sources.list.d/*.list. This is to make Chimera apk
repos show up, previously only supported /etc/apk/repositories file read.

2a. DistroData: Added Feren to distro system base. This was much trickier than
it should be due to inconsistent use of os-release field names, but that's how
it goes.

2b. DistroData: new Arch derived distro XeroLinux added to system base. I know,
I know, it's a never-ending endeavor (get it?) since these pop up all the time,
but might as well add them now and then as they appear.

3a. AUDIO: inxi now handles pipewire-pulse as top layer audio daemon, along with
several other server/api helpers. Note that pw-jack does not appear to be a
daemon, just a plugin, so shows 'plugin'. Extra sound server helpers added when
discovered or requested.

  API: ALSA
    v: k5.19.0-16.2-liquorix-amd64
    status: kernel-api
  Server-1: PulseAudio
    v: 16.1
    status: off (on pipewire-pulse)
  Server-2: PipeWire
    v: 0.3.65
    status: active
    with:
      1: pipewire-pulse
        status: active
      2: pw-jack
        type: plugin

3b. AUDIO: For -Aa, added tools: report. Currently supports these basic tools:

alsa: alsamixer alsamixergui amixer
jack: cadence jack_control jack_mixer qjackctl
oss: dsbmixer mixer ossinfo ossmix ossxmix vmixctl
nas: auctl auinfo
pipewire: pw-cat pw-cli wpctl) [+pactl if pipewire-pulse and no pulseaudio
pulse: pacat pactl pamix pamixer pavucontrol pulsemixer
roar: roarcat roarctl
sndiod: aucat midicat mixerctl sndioctl

Note that inxi-perl/docs/inxi-audio.txt has lists of alternates or rejected
helpers and tools, but we want to keep that output short and sane.

3c. AUDIO: For BSDs, if sndiod is detected, adds an API line for sndio. Note
this may create 2 API lines for FreeBSD using OSS.

3d. AUDIO: Added basic support for roar sound server, NAS (Network Audio
System).

4. CPU: new Intel and AMD cpu model matches for latest and future, Luna Lake,
Zen 4c.

5. GRAPHICS: new nvidia current, AMD, and Intel GPU ids.

6. DRIVES: more disk vendors, ids! The list never stops, but sadly, so many are
not identifiable. Check: inxi-perl/tools/lists/disks_unhandled to see if you
can positively identify any of those.

--------------------------------------------------------------------------------
CHANGES:

1a. AUDIO: Changed main API/Server running: to status: [status], that syntax is
more able to handle different circumstances.

1b. AUDIO: With change to status:, now uses granular fixes above, and adds root
notes if no active detections.

1c. AUDIO: Changed 'Sound API', 'Sound Server' to 'API', 'Server'. This avoids
ambiguity with some types, it's the Audio section, and those are the APIs and
Servers for that Audio section. Makes it match Graphics as well. and is shorter.

1d. AUDIO: Changed 'Sound Interface' for sndiod to 'Server', which is how it's
listed, and for BSD, added API: sndio item. Also changed 'sndio' to 'sndiod' for
the Server: item.

1e. AUDIO: Changed ALSA/BSD sndio to show: status: api since saying an api
is running makes little sense, it's there or it's not there. OSS can be enabled
or disabled so shows status: active/off for Linux, but kernel-api for BSDs.

--------------------------------------------------------------------------------
DOCUMENTATION:

1a. MAN: Added note for helpers item: with: pipewire-pulse/pw-jack etc to -Axx.

1b. MAN: Added -Aa item for audio server tools.

2. OPTIONS: Updated for -Axx helpers, -Aa tools.

3. DOCS: Created inxi-perl/docs/inxi-audio.txt doc file. Too many odd factoids
to forget about during this upgrade!

--------------------------------------------------------------------------------
CODE:

1. REPOS: Moved %keys to %repo_keys and set it only once with set_repo_keys(),
those big hash assigns per iteration are really expensive, now stores it
globally in RepoItem and sets only once.

2. INFO: main::get_gcc_data() failed to handle case where there is no gcc at all
installed, resulted in returning an array with content of 'undef', not an empty
array as intended. This made the array not set test fail for Compilers, so gcc
showed as N/A, which was not intended.

3. DistroData: changed internal lsb/osr $distro to $distro_lsb/$distro_osr,
which lets inxi update the distro name during system base processing in cases
where the data is redundant. Stupid hack, sigh, should not be necessary, but
that's life, /etc/os-release was poorly designed so it leads to such confusions.

4a. AUDIO: Added --dbg 52 to output results of pw-cli.

4b. AUDIO: refactored sound_data, renamed, added {jack,pipewire,pulse}_status(),
sound_helpers(), sound_tools() utilities.

5. DEBUGGER: added more pactl and pw-cli outputs, and pipewire-pulse,
pipewire-jack --version.

6. main::get_driver_modules(): add space after ',' if total string > 40
characters to allow splitting very long unbroken strings of modules that
otherwise would not break as expected.
This commit is contained in:
Harald Hope 2023-03-28 14:48:52 -07:00
parent 464cac2f1e
commit 5ee29fa022
3 changed files with 745 additions and 161 deletions

628
inxi

File diff suppressed because it is too large Load diff

31
inxi.1
View file

@ -15,7 +15,7 @@
.\" with this program; if not, write to the Free Software Foundation, Inc.,
.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
.\"
.TH INXI 1 "2023\-02\-07" "inxi" "inxi manual"
.TH INXI 1 "2023\-03\-28" "inxi" "inxi manual"
.SH NAME
inxi \- Command line system information script for console and IRC
@ -128,8 +128,25 @@ keep things simple.
.TP
.B \-A \fR, \fB\-\-audio\fR
Show Audio/sound device(s) information, including device driver. Show running
sound server(s). See \fB\-xxA\fR to show all sound servers detected.
Show Audio/sound device(s) information, including device driver. Shows active
sound API(s) and sound server(s).
Supported servers/APIs: ALSA, JACK, OSS, NAS, PipeWire, PulseAudio, RoarAudio,
sndio.
Use \fB\-Ax to show all sound APIs/servers detected, including inactive,
\fB\-Axx\fR to see API/Server helper daemons/plugin/modules, and \fB\-Aa\fR to
see API/sound server tools.
.nf
\fBAudio:
Device\-1: C-Media CMI8788 [Oxygen HD Audio] driver: snd_virtuoso
Device\-2: AMD Cedar HDMI Audio [Radeon HD 5400/6300/7300 Series]
driver: snd_hda_intel
Device\-3: AMD Family 17h HD Audio driver: snd_hda_intel
API: ALSA v: k5.19.0\-16.2\-liquorix\-amd64 status: kernel\-api
Server\-1: PulseAudio v: 16.1 status: active\fR
.if
.TP
.B \-b \fR, \fB\-\-basic\fR
@ -1185,7 +1202,7 @@ vendor [product] information.
\- Adds PCI/USB ID of each device.
\- Adds non-running sound servers, if detected.
\- Adds inactive sound servers/APIs, if detected.
.TP
.B \-x \-B\fR
@ -1433,6 +1450,9 @@ found for each distribution system base detection.
\- Adds PCIe speed and lanes item (Linux only, if detected).
\- Adds \fBwith: [item] \fBstatus: [state/plugin]\fR helper daemons/plugins for
the sound API/server.
.TP
.B \-xx \-B\fR
\- Adds serial number.
@ -1847,6 +1867,9 @@ knows could possibly be used instead.
or lanes, \fBlink\-max: gen: speed: lanes:\fR (only items different from primary
shown).
\- Adds list of detected audio server tools (\fBtools: [tools]\fR) to API/Server
lines, like alsamixer, jack_control, pactl, pavuctl, pw-cli, sndioctl, etc.
.TP
.B \-a \-C\fR
.br

View file

@ -1,7 +1,238 @@
================================================================================
Version: 3.3.26
Patch: 00
Date: 2023-03-28
--------------------------------------------------------------------------------
RELEASE NOTES:
--------------------------------------------------------------------------------
Significant upgrade to sound server running detections, much more granular and
hopefully more accurate, with more useful reporting values. Also added some nice
useful audio api/server tool and info items.
Packagers: this corrects possibly wrong or misleading audio server reports,
particularly related to PulseAudio/PipeWire, which can lead to support issues
and lack of clarity due to ambiguous or wrong reports about sound Servers
present, active, or off. Upgrading your package is highly recommended.
--------------------------------------------------------------------------------
SPECIAL THANKS:
1. Thanks to people like Chimera dev Daniel "q66" Kolesa for experimenting with
non systemd (uses dinit/dinitctl), non GCC, non GNU linux, and for making early
pre-alpha versions run in vm, and for being easy to test!
Not so much because I personally want or care about or view as a positive
skipping GNU tools or GCC in favor of clang and BSD tools, but more because
these experiments help make the general overall Linux ecosystem more robust.
Including inxi.
2. Thanks for the Manjaro people for noting this issue on their forums.
--------------------------------------------------------------------------------
KNOWN ISSUES:
1a. AUDIO: jack_control and pw-cli won't run as root, exit with error. This
forces back to fallback process present tests for active running state.
1b. AUDIO: pactl will start pipewire/pipewire-pulse/pulseaudio if stopped and
not masked, so not using since that would make inxi alter the state of the
system.
1c. AUDIO: pipewire-alsa, pulseaudio-jack depend on file exist globs, tested on
Arch Linux, Debian base, but unknown if paths exist on other Linux pimary
distros. Easy to add to globbing tests, but no going to check them all!
2. SERVICES: systemctl status [service] can fail if service loaded using --user
which is a new one on me, not sure how to handle that.
3. It would be nice to get inxi issues like the sound server/api glitches
handled by filing an issue on inxi github, and not to rely on my seeing a random
distro forum post, which I only found by pure coincidence.
--------------------------------------------------------------------------------
BUGS:
1. AUDIO: See Fixes 3a,b,c. In some cases false report of pulseaudio and
pipewire running: yes create unclear output and results, or misleading. Thanks
to manjaro users to noticing this and mentioning it in a forum post.
Note: it's much more effective to file issues on inxi github than to hope I will
see a random forum post one day.
2. DEBUGGER: Bug in debugger, somewhere introduced '-- list' (instead of
'--list') for bluetoothctl which made older systems hang when running the
debugger. No idea when or how that space got introduced.
--------------------------------------------------------------------------------
FIXES:
1. INFO: Compilers showed Compilers: gcc: N/A when clang/gcc not installed, this
was not intended, but was a small glitch in main::get_gcc_data(), where it
assigned undef as array contents when gcc not defined. This was exposed by
Chimera, which uses clang, but would have happened any time gcc not installed on
system.
2. SYSTEM: tiny fix, was getting ',' at end of kernel compiler version.
3a. AUDIO: For pipewire, made process detection test more robust, now excludes
pipewire-pulse in case where that might be running without pipewire on/enabled.
3b. AUDIO: bigger fix, more robust tests for audio servers running for jack,
pipewire, pulseaudio, these look for more explicit server tool reports. Certain
not to be reliable always, and fail for superuser, will probably need more
tweaking. Also notes for jack, pulse, pipewire if only positive detection found
via ps aux: active (process) to avoid incorrect data, and root specific messages
depending on situation.
3c. AUDIO: was testing for pactl to determine if pulseaudio installed, but found
case where pactl could be installed without pulseaudio. Now tests for pulseaudio
installed.
3d. AUDIO: weak fix for Linux OSS4 version, using /etc/oss4/version.dat file,
which may or may not exist on all distros.
3e. AUDIO: alsa-oss compat can create /dev/sndstat file, which would then lead
to positive OSS detection even if it's not present. This is corrected, and will
not show if asound/version exists and no ossinfo. For linux, relying on ossinfo
presence, which comes from oss4-base.
3f. AUDIO: Older ALSA /proc/asound/version had a date string in parentheses
after the Driver Version, so now explicitly get the string after Version.
--------------------------------------------------------------------------------
ENHANCEMENTS:
1. REPOS: added support for /etc/apk/repositories.d/*.list, which works pretty
much the same as /etc/apt/sources.list.d/*.list. This is to make Chimera apk
repos show up, previously only supported /etc/apk/repositories file read.
2a. DistroData: Added Feren to distro system base. This was much trickier than
it should be due to inconsistent use of os-release field names, but that's how
it goes.
2b. DistroData: new Arch derived distro XeroLinux added to system base. I know,
I know, it's a never-ending endeavor (get it?) since these pop up all the time,
but might as well add them now and then as they appear.
3a. AUDIO: inxi now handles pipewire-pulse as top layer audio daemon, along with
several other server/api helpers. Note that pw-jack does not appear to be a
daemon, just a plugin, so shows 'plugin'. Extra sound server helpers added when
discovered or requested.
API: ALSA
v: k5.19.0-16.2-liquorix-amd64
status: kernel-api
Server-1: PulseAudio
v: 16.1
status: off (on pipewire-pulse)
Server-2: PipeWire
v: 0.3.65
status: active
with:
1: pipewire-pulse
status: active
2: pw-jack
type: plugin
3b. AUDIO: For -Aa, added tools: report. Currently supports these basic tools:
alsa: alsamixer alsamixergui amixer
jack: cadence jack_control jack_mixer qjackctl
oss: dsbmixer mixer ossinfo ossmix ossxmix vmixctl
nas: auctl auinfo
pipewire: pw-cat pw-cli wpctl) [+pactl if pipewire-pulse and no pulseaudio
pulse: pacat pactl pamix pamixer pavucontrol pulsemixer
roar: roarcat roarctl
sndiod: aucat midicat mixerctl sndioctl
Note that inxi-perl/docs/inxi-audio.txt has lists of alternates or rejected
helpers and tools, but we want to keep that output short and sane.
3c. AUDIO: For BSDs, if sndiod is detected, adds an API line for sndio. Note
this may create 2 API lines for FreeBSD using OSS.
3d. AUDIO: Added basic support for roar sound server, NAS (Network Audio
System).
4. CPU: new Intel and AMD cpu model matches for latest and future, Luna Lake,
Zen 4c.
5. GRAPHICS: new nvidia current, AMD, and Intel GPU ids.
6. DRIVES: more disk vendors, ids! The list never stops, but sadly, so many are
not identifiable. Check: inxi-perl/tools/lists/disks_unhandled to see if you
can positively identify any of those.
--------------------------------------------------------------------------------
CHANGES:
1a. AUDIO: Changed main API/Server running: to status: [status], that syntax is
more able to handle different circumstances.
1b. AUDIO: With change to status:, now uses granular fixes above, and adds root
notes if no active detections.
1c. AUDIO: Changed 'Sound API', 'Sound Server' to 'API', 'Server'. This avoids
ambiguity with some types, it's the Audio section, and those are the APIs and
Servers for that Audio section. Makes it match Graphics as well. and is shorter.
1d. AUDIO: Changed 'Sound Interface' for sndiod to 'Server', which is how it's
listed, and for BSD, added API: sndio item. Also changed 'sndio' to 'sndiod' for
the Server: item.
1e. AUDIO: Changed ALSA/BSD sndio to show: status: api since saying an api
is running makes little sense, it's there or it's not there. OSS can be enabled
or disabled so shows status: active/off for Linux, but kernel-api for BSDs.
--------------------------------------------------------------------------------
DOCUMENTATION:
1a. MAN: Added note for helpers item: with: pipewire-pulse/pw-jack etc to -Axx.
1b. MAN: Added -Aa item for audio server tools.
2. OPTIONS: Updated for -Axx helpers, -Aa tools.
3. DOCS: Created inxi-perl/docs/inxi-audio.txt doc file. Too many odd factoids
to forget about during this upgrade!
--------------------------------------------------------------------------------
CODE:
1. REPOS: Moved %keys to %repo_keys and set it only once with set_repo_keys(),
those big hash assigns per iteration are really expensive, now stores it
globally in RepoItem and sets only once.
2. INFO: main::get_gcc_data() failed to handle case where there is no gcc at all
installed, resulted in returning an array with content of 'undef', not an empty
array as intended. This made the array not set test fail for Compilers, so gcc
showed as N/A, which was not intended.
3. DistroData: changed internal lsb/osr $distro to $distro_lsb/$distro_osr,
which lets inxi update the distro name during system base processing in cases
where the data is redundant. Stupid hack, sigh, should not be necessary, but
that's life, /etc/os-release was poorly designed so it leads to such confusions.
4a. AUDIO: Added --dbg 52 to output results of pw-cli.
4b. AUDIO: refactored sound_data, renamed, added {jack,pipewire,pulse}_status(),
sound_helpers(), sound_tools() utilities.
5. DEBUGGER: added more pactl and pw-cli outputs, and pipewire-pulse,
pipewire-jack --version.
6. main::get_driver_modules(): add space after ',' if total string > 40
characters to allow splitting very long unbroken strings of modules that
otherwise would not break as expected.
--------------------------------------------------------------------------------
-- Harald Hope - Tues, 28 Mar 2023 16:30:00 -0800
================================================================================
Version: 3.3.25
Patch: 00
Date: 2022-??-??
Date: 2023-02-07
--------------------------------------------------------------------------------
RELEASE NOTES:
--------------------------------------------------------------------------------
@ -137,7 +368,7 @@ when I'm working on that specific feature. But slowly, surely.
--------------------------------------------------------------------------------
CODE:
1. GRAPHICS: Test when no gpu drivers and no dri drivers but x drivers never
1a. GRAPHICS: Test when no gpu drivers and no dri drivers but x drivers never
showed x driver. Was supposed to be all || for tests:
if (@$gpu_drivers || $graphics{'dri-drivers'} && @$x_drivers){
@ -147,7 +378,7 @@ https://perldoc.perl.org/perlop. I believe this led to test 1 being false, test
logical and to be true. Since only one of the two was true, the last bit was
seen as false.
2. GRAPHICS: Connected with 1, noticed that for some weird reason, I'd decided
1b. GRAPHICS: Connected with 1, noticed that for some weird reason, I'd decided
to assign the array ref for drivers like this:
@$x_drivers = (a, b, c);
@ -157,13 +388,13 @@ $x_drivers = [a,b,c];
This did not cause any issues, since they mean the same thing, but it was silly
to write it that way.
3a. DEBUG: Added --debug-arg-use which allows testers to run a specific argument
2a. DEBUG: Added --debug-arg-use which allows testers to run a specific argument
combination that may be causing issues.
3b. DEBUG: Also added more validation, to make sure arg for --debug-arg /
2b. DEBUG: Also added more validation, to make sure arg for --debug-arg /
--debug-arg-use start with - or -- followed by a letter.
4. START: Removed this code block from set_konvi_data. I had left this in place
3. START: Removed this code block from set_konvi_data. I had left this in place
for a release or two to make sure no need for it was found, but it will never be
used since it never worked in the first place.
# my $config_cmd = '';
@ -188,11 +419,11 @@ used since it never worked in the first place.
# main::log_data('dump',"kde config \@data",\@data) if $b_log;
# }
5. OPTIONS: in OptionsHandler::post_process(), reorganized the various run and
4. OPTIONS: in OptionsHandler::post_process(), reorganized the various run and
exit triggers, help, configs, recommends, version, etc. All on top now.
--------------------------------------------------------------------------------
-- Harald Hope - Sun, 18 Dec 2022 14:22:22 -0800
-- Harald Hope - Tue, 7 Feb 2023 18:00:00 -0800
================================================================================
Version: 3.3.24