This release fixes another very long standing bug, which I was not sure was an

inxi or a Konversation bug, which made tracking it down very difficult. Special
thanks to argonel of Konversation for helping solve this problem, or at least,
for directing my attention towards the likely cause area, and away from wrong
ideas. The bug was that inxi simply did not run in Konversation, it would exit
with error when run with /cmd or /inxi via symbolic links.

This may not seem like a huge deal to many of you, but the actual history of
inxi was directly linked to user support in mainly Konversation, so this feature
not working I have alwyas found extremely annoying, but I could never figure out
why it wasn't workiing, and didn't really know where to start until Argonel
helped narrow it down to a specific Konversation function in inxi. At which
point tracking down the real bug was fairly easy. Since testing in IRC is always
a key test point for inxi features and releases, not working in my main GUI IRC
client forced me to use CLI clients like irssi, via /exec -o inxi.

There was a secondary cause of failure, which was missing a key qdbus package,
which made figuring this one out a two step process.

So inxi is once again working in all areas, with no known significant failure
areas beyond known issues that have no current solution, or which I don't feel
like doing.

But possibly more important, a goal I have had for a while now of doing long
needed code refactors, bug fixes, without huge new code blocks or features
adding new future fixes and bugs, has been slowly happening.

This was quite important, because inxi's codebase and logic is so complex and
large now that at some point, it required rest and cleanup and corrections,
without continuously adding new code and logic, which would then trigger new
fixes and bugs. In other words, the code is taking a long needed, and well
deserved, breather, to recover after huge increases in the overall LOC and
feature sets.

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

1. No known way to detect that the system might be Wayland for the Graphics:..
API: fixes, unless Xwayland is installed if the wayland protocol detections
failed, which they often do in console. Not practical to look for all compositor
variants on system to determine if it could be Wayland if not X or Xvesa, so
that one will just be what it is, which is fine, definitely better than it was
before. Note this is only an issue if in Console, no Display. Note that if inxi
is run as root, Wayland data also usually fails, even in Display.

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

1. Another corner case monitor position issue, applied fallback primary monitor
rule when a primary monitor had already been located. This is corrected via a
graphics global $b_primary which once set will disable this fallback feature.
Objectively, the fallback feature should just be removed. The test is if that
monitor is not primary, and if position is 0x0, then assume primary, without
verifying no primary had been located yet.

2. A super old bug, in current konversation, was failing to trip the konvi
detections, which then resulted in not stripping off the first two args in
@ARGV, which then resulted in bad args being passed to inxi on konvi start,
which then resulted in silent failing. Many thanks to argonel of #konversation
for the patience to help me figure out what was going on with this bug. He's
been a Konversation developer probably longer than I've been doing inxi.

Cause was very tricky and subtle, the ps aux path for konvi had changed
slightly, not the path, but the pattern, it used to be:

konversation -session [sessin id]
but it's changed to:
konversation -qwindowtitle Konversation
or just plain:
konversation as line ending.

This led to failure to find konvi running, which then made the konvi ids fail.

Also, this would not work if the qdbus-qt5 package was not installed, or other
distros might have that packaged differently. Because of these dual causes, I
was simply unable to figure out what was going on for many years. I suspect this
stopped working with KDE 5/QT 5, but I'm not sure.

3. Used wrong key names for some ZFS tests and fallbacks, those could have led
to failures though very difficult to test and verify this. Also see fix 5, which
of course also looks like a bug, acts like one, but was actually due to a new
use of /dev/disk/by-partuuid for ZFS components in Ubuntu which inxi had not
seen before.

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

1. Alternate ps IDs for appimage detection (try appimagelauncher), alternate
paths for possible appimage storage locations (also try ~/.appimage/*). File
names might be *.appimage or *.AppImage, probably other variants too.

2. Going along with Change 1, made tests more granular for missing graphics API
type data. Also updated messages to be more correct and clear, in and out of
display. This corrects an issue I'd seen but never resolved, which was on
headless systems showing this message:

Message: GL data unavailable in console. Try -G --display

Now the tests are far more granular, and only show that if glxinfo is installed,
and also shows specific messages if glxinfo not installed, but X/Xorg present,
or, for Wayland, if Xwayland present. These all get their own specific messages
now, and generally will also show which API is being used, or API: N/A if
nothing is detected, as in the case of a headless system with no X, Wayland,
etc.

3. Github issue #275 on of all things Microsoft WSL environment, has a small
glitch with undefined display hz, but otherwise inxi seems to work in that
environment, albeit missing many data types!

4. Made tests for konversation more robust, including test for
$ENV{'PYTHONPATH'} containing konversation in path, which I believe will work
for all new Konversations (KDE 5 and newer), and be much faster. The previous
tests are now more robust and less prone to failure, and only activate when
PYTHONPATH is not present with konversation string present as well.

5. Fix for ZFS using /dev/disk/by-partuuid for partition id in zfs,
which can lead to wrong usable disk total size report, along with failure
to show components. Thanks delanym, issue #276 for reporting this problem, which
also exposed some harder to trigger bugs in ZFS (Bug 3).

6. Exposed by issue #276, case where line was wrapping value when value was too
short visually to value: used: 34.4 GiB (4.5%) due to the 3 or more words
trigger to enable wrapping of value, but noticed that if length of line was
exactly max-width, not > or <, it might vanish.

7. Case where no X or GPU drivers found, but dri driver detected, was not
showing, now does.

8. OpenRC is the init system in some cases, that is: readlink /sbin/init >
/sbin/openrc-init, where /proc/1/comm == init. Was showing only as OpenRC rc
type, which wasn't actually correct.

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

1. New nvidia gpu product ids for Turing, Ampere, Lovelace, Hopper. New Intel
GPU ids.

2. Added Zinc to systembase/distro, needs slightly special handling to get both
names right. Also added Tuxedo, which could use existing methods.

3. Added dpkg tool nala, which is sort of a CLI front end for apt, zinc uses it,
but it's also in Debian main package pool. Also deb-get, which is another zinc
thing for package management.

4. Full support for dinit: version, dinitctl w/status in ServiceData

4. Added initial support for init systems: 31init (31 line C program, no
--version), Hummingbird (unknown if -v/--version).

5. A few new CPU arch ids (new Intels).

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

1. Going somewhat along with the change in Audio to call ALSA a Sound API
instead of a sound server, changed key name OpenGL: to API: OpenGL in Graphics.
Also for EGL wayland, calling that the api too.

https://en.wikipedia.org/wiki/OpenGL

This conforms more closely to how these things are defined. Note that once
again, a value had been used as a key name, which almost always indicates a
failure to understand something about the core tech.

2. Changed wrapping of values from 3 words or more to 3 or more words AND length
> 24 characters. Saw example of:
 .... used: 28.45 GiB
  (4.5%)

which isn't desirable.

3. Changed minimum wrap to 60 columns, the new wrapper features are working so
well that if users want output that short, it will usually work fine, except of
course for very long word strings like a kernel name or parameter.

Note that this does not truncate long 'words' that might be wrapped, or going
along with Change 2, long 'sentences' of 2 words, those will always appear on
the same line regardless. For 'sentences' of 3 or more words, however, it goes
word by word, so it could well wrap after the first word, and so on. Obviously,
a 24 or fewer character value will never be wrapped, which was the intended
correction of change 2.

4. Going with Fix 8, OpenRc is an init system when it owns /proc/1/comm, had not
realized that /proc/1/comm == init can map to dinit, openrc as init. Now will
only show OpenRc as rc: type if not init as well.

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

1. Updates in man for Change 1.

2. Added to docs/inxi-graphics.txt good quote re EGL/GBM, as well as VBE/GOP for
vesa. Trying to find docs where they actually say clearly it's an API is
remarkably difficult.

3. Man page, added note about Konversation requiring qdbus-qt5 (Debian+),
qt5-qttool (RHEL+/SUSE+), qt-tools (Arch+) for inxi to work inside it. Also
updated smxi.org/docs/inxi-usage.txt to note requirements for Konversation use
and setup.

4. Man, help, changed min width for -y/--width from 80 to 60.

5. docs/inxi-values.txt updated for --cygwin, --wsl fake OS type switches. Not
technically the OS, more the environment, but close enough.

6. docs/inxi-init.txt updated for new init types.

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

1. Refactored tools/gpu_ids.pl to correct and enhance some features.

2. Renamed functions and sections to better reflect that the display interface
is an API, this makes stuff less odd internally, and makes the function/variable
names correspond better to what the stuff really is.

3. Commented out kde konversation data source config collector, that logic looks
like it never worked, and couldn't work, since it never actually located
inxi.conf files, just paths to the data directories.

4. Expanded release.pl to handle acxi docs as well, makes it all consistent and
a lot easier to do long term.

5. Fake --wsl WSL switch, not really used, but in case.

6. Changed $b_cygwin to $windows{'cygwin'} and added $windows{'wsl'}.

7. Added -WSL to debugger string generator once WSL type is detected.

8. Refactored init, runlevel functions get_init_data() (now InitData::get()),
get_runlevel_data() (now InitData::get_runlevel()), get_runlevel_default() (now
InitData::get_runlevel_default()) into one package/class: InitData. This should
have been done a long time ago, to follow the general rule "if > 1 functions for
a tool refactor it into a class/package" for when to create a package/class
internally.

9. Completed gpu_ids.pl, now outputs the full hash set per item, so entire
blocks can be copied/pasted over. Something of a pain to get comments included,
which aren't strictly necessary in pinxi itself, but they do help read the
hashes for gpu data.
This commit is contained in:
Harald Hope 2022-10-31 15:47:31 -07:00
parent b6ac6026f2
commit 029a331a06
3 changed files with 692 additions and 294 deletions

652
inxi

File diff suppressed because it is too large Load diff

21
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 "2022\-10\-08" "inxi" "inxi manual"
.TH INXI 1 "2022\-10\-31" "inxi" "inxi manual"
.SH NAME
inxi \- Command line system information script for console and IRC
@ -332,9 +332,10 @@ If protocol is not detected, shows:
\fBDisplay: server: Xorg 1.15.1\fR
Also shows screen resolution(s) (per monitor/X screen). For X.org: OpenGL
renderer, OpenGL core profile version/OpenGL version; for VESA: data (for
Xvesa); for Wayland: GBM/EGL data (not implemented).
Also shows screen resolution(s) (per monitor/X screen). Shows graphics API used,
like OpenGL. For X.org: OpenGL renderer, OpenGL core profile version/OpenGL
version; for VESA: data (for Xvesa); for Wayland: GBM/EGL data (not
implemented).
Compositor information will show if detected using \fB\-xx\fR option or always
if detected and Wayland since the compositor is the server with Wayland.
@ -1081,7 +1082,7 @@ configuration items, or the actual widths of the terminal.
* \fB\-y\fR \- sets default width of 80 columns.
.br
* \fB\-y [80-xxx]\fR \- sets width to given number. Must be 80 or more.
* \fB\-y [60-xxx]\fR \- sets width to given number. Must be 60 or more.
.br
* \fB\-y 1\fR \- switches to a single indented key/value pair per line, and
removes all long line wrapping (similar to \fBdmidecode\fR output). Not
@ -2098,7 +2099,7 @@ Graphics:
built: 2008 res: 1280x1024 hz: 60 dpi: 86 gamma: 1.4
size: 376x301mm (14.8x11.85") diag: 482mm (19") ratio: 5:4 modes:
max: 1280x1024 min: 720x400
OpenGL: renderer: AMD CEDAR (DRM 2.50.0 / 5.16.0-11.1\-liquorix-amd64 LLVM
API: OpenGL renderer: AMD CEDAR (DRM 2.50.0 / 5.16.0-11.1\-liquorix-amd64 LLVM
12.0.1) v: 3.3 Mesa 21.2.6 compat\-v: 3.1 direct render: Yes
....\fR
.fi
@ -2121,6 +2122,7 @@ Graphics:
res: 1280x1024 hz: 60 gamma: 1.4 dpi: 86 gamma: 1.4
size: 380x300mm (15.0x11.8") diag: 484mm (19.1") ratio: 5:4 modes:
max: 1280x1024 min: 720x400
API: GBM/EGL
Message: Wayland GBM/EGL data currently not available.
.fi
.TP
@ -2672,6 +2674,13 @@ the Konversation \fR/inxi\fR command to work:
.B ln \-s /usr/share/konversation /usr/share/apps/
Make sure you also have the \fRqdbus\-qt5\fR package (Debian/Ubuntu + derived),
\fRqt5\-qttools\fR (Fedora/RHEL/SUSE + derived), \fRqt5\-tools\fR (Arch +
derived) installed (for KDE 5/QT 5, check distros for future package names),
\fRqt5\-tools\fR (Arch + derived). Check your distro if the program is missing.
Depending on the distro, \fR/usr/lib/qt5/bin/qdbus\fR is required, which in
Debian+ is provided by the above package.
Then you can start inxi directly, like this:
.B /inxi

View file

@ -1,3 +1,256 @@
================================================================================
Version: 3.3.23
Patch: 00
Date: 2022-10-31
--------------------------------------------------------------------------------
RELEASE NOTES:
--------------------------------------------------------------------------------
This release fixes another very long standing bug, which I was not sure was an
inxi or a Konversation bug, which made tracking it down very difficult. Special
thanks to argonel of Konversation for helping solve this problem, or at least,
for directing my attention towards the likely cause area, and away from wrong
ideas. The bug was that inxi simply did not run in Konversation, it would exit
with error when run with /cmd or /inxi via symbolic links.
This may not seem like a huge deal to many of you, but the actual history of
inxi was directly linked to user support in mainly Konversation, so this feature
not working I have alwyas found extremely annoying, but I could never figure out
why it wasn't workiing, and didn't really know where to start until Argonel
helped narrow it down to a specific Konversation function in inxi. At which
point tracking down the real bug was fairly easy. Since testing in IRC is always
a key test point for inxi features and releases, not working in my main GUI IRC
client forced me to use CLI clients like irssi, via /exec -o inxi.
There was a secondary cause of failure, which was missing a key qdbus package,
which made figuring this one out a two step process.
So inxi is once again working in all areas, with no known significant failure
areas beyond known issues that have no current solution, or which I don't feel
like doing.
But possibly more important, a goal I have had for a while now of doing long
needed code refactors, bug fixes, without huge new code blocks or features
adding new future fixes and bugs, has been slowly happening.
This was quite important, because inxi's codebase and logic is so complex and
large now that at some point, it required rest and cleanup and corrections,
without continuously adding new code and logic, which would then trigger new
fixes and bugs. In other words, the code is taking a long needed, and well
deserved, breather, to recover after huge increases in the overall LOC and
feature sets.
--------------------------------------------------------------------------------
KNOWN ISSUES:
1. No known way to detect that the system might be Wayland for the Graphics:..
API: fixes, unless Xwayland is installed if the wayland protocol detections
failed, which they often do in console. Not practical to look for all compositor
variants on system to determine if it could be Wayland if not X or Xvesa, so
that one will just be what it is, which is fine, definitely better than it was
before. Note this is only an issue if in Console, no Display. Note that if inxi
is run as root, Wayland data also usually fails, even in Display.
--------------------------------------------------------------------------------
BUGS:
1. Another corner case monitor position issue, applied fallback primary monitor
rule when a primary monitor had already been located. This is corrected via a
graphics global $b_primary which once set will disable this fallback feature.
Objectively, the fallback feature should just be removed. The test is if that
monitor is not primary, and if position is 0x0, then assume primary, without
verifying no primary had been located yet.
2. A super old bug, in current konversation, was failing to trip the konvi
detections, which then resulted in not stripping off the first two args in
@ARGV, which then resulted in bad args being passed to inxi on konvi start,
which then resulted in silent failing. Many thanks to argonel of #konversation
for the patience to help me figure out what was going on with this bug. He's
been a Konversation developer probably longer than I've been doing inxi.
Cause was very tricky and subtle, the ps aux path for konvi had changed
slightly, not the path, but the pattern, it used to be:
konversation -session [sessin id]
but it's changed to:
konversation -qwindowtitle Konversation
or just plain:
konversation as line ending.
This led to failure to find konvi running, which then made the konvi ids fail.
Also, this would not work if the qdbus-qt5 package was not installed, or other
distros might have that packaged differently. Because of these dual causes, I
was simply unable to figure out what was going on for many years. I suspect this
stopped working with KDE 5/QT 5, but I'm not sure.
3. Used wrong key names for some ZFS tests and fallbacks, those could have led
to failures though very difficult to test and verify this. Also see fix 5, which
of course also looks like a bug, acts like one, but was actually due to a new
use of /dev/disk/by-partuuid for ZFS components in Ubuntu which inxi had not
seen before.
--------------------------------------------------------------------------------
FIXES:
1. Alternate ps IDs for appimage detection (try appimagelauncher), alternate
paths for possible appimage storage locations (also try ~/.appimage/*). File
names might be *.appimage or *.AppImage, probably other variants too.
2. Going along with Change 1, made tests more granular for missing graphics API
type data. Also updated messages to be more correct and clear, in and out of
display. This corrects an issue I'd seen but never resolved, which was on
headless systems showing this message:
Message: GL data unavailable in console. Try -G --display
Now the tests are far more granular, and only show that if glxinfo is installed,
and also shows specific messages if glxinfo not installed, but X/Xorg present,
or, for Wayland, if Xwayland present. These all get their own specific messages
now, and generally will also show which API is being used, or API: N/A if
nothing is detected, as in the case of a headless system with no X, Wayland,
etc.
3. Github issue #275 on of all things Microsoft WSL environment, has a small
glitch with undefined display hz, but otherwise inxi seems to work in that
environment, albeit missing many data types!
4. Made tests for konversation more robust, including test for
$ENV{'PYTHONPATH'} containing konversation in path, which I believe will work
for all new Konversations (KDE 5 and newer), and be much faster. The previous
tests are now more robust and less prone to failure, and only activate when
PYTHONPATH is not present with konversation string present as well.
5. Fix for ZFS using /dev/disk/by-partuuid for partition id in zfs,
which can lead to wrong usable disk total size report, along with failure
to show components. Thanks delanym, issue #276 for reporting this problem, which
also exposed some harder to trigger bugs in ZFS (Bug 3).
6. Exposed by issue #276, case where line was wrapping value when value was too
short visually to value: used: 34.4 GiB (4.5%) due to the 3 or more words
trigger to enable wrapping of value, but noticed that if length of line was
exactly max-width, not > or <, it might vanish.
7. Case where no X or GPU drivers found, but dri driver detected, was not
showing, now does.
8. OpenRC is the init system in some cases, that is: readlink /sbin/init >
/sbin/openrc-init, where /proc/1/comm == init. Was showing only as OpenRC rc
type, which wasn't actually correct.
--------------------------------------------------------------------------------
ENHANCEMENTS:
1. New nvidia gpu product ids for Turing, Ampere, Lovelace, Hopper. New Intel
GPU ids.
2. Added Zinc to systembase/distro, needs slightly special handling to get both
names right. Also added Tuxedo, which could use existing methods.
3. Added dpkg tool nala, which is sort of a CLI front end for apt, zinc uses it,
but it's also in Debian main package pool. Also deb-get, which is another zinc
thing for package management.
4. Full support for dinit: version, dinitctl w/status in ServiceData
4. Added initial support for init systems: 31init (31 line C program, no
--version), Hummingbird (unknown if -v/--version).
5. A few new CPU arch ids (new Intels).
--------------------------------------------------------------------------------
CHANGES:
1. Going somewhat along with the change in Audio to call ALSA a Sound API
instead of a sound server, changed key name OpenGL: to API: OpenGL in Graphics.
Also for EGL wayland, calling that the api too.
https://en.wikipedia.org/wiki/OpenGL
This conforms more closely to how these things are defined. Note that once
again, a value had been used as a key name, which almost always indicates a
failure to understand something about the core tech.
2. Changed wrapping of values from 3 words or more to 3 or more words AND length
> 24 characters. Saw example of:
.... used: 28.45 GiB
(4.5%)
which isn't desirable.
3. Changed minimum wrap to 60 columns, the new wrapper features are working so
well that if users want output that short, it will usually work fine, except of
course for very long word strings like a kernel name or parameter.
Note that this does not truncate long 'words' that might be wrapped, or going
along with Change 2, long 'sentences' of 2 words, those will always appear on
the same line regardless. For 'sentences' of 3 or more words, however, it goes
word by word, so it could well wrap after the first word, and so on. Obviously,
a 24 or fewer character value will never be wrapped, which was the intended
correction of change 2.
4. Going with Fix 8, OpenRc is an init system when it owns /proc/1/comm, had not
realized that /proc/1/comm == init can map to dinit, openrc as init. Now will
only show OpenRc as rc: type if not init as well.
--------------------------------------------------------------------------------
DOCUMENTATION:
1. Updates in man for Change 1.
2. Added to docs/inxi-graphics.txt good quote re EGL/GBM, as well as VBE/GOP for
vesa. Trying to find docs where they actually say clearly it's an API is
remarkably difficult.
3. Man page, added note about Konversation requiring qdbus-qt5 (Debian+),
qt5-qttool (RHEL+/SUSE+), qt-tools (Arch+) for inxi to work inside it. Also
updated smxi.org/docs/inxi-usage.txt to note requirements for Konversation use
and setup.
4. Man, help, changed min width for -y/--width from 80 to 60.
5. docs/inxi-values.txt updated for --cygwin, --wsl fake OS type switches. Not
technically the OS, more the environment, but close enough.
6. docs/inxi-init.txt updated for new init types.
--------------------------------------------------------------------------------
CODE:
1. Refactored tools/gpu_ids.pl to correct and enhance some features.
2. Renamed functions and sections to better reflect that the display interface
is an API, this makes stuff less odd internally, and makes the function/variable
names correspond better to what the stuff really is.
3. Commented out kde konversation data source config collector, that logic looks
like it never worked, and couldn't work, since it never actually located
inxi.conf files, just paths to the data directories.
4. Expanded release.pl to handle acxi docs as well, makes it all consistent and
a lot easier to do long term.
5. Fake --wsl WSL switch, not really used, but in case.
6. Changed $b_cygwin to $windows{'cygwin'} and added $windows{'wsl'}.
7. Added -WSL to debugger string generator once WSL type is detected.
8. Refactored init, runlevel functions get_init_data() (now InitData::get()),
get_runlevel_data() (now InitData::get_runlevel()), get_runlevel_default() (now
InitData::get_runlevel_default()) into one package/class: InitData. This should
have been done a long time ago, to follow the general rule "if > 1 functions for
a tool refactor it into a class/package" for when to create a package/class
internally.
9. Completed gpu_ids.pl, now outputs the full hash set per item, so entire
blocks can be copied/pasted over. Something of a pain to get comments included,
which aren't strictly necessary in pinxi itself, but they do help read the
hashes for gpu data.
--------------------------------------------------------------------------------
-- Harald Hope - Mon, 31 Oct 2022 16:45:37 -0700
================================================================================
Version: 3.3.22
Patch: 00