Commit graph

250 commits

Author SHA1 Message Date
Harald Hope
c5f89aafd8 Phase 2 of the big CPU upgrade a few years back is now done, I'd left one part
inadequate in terms of the data structures, mainly because I did not have data
samples to test, but also because no corner cases that required a more robust
data structure for die > cluster > core counts showed up duing the initial
development phase. This led to somewhat predictable issues and bug reports when
someone had a CPU that did require that structure to show correct core/die type
data.

So while most users will see very little difference, beyond dies: and clusters:
items appearing where they did not before, the internal logic is now far more
robust.

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

1. CPU: Codeberg issue #307 finally helped solve the old AMD ryzen wrong core
count issue, I believe. Thanks superkoning for the data and reporting the
RISC-V failure to show right core counts, and to show MT when it isn't, which
was caused by same issue.

2. RECOMMENDS: Codeberg user Ricky-Tigg in issue #309 for taking the time to
actually check --recommends output for inconsistencies. And finding them!

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

1. The old issue #293 about AMD Ryzen 2 die CPU showing wrong core counts is
probably fixed, but can't know until it's confirmed for that exact CPU. Fix 1a
should handle all variants, I hope. Tested on old OS VM installs, and found most
of this logic never fires since /sys had a very barebones topology section f for
CPUs back then.

2. DESKTOP: No known way to get Cosmic DE version, or Iced toolkit version. If
you know of a non-hackish way to get that version info, let me know.

3. DRIVES: The disk vendor pinxi/tools/lists/disks.unhandled list keeps getting
longer, but most are not possible match, either not unique, or unknown models.
Doing these matches is incredibly tedious, so I only do it every few releases,
but this time there were a LOT of new matches and vendors.

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

1. CPU: wrong core counts due to inadequate internal logic, and some new uses of
clusters to categorize core ids. Since this is a pretty new change in the kernel
topology logic, this wasn't really a bug per se, but it looks like one to users.

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

1a. CPU: At long last, codeberg issue #307 supplied the data of a multi-die or
more accurately, a multi-cluster but no die_id, system. RISC-V in this case,
which tripped the wrong core count, and a false MT type, because it had > 1
cluster, but no die. Each cluster repeated the same core_ids.

That's the same issue I believe the old AMD Ryzen issue had, but I never got the
required data for that. Had to redo the entire /sys CPU data structure to be:
phyical_ids > die_ids > cluster_ids > core_ids, which was very tricky to do.

1b. CPU: cpu_arch: fixed some AMD Zen generations, and process nodes, had
estimated from roadmap, updated with real.

2a. RECOMMENDS: issue #309 notes ifconfig wasn't clearly ID'ed as:
(deprecated, ip preferred)
That's been corrected.

2b. RECOMMENDS: issue #309 also noted that lspci is not listed, which was an
oversight, given the equivalent BSD tools are tested for BSDs. I have no idea
how that was missed all these years!

2c. RECOMMENDS: added ps test, found a case where that's not installed.

3. GRAPHICS: GPU data: fixed an nvidia 470 Kepler2/Fermi2 ID error. And also
corrected the arch name, it's Kepler-2, not Kepler.

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

1. MACHINE: Added systemd.machine_id to --filter-uuid filters. Thanks Malcolm
from Opensuse for pointing out that one.

2a. CPU: Now shows clusters, if found. Clusters seem related to L2 assignment,
but not always. When no die_id or cluster_id found, won't show that item.

2b. CPU: New AMD, Intel CPU arch models.

3a. GRAPHICS: added cosmic-comp compositor support. No current known way to get
version.

3b. GRAPHICS: new gpu ids for intel, nvidia.

4. SYSTEM: Desktop: Added basic Cosmic DE detection. Uses XDG for detection,
and cosmic-session for possible future version.

5. INFO: Power: Added system76-power power manager.

6. DRIVES: a huge disk vendor update. New vendors, new matches for existing!
It's surreal how many SSD and USB makers there are out in the world. It's like
running a corner store used to be or something. There are a LOT of new matches
and vendors this time around!

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

1. CPU: Moved the new dies:/clusters: block to right after the cpu physical
count, and before the core count. This makes the order of output match the order
of organization: physical cpus > dies > cluster > cores. Also if it got a
positive die_id or cluster_id, will show how many found always for -Ca. Before
it only showed if greater than 1 die.

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

1a. MAN: Debian Lintian tests found a typo! That's fixed. I would have expected
many more than 1 typos, so that's good to see.

1b. MAN: A missing space and extra " slightly broke the header:
.TH INXI 1 "2024\-06-27"inxi" "inxi manual"
should be:
.TH INXI 1 "2024\-06-27" inxi "inxi manual"
All that happens due to this is bottom of man output shows:
inxi"    2024-06-18            INXI(1)
so no big deal, but it's corrected anyway.

1c. MAN: Also added inxi version to man info line, I noticed other programs do
that. One more thing to forget during upgrades heh. Maybe I'll add that to
release.pl since I'm sure to forget it.

1d. MAN: Updated to show clusters added, and to show cluster sample for -C a.
Also added more complete explanation of when dies/clusters show, and how core
and cluster counts work.

2a. OPTIONS: Fixed typo, thanks codeberg PR. Note inxi branch is not for PR,
only pinxi. But good to catch typos anyway.

2b. OPTIONS: Added dies, clusters to -Ca, now that dies/clusters always show if
found, regardless of number.

3a. DOCS: docs/inxi-cpu.txt: had neglected to add in the advanced sys/cpuinfo
pairs debugger code from the initial Slackware LQ forums threads. Added in
CPU DEGUGGING primary section, with that code, which is 2 1 liners, could be 1.

This is same basic logic the --debug 2x debugger collects, but sometimes it's
easier to just get the two files we need from people.

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

1. simplified main::filter_partitions, main::filter_pci_long. Now takes string
by reference, and removes all copies, so those are more efficient now.

2a. CPU: finally added in advanced topology structure phys > dies > clusters >
cores to the main cpu_sys data structure, I'd avoided doing that in past because
it's hard, and I never found a data sample that had repeated core_ids per die,
until this one. Note while for RISC-V, this fix applies to the entire class of
possible repeating core_ids per die / cluster.

2b. CPU: CpuItem:: sys_data_grabber(): Cleaned up, added more globbing items for
/sys data. Needed to get at least cluster_id, but made globbing easier to parse
and read, and since the cluster stuff is useful, added more related.

This fix may have unintended consequences of breaking other logic, but I believe
it is only within the /sys data itself.

2c. CPU: refactored ordering of cpu subs, renamed many to be less ambiguous, now
ordered more consistently. The cpu code fixes made me realize that code was not
easy to follow in terms of where things were arranged, now it's quite
consistent, with clear section headers, end section etc.

3. NETWORK: cleaned up code in set_ifconfig(), set_ip();

4. PsData: fixed corner case where no ps is present in system. This trips some
undefined errors in the grabber.

5. DOWNLOADER: failed to handle case of no curl OR wget, and tried running -U
without a downloader anyway.

Made the following changes:
* Network -i: if no dig, and no downloaders, just skips grabbing IPs.
* Updater -U: if no downloader, exit with error message.
* Weather -w: if no downloader, will just show no connection available.

6. DATA: tools/lists/gpu.nv.560.raw added. tools/gpu_raw.pl, tools/gpu_ids.pl
updated for nv 560 files.
2024-09-04 15:12:37 -07:00
Harald Hope
d11fce8041 Added more Wayland wm/de updates: wm, tools, lockers, etc. This list will grow
slowly over time, I'm sure. A new but very old distro, T2 SDE added, for distro
ID, mine package manager.

Adding support for something as uncommon as T2 has a primary value that such
systems, particularly very old ones, tend to expose certain corner case data
alternate syntaxes (clang --version, /etc/issue), which then makes inxi overall
more robust.

For example, because T2 used /etc/issue to show an ascii login, the actual first
line was just two literal lines, so the distro name appeared as two lines. This
was because there was an assumption that the first line of /etc/issue would
always be the distro name. Added filters to not use issue value if it does not
contain at least 3 characters.

Also added in premilinary Loongson CPU/GPU support, but for GPU, have only 1
product ID to match, and no other meaningful data. CPU may work, but needs real
hardware based testing to confirm. Obviously I can't do it, so if any Loongson
users want to test and report, feel free. Or not, up to you. Framework for full
support it there now.

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

1. mrmazda, as is often the case, for tracking and spotting issues with graphics
and desktop data. He also noticed the weird output for urpm repos, which is now
corrected, as well as finding some errors with rpm package counts, which led to
a small refactor of the rpm logic in PackageData.

2. GRAPHICS: gl_data(): gfxstrand on issue #303 for figuring out what was
breaking OpenGL Mesa driver version detection. (was extra (git-..commit-ID) at
end of version string).

3. DistroData: codeberg user r1w1s1 in issue #304 for pointing out that the '+'
part of the distro name can be meaningful, as in Slackware 15.0+, where the +
means it's Slackware current.

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

1. GRAPHICS: GPU device IDs: Intel device ID sources are not being reliable, and
some IDs vanished from the raw data files. This is too hard to work around, so
leaving as is. In a sense, Intel is just getting too hard to support, though
I'll keep trying. But it's not cute anymore.

This applies to Intel CPU Ids too, for some reason, Intel just can't seem to
manage to create a new CPU family ID, and so are actually running out of their
256 Family 6 model IDs (2^8, or 16x16 hex). This is bizarrre to see such a huge
corporation fail to do something so utterly trivial, and suggests that there may
still be internal engineering issues lingering despite the recent attemps to
resolve them.

2. PACKAGES: RPM remains unacceptably slow to get a simple package count query,
even with --nodigest / --nosignature, on one fedora 39 took 7 seconds, and in
mageia/fedora takes 0.35-0.80 seconds without those flags, which is easily 10x
slower than most package managers. There is nothing I can do to fix this that I
am aware of. If anyone knows of other options I can pass rpm to get it to list
the packages in a sane timeframe, let me know.

During previous testing, nodigest/signature did speed it up, but that seems to
have regressed now again in one fedora test case, but does work in most others.
For now, --rpm flag will be required to see rpm package counts for core rpm
distros, otherwise people will blame inxi for being slow.

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

1. Nothing to speak of beyond some fixes.

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

1a. REPOS: For slpkg, adapted to new syntax for each repo. Retained support for
older syntaxes.

1b. REPOS: Fixed output for urpm, pisi, and eopkg. These all had the same error,
which was creating a new full repo type line per repo listed by these software
tools. Now shows as expected:

[repo name] ~ [repo location]

2. main::set_path: added hack to put back in /opt/trinity/bin if distro forgot
to add it to PATH.

3a. SYSTEM: DesktopData: Added fallback test for twin for Trinity version
detections. This goes along with path fix for this extreme corner case (so far
mageia only one who didn't add trinity location to PATH).

3b. SYSTEM: DistroData: Added filter in case line 1 of /etc/issue doesn't
contain any valid characters. That's for T2 failure.

3c. SYSTEM: DistroData: main::clean_characters(): removed filter for '+' because
that can be a meaningful part of the name, as in r1w1s1's codeberg issue #304,
where the + indicates it's Slackware 15.0 Current, aka: Slackware 15.0+.

4. GRAPHICS: gl_data(): Issue #303 exposed a possible syntax that inxi had not
seen or handled before, the OpenGL core profile version string ending with a git
commit ID in parens:
OpenGL core profile version: 4.6 (Core Profile) Mesa 24.2.0-devel (git-f0620dae)
as opposed to handled and expected:
OpenGL core profile version: 4.6 (Core Profile) Mesa 24.2.0-devel

This just required adding another 0 or 1 occurance test for that ending git
commit string. Really for anything tacked on to the end of the string after the
mesa / nvidia driver version value.

5. PACKAGES: Added support for Mageia's urpmi package counts, using rpm. That's
either not worked, or broke recently, I don't know which.

Note that rpm -qa is unacceptably slow (even using --nodigest --nosignature), so
requires use of --rpm flag for primarily rpm distros. Otherwise they will think
it's inxi that is slow.

Just to document it, mageia also says they may move to dnf in the future. But
that should not matter with the redone logic.
https://wiki.mageia.org/en/Ways_to_install_programs#.deb_packages

6. INFO: compilers: made clang version detection more robust.

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

1. SYSTEM: DesktopData: Added the following items:

* menus/launchers: wayland gmenu, onagre, ulauncher, wmenu.

* greeters: slick-greeter/elephant-greeter lightdm, but those are not the same
as greetd/seatd type greeters so not using, but leaving in comments.

* bars: hybridbar.

* x11 wm: MaXX.

* wayland compositors: MagmaWM, newm [already abandoned], newm-atha [fork of
newm], niri, Pinnacle.

2. INFO: PowerData: Added waylock

3a. GRAPHICS: new AMD, Intel, Nvidia GPU IDs.

4a. GRAPHICS: loongson GPU arch data. Note this data is extremely incomplete,
but at least it's got the framework to support Loongson GPUs now. Hard to find
this data in any reliable format beyond process nodes for each CPU, and since
most GPUs are iGPUs, in theory those should be the same. Maybe some Chinese
users will decide to provide this info.

Also see CODE 4b for the tools for this item.

5. PACKAGES: added package manager type mine. That's used in T2, maybe others.
Also added tools gastone, gasgui.

6. REPOS: added basic T2 svn repo URL handler. Not robust, but that's fine.

7. CPU: added Loongon CPU arch support, that should work reasonably well out of
the box since also found sample set of cpuinfo files.

Also see CODE 4d for the tool for this item.

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

1. REPOS: See FIX 4. Output was silly for repo reports, that's always been
broken, now correctly shows expected (for urpm, eopkg, pisi):

Active urpm repos:
  1: [repo-name] ~ [repo location]
  2: [repo-name] ~ [repo location]

lines per package manager tool, instead of one full repo line per repo in the
output:

Active urpm repo: Stable
  1: [repo location]
Active urpm repo: Testing
  1: [repo location]

2: MAIN::clean_characters(): removed filter for '+' because that can be part of
the distro name, like Slackware 15.0+ (current, that is). Hopefully this won't
create any issues for other name strings, but it should be ok.

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

1a. DOCS: inxi-desktop-wm.txt, updated for new wm, bars, LM, launcher/menus.

1b. DOCS: inxi-power.txt: added waylock to lockers sectsion.

1c. DOCS: inxi-repo-package-manager.txt: updated for 3 syntaxes of slpkg, with
samples. Also updated for mageia urpm, which has special package list rpm
requirements.

1d. DOCS: inxi-cpu.txt: added more links and sources for Loongson.

1e. DOCS: inxi-distros.txt: refactored a bit, added top distro names to section
lists, added T2 instructions.

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

1a. MAIN: ProgramData:

* Had redundant busybox hash key data array, first one was replaced by explicit
busybox ash version logic in shell, and running one is for init data.

I don't actually know what Perl does when you give it a second case of same key
name for a hash. Probably worth finding out. But it worked in testing.

* Cleaned up, made consistent ', # unverified' program data key array comments
to make them easier to find/ Ideally one day we'll get people to help figure out
these unverified program version data items. Now to find a way to motivate
them...

1b. MAIN: PackageData: Added --dbg 67 to make rpm packages handling debuggable.
Also refactored a bit, again to make rpm stuff debuggable.

1c. MAIN: clean_characters: refactored, now uses references, not copies, and
removed '+' from filter. This can be meaningful part of distro name.

2. REPOS: refactored completely slpkg to handle 3 possible config file syntax,
including the 2024-04-19 update which changes it completely.

It's tempting to apply this to all multi-line repo syntax handlers, though the
cost is losing the order the repos appear in the file, since the data now goes
into a hash, which Perl does not have ordering, so it has to be sorted on
constructing of repo line arrays.

3. DEBUGGER: Added kdesktop, kwin_wayland, twin --version data, might be useful.
kwin_wayland was an oversight, already had kwin_x11 so just never added wl.

4a: TOOLS: made top comment header syntax consistent, added some GPL to ones
where I'd forgotten to do that. Updated copyright years. Also made empty line
use consistent in all the tool files.

4b. TOOLS: gpu_raw.pl: Got rid of manually updated list of nv numeric keys, and
now extract it it automatically, so updates by itself when I add a new nv driver
series. Should have made it that way from start, but better late than never.
Always trying to chip away at anything manual I have to update for these
matching tables, makes maintaining the features easier.

4c. TOOLS: gpu_raw.pl, gpu_ids.pl: added premilimary support for Loongson GPUs.
Very little data, but did at least get some device IDs for Loongson, but not
very reliable or accurate. This will need updates in future. Anyone Chinese
users want to help?

4d. TOOLS: cpu_arch.pl: added Loongon support, first new CPU arch in a while!
2024-06-18 14:00:07 -07:00
Harald Hope
c23f35b885 This is a nice point release that corrects and updates numerous smaller, and
larger, features. Most pressing in terms of numbers affected was the failure
to detect in display, non console, for Wayland without Xwayland running. But
updates will impact a fairly wide range of systems, though mostly are corner
case issues, but inxi is all about handling corner cases to make the handliing
of core stuff more robust and less prone to failure or error.

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

1. RAID: Codeberg issue #301 from olegStreejak helped expose a long standing set
of ZFS components bugs. This was superficially exposed by an unexpected
undefined value error in -o/--unmounted.

2. PARTITIONS/SWAP: again raised in issue #301, partitions failed to handle
/dev/gpt/[gpt-lable] syntax, leading to undetected mounted partitions showwing
in unmounted, and label/uuid not working.

3. UNMOUNTED: codeberg user kysh in issue #302 found a corner case that exposed
bug 2, using raw data as regex pattern, without protecting it. But most
important, he took the time to report it.

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

1. GRAPHICS/CPU: Intel data is really hard to track, and getting solid lists
of their gpu vs cpu generations is almost impossible, so these are just going
to lag a year or two fairly consistently. They also keep jumbling marketing
names up with physical hardware, making it even more difficult.

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

1. RAID: zfs_data(): a series of small glitches led to certain cases of BSD
RAID ZFS component data generating undefined value errors in unexpected places.

The bug and fixes required some careful corrections since there were more than
1 present, a bad regex pattern.

2. UNMOUNTED: weak regex fails when mount line item contains regex special
characters in its string, like: GDRIVE{**6Cm8i**}. Thanks codeberg issue poster
partitions, so this was just an oversight.

Solution was to pull apart some combined test arrays, and then use \Q$_\E
wrappers in the regex. Obviously using raw system data in a regex when you don't
know what it can contain was always a mistake, but this one just slipped by
since that syntax is not common.

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

1. DRIVES: DiskItem::disk_vendor(): Fixed an overly loose SanDisk vendor ID that
led to a Seagate ST8000DM004-2CX188_WCT193ZX being ID'ed as a SanDisk. The
culprit was forgetting the 'starts with ^ in:
^X[1-6]\d{2}
Thanks Codebergy issue poster thatso in issue #299 for pointing this out.

2. NETWORK: services: was missing nfsd because it's a kernel process, that's
corrected. Showed as: [nfsd]

3. MAIN: primary DISPLAY test fails to check for WAYLAND_DISPLAY and other
desktop session environmental variables only present if X/Wayland are running
current display. This led to $b_display not getting set when for example Wayland
in Sway without Xwayland, so no $DISPLAY set.

4. GlabelData: glabel status will right align column 1, which is not obvious
unless you have something like this:
                                gpt/bootfs     N/A  ada0p1
gptid/67d1a56b-7fb2-11ee-a7ba-002590ec5bf2     N/A  ada0p1
                                gpt/efiesp     N/A  ada0p2

This led to the expected splits being off by one. Fix is using 'strip' in
main::grabber.

5. BSD: PARTITIONS/SWAP: failed to get mapped gpt data, which led to more false
unmounted issues. These were exposed in codeberg issue #301. Added explicit
detections for /dev/gtp[^\]*/ which means relying on that literal path to be
present. Note that can be gpt or gptid, the latter if it's a UUID type string.

This also led to failures for UUID and LABEL for partitions and swap.

6. SYSTEM: DistroData: changed blankon to use system base from debian_version
file version. Had as manual before, but when install gets old, that's deceptive
since it will be an ancient Debian sid. Better to call it what it is in the
actual install.

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

1a. SYSTEM: DesktopData: Added support for yet another Deepin window manager,
deepin-kwin_x11. Also for deepin-kwin_wayland.

1b. SYSTEM: DesktopData: Added support for hyprlock, hyprland's screenlocker.

1c. SYSTEM: DistroData: Added support for SolyD system base Debian detection.

2. NETWORK: services: added mld. As with nfsd, it's a kernel process: [mld]

3a. GRAPHICS: GPU DATA: added more gpu ids for nvidia, amd, intel.

3b. GRAPHICS: Xorg drivers: added possible future rust nvidia nova driver. Not
in kernel yet but may be. Also added in various filter lists just in case.
Search for'nouveau' to find occurances.

4. CPU: Added more AMD, Intel CPU Ids. The Intel stuff is getting really
difficult to track, they refuse to adopt sane family updates, keeping it always
at 6, and thus cram more and more into finite 2 hexadecimal numbers, leaving
marketing terms in place of actual die process engineering. There's only so much
I can do to work around this, so if you find errors, do the research, and submit
corrections, keeping in mind these things are super fuzzy.

5. DRIVES: More disk vendors, the endless list. Unhandled list grows slowly,
maybe one day someone will step in and figure out what more of them are,
assuming they have a unique name string of course.

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

1. No Changes.

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

1a. DOCS: inxi-network.txt: added notes for nfsd, mld

1b. DOCS: inxi-desktop.txt: added de wm deepin-kwin_x11, deepin-kwin_wayland.

1c. DOCS: inxi-power.txt: added hyperlock.

2. DATA: data/machine/elbrus/sets: added bootdata/fruid sets. These are from a
while back but were not labeled consistently, so sorted them into what are
hopefully actual pairs of data files.
2024-04-13 19:49:33 -07:00
Harald Hope
6960559e63 A quick point release, one critical bug fix, and a few new features and
enhancements. Extended the running service from Info: Power: services: to
Network: Info: services:. The PsData refactor makes this quite easy to do. So
why not?

Also in terms of general usability, added an error handler for options that
require primary options to be meaningful, that was already there for --label and
--uuid, but there are several other similar modifier options that were not
handled.

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

1. GRAPHICS: Codeberg user malcolmlewis, for being the first to find a fatal bug
(see BUGS 1) in the newly shipped inxi 3.3.32 codebase. Not complex bug, just
stupid coding error.

2. OPTIONS: mrmazda has been wanting an options handler that tells users when
they use an option that only modifies another, without using the primary option.
That is now working.

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

1. INFO/NETWORK: Terminology: daemon/service/process: following:
https://serverfault.com/questions/129055/is-there-a-difference-between-a-\
daemon-and-a-service

* A "Service" could refer to either a Daemon or a Service.

* A daemon is a subset of services that always run in memory waiting to service
a request.

For example, NetworkManager can be started with --no-daemon option, but still
be running as an active service, thus, there is a difference.

Note that to remove this ambiguity we use the term: services:

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

1. GRAPHICS: GraphicsItem::map_monitor_ids(): a stray bit of old syntax tripped
an impossible data error. Cause was accidentally make a array index be an index
pointing to an array reference index, leading to failure. Thanks codeberg user
malcolmlewis for triggering this case, which is not super easy to trip. Never
tripped in any recent testing, but valid and a bug.
https://codeberg.org/smxi/inxi/issues/298

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

1. DistroData: Removed a stray print debugger.

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

1. SYSTEM: DistroData: Added final distro/base name cleaners, remove duplicate
'words' that are not numbers from the distro name if they occur in base name.
Also handles a corner case where name and base are the same string, then it
just sets base to empty. Only runs with -Sx and successful name and base
detection.

2. OPTIONS: Moved and updated these from Output Control section to main options:

* Added --ip-limit as synonym for --limit so it fits better with --ip.

* Added --partition-sort, --ps to --partitions-sort, that makes it fit better
with --partition/--partition-full. It only shows --partitions*, but supports
either syntax so it doesn't matter how you remember it.

* Added new error handler type: arg-modifier which is used to show missing
primary option when primary option modifier is used, like --sleep/-C,
-p/--partitions-sort, -l/-p, and so on.

3. MACHINE: --uuid/-u now also activates UUID item, like partitions. Keeping
-a adding behavior since we want all that info, but make use of -u consistent
now that using uuid in machine report. Not common though.

4. NETWORK: -n/-i -a now trip a services: report, with a new line:
Info: services: [services]. These can be daemons or services, same as with Power
services:.

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

1a. MAN/OPTIONS: Re-arranged option locations, moved back to their modified
options in primary options. Those didn't fit there, they should have been next
to the options they modify.

* Moved --partition-sort back up to --partitions [from Output Control sections]

* Moved --limit to --ip-limit next to --ip [from Output Control sections].

1b. MAN/OPTIONS: changed daemons: to services:

2. INFO: changed Power:... daemons: to services: due to the fact not all
services are daemons, and some potential daemons can be started explicitly with
--no-daemon flag (like NetworkManager), which means it is false to say it's a
daemon.

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

1a. MAN/OPTIONS: See Change 1, moved --partitions-sort, --limit, back up to main
options they modify to make it more readily obvious they belong together.

2a. DOCS: inxi-battery.txt: updated, added TLP/tlp-stat info.

2b. DOCS: inxi-network.txt: added DAEMONS tools section.

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

1a. DEBUG: moved the DesktopData::de_wm_debugger() to
main::feature_debugger(). This is a useful tool and will be used for other
complex user data debugging requirements where clear output helps develop and
debug issue. Very useful for --dbg 63 so making general tool. Also used for new
--dbg 66, DistroData, which works in similar way.

1b. DEBUG: Added to SystemDebugger 'tlp-stat -s', forgot that one.

1c. DEBUG: Added --dbg 66 for DistroData, like 63 for DesktopData.

2. SYSTEM: DistroData: refactored to use primary $distro hash ref, this is also
what is passed back to the System line generator now. Switched most variables to
be hash keys, this allows for debugging and tracking what trips the distro data
for --dbg 66, for logging, and to more rapidly check/add/update distro/base IDs.

3a. CORE: OptionsHandler: small refactor, moved pledge block to set_pledge(),
and moved all option modifier tests to check_modifiers(). This makes it more
obvious each set is its own set of actions, and is easier to maintain.

3b. CORE: main::error_handler(): new type: arg-modifier: used in 3a.

3c. CORE: main::make_list_value() replaces main::set_join_sep(), now lists that
can be too long and require a space after separator are generated all by
reference, making for easier and more consistent long value outputs.
2024-02-06 19:38:03 -08:00
Harald Hope
d76427f4b6 PACKAGERS: The code repo for inxi is codeberg.org/smxi/inxi. If you have not yet
changed your packaging source url, you will need to do that. I have extended for
a few months the mirror of codeberg inxi to github, but I will turn that mirror
off fairly soon. The pinxi inxi-perl branch mirror is already turned off.

--------------------------------------------------------------------------------

This is a massive upgrade, featuring many core tool refactors, leading to
significantly enhanced abilities to debug and add support for various features,
particularly desktop type data, but any software type version reports as well.

Many parts of the core logic have been touched, and the testing has been the
most vigorous in recent memory, thanks to antiX and Slackware, and mrmazda, in
particular for their significant help making these new features and upgrades
far less buggy out of the box than would have otherwise been possible.

* Finally, a reasonable quality RAM report for Linux with dmi table RAM data,
without needing dmidecode or root! Uses udevadm, which despite some fairly
significant weak poinots, is ok, except for issues like module voltage, which
are stuck at a false value of 1. Also multi memory array system boards have poor
to no native handling, so inxi tries to work around that failing.

* A big improvement in ability to match xrandr X port ID to DRM port IDs, using
a stable value found in each. This has been a long standing weak spot for multi
monitor display IDs.

* Power data, for suspend/hibernate, screensavers, closes a recent issue #292
from chromer030. This also extended to running power daemons, and in -S, Desktop
report, added screensaver and lockers in tools:.

* A huge upgrade to all core Desktop/wm data, including new data types, complete
internal refactoring, including of all program version data, ps based data, etc.
This will massively reduce the risk of errors, bugs, etc, in the future, and
also makes debugging and adding support for new de/wm far easier.

* Note this change: Desktop info: has been repurposed to the new advanced DE
info report (KDE Frameworks only currently), and the old info:, which was never
well named, now is called with:, because it's a report on the various parts, or
components, that make up the de/wm. Also the order was changed in the Desktop
line: Desktop: v: [tk: [v:]] [info: v:] [wm: [v:]] [with:] [tools:] [dm:/lm:].

* A big upgrade in the TinyX logic, which should work now to get resolutions for
TinyCore and possibly other tiny x using distros. That includes detections for
all known TinyX servers, not just Xvesa.

* With TinyX fixes, now has full support for Slitaz, package manager, distro id,
repos. And Alpine Linux was enhanced and upgraded re support as well with these
fixes.

OPTIONS REMOVAL/DEPRECATION:
To free up upper case single letter options, merged -W with -w and removed -W,
which now trips a removed option error. To prepare for -V being removed, that
shows a deprecated message then the full version.

Note that if you really care and want -V retained, file an issue, or contact
inxi and say so. It will only really take one person who has a preference to
retain -V to keep it. That will be decided next inxi, if nobody cared, then -V
will be removed. Ideally say why you care, and why typing --vf is too much.

The use of -W was always an error, forced I think by some options handling
limits of bash. -V was just to have a single letter --version, but I think given
-v is verbosity, -V is actually slightly confusing. Also, single letter options
are in short supply now, and there's no point in wasting them on stuff where
it's not really needed to get fast easy output for features.

Also removed the long since deprecated --gpu, --nvidia, --nv, were removed, and
will show option removed message.

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

1. GRAPHICS: Android compositor: Thanks codeberg.org/smxi/inxi issue poster
Mhowser for providing an Android data set from a rooted FxTec Pro1-X phone,
which gave enough info to polish up and add some more Android support. But only
on rooted devices, but Android doesn't let you learn much if the device is not
rooted. That issue is lost because it was put on pinxi issues, before pinxi
was switched to use inxi issues to avoid confusion.

2. DOCS: data/audio/audio-datasets: mrmazda provided his large collection of
audio data debuggers, which have alsa, systemctl, pulse, etc, debugging data.

3. ONGOING: mrmazda, for finding and forwarding subtle to not so subtle issues.
See Bugs 4, Fixes 6b. In this case pointed me to the relevant forum posting that
exposed the error, which was enough to track it down.

4. SYSTEM: DesktopData: The people over at antiX forums were really helpful
finding/testing the new desktop/wm etc logic. Many glitches, errors, bugs, etc,
found and corrected thanks to the excellent testing. ile and abc-nix in
particular found some significant issues that were finally resolved. Also thanks
to Brian Masinick, rokytnji, anticapitalista for helping making antiX for all
these years.

https://www.antixforum.com/forums/topic/testing-pinxi-next-inxi-user-ram-\
report-no-root-sudo-and-much-more/

5. RAM: The new udevadm was significantly improved and corrected thanks to the
Slackware forums people. As is often the case, when it comes to having complex
non-standard hardware, they came though, and exposed some key problems which let
this new feature come out the door in much better shape than it would otherwise
have done.

https://www.linuxquestions.org/questions/slackware-14/new-inxi-pinxi-\
features-user-ram-reports-and-much-more-testers-4175732843/

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

1a. SYSTEM: DistroData: no obvious way to detect edubuntu, bunsenlabs, sorry.

1b. SYSTEM: CompilerVersion::version_proc(): the /proc/version string is far
too unreliable because distros keep making up new syntaxes, which makes regex
parsing fail consistently over time. Ubuntu was the latest culprit. Need a
better data source, ideally from /sys. Latest breaks handled with much looser
regex, but only matter of time before a new string pattern breaks it.

2. GRAPHICS: No API type data so far for non Xvesa TinyX servers. They don't
seem to support the -list option like Xvesa does.

3a. CORE: very old busybox ps did not accept any arguments, so will always fail.
However, this is not important since new busybox has supported that for a long
time.

3b. CORE: in some cases, ps -wwjp $pppid truncates long command names, like
io.elementary.t[erminal]. No idea why since -ww is supposed to make it not
truncate.

4. CPU: for at least AMD Threadripper 2950x 16 core, 2 die, core counts are
wrong, but since I never got the required data, and can't guess, that will
remain wrong until I get data from a comparable CPU to debug it using the CPU
data pairs required to figure it out. Why people file issues that only their
system data can resolve, then refuse to supply that data, is beyond me, I was
hoping to get away from this type of problem by going to codeberg, but
apparently it's a universal issue. My guess is that for the Zen+ only series, >
1 die, the core numbers were per die, not per physical CPU as with all other
AMDs and Intels. Just a guess though, not going to act on it because fix is very
hard if that's the case, and I won't work on it without the real data.

5. RAM: udevadm data:

* For some reason, voltages are reported as 1, for all types, or not at all.
This is almost certainly a bug with udevadm or the way it collects data, so inxi
shows note: check when they are all equal to 1.

* Unfortunately the udevadm authors neglected to provide RAM array and matching
device handles so we can easily match array to device, and they also totally
neglected reporting on actual arrays found, for systems with > 1 array, they
list only the specs for the one array. inxi has to do the work to actually try
to generate the array capacities etc. This relies on a weak hack, assume that
Node [x] refers to the array, which so far has been the case, but very weak, and
very poor execution by udevadm ram feature authors, sad to say.

* As far as we can tell, udevadm does not support:
udevadm info -p /devices/virtual/dmi/id
option until somewhere between v245 (no support) and v249 (supported). This
means that some distros that ship a pre 249 version will not get user RAM data.
Known is Slackware 15.0 (but is in Current), TinyCore 14, and probably other
tiny distros. Many LTS type frozen pool distros will probably not support it.

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

1. SYSTEM: kernel gcc version: see FIXES 4a. While this is not a bug per se,
since who can predict when a distro will change format to /proc/version, users
might see it as one. This impacted various distros.

2. INFO: init detection for busybox /sbin/init hung forever on slitaz, now
works, and adds the busybox version as well. This was exposed by slitaz. Also
was showing sysvinit for TinyCore, the slitaz fix also fixed the failure to ID
BusyBox init on TC.

3. CORE: see Fix 7b, inxi used wrong path for its .d config locations, never
spotted it since I never use those, showed up in codeberg issue #295 when that
did not work.

4. GRAPHICS: EGL: see Fix 6b. Was missing one error message type, leading to
undefined value print error.

5. CPU: vascom in issue #297 reported an unset value error in disabled smt
cpu speeds, see CODE 8. This required a CPU debugger data upgrade to handle
more cleanly. It appears that a Perl behavior has changed, it was returning ''
for undefined read, now seems to be returning the correct undefined. Or could
be kernel that changed that, can't say, but creates buggy looking output with
Perl errors. No actual data bugs though.

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

1. DOWNLOADER: Small error in assignment could lead to onscreen error output.
Not worth a new release fix. Added to inxi master as 3.3.31-2.

2. SENSORS: corner case with undefined value where it's almost always defined
for load_sys_data(). Shows undefined on screen output. Never seen this until
today, but that's how it goes. Also added to inxi master as 3.3.31-2.

3a. PARTITIONS: added possible filter path: /dev/(block/)?loop[0-9]+, saw that
on Android.

3b. PARTITIONS: added vboxsf, not a typo, that's a client mounted host fs for
vbox, works like nfs/smb re filters etc. Never seen that one before, probably
because I almost never use the host > guest shared folder feature of vbox.

4a. SYSTEM: CompilerData: kernel gcc version: found _more_ syntaxes for the gcc
string in /proc/version. The randomness of this string generation forced a redo
of the regex, which should now catch almost any gcc/clang version number no
matter how weird the syntax is. The new regex is much looser and handles all
known variants.

4b. SYSTEM: DesktopData:

* Fixed broken fvwm-crystal ID, that one is tricky, and it got broken by
accident a while back.

* Fixed broken echinus hackedbox mvwm detections, had neglected to add those in
PsData::set_gui() for some weird reason. Also had forgotten to add some of those
to ProgramData::set_values(). Also note that TinyCore ships with hacked box, but
their -version is broken, shows v: 2001 because they forgot to add in the actual
version in the string. Forgetting to update all the locations of those string
lists was a big reason that the ps handler was fully refactored, and all uses of
its data, too hard to maintain when having to update in multiple locations the
same value.

* Fixed broken KDE 4 version, qt data. That has been broken for a while.

* Fixed corner case where wm is detected, and is the same as de/wm parent, and
is rejected, but then since wm is not populated, it runs wmctrl anyway, which
can result in wrong results, like showing wm: wlroots wm [a generic term] for
Hyprland wayland wm.

* Fixed broken Muffin (Cinnamon wm) detection.

* Added tk: GTK for Budgie, Pantheon. Added tk: Qt for lxqt variants. These
often worked before, but now are more robust.

* Fixed bad JWM wm version, was using --version, -v is right.

* Fixed xfwm, was not showing xfwm4 etc, just xfwm.

* Fixed spectrwm version detection, the old verbose string was simplified to:
spectrwm x.y.z Build: a.b.c. Used filter method to dump the old verbose part.

5. RECOMMENDS: wrong package name for pacman eglinfo, glxinfo.

6a. GRAPHICS: gl_data():

* fixed use of undefined $platform, missed some, those can and did spew out
errors in some cases due to trying to use undefined hash key name.

* fixed case where EGL version was not fully numeric: 1.4 (DRI2)

6b. GRAPHICS: API data: see Bug 4. Was missing one api data error message type.
This led to output of undefined value print errors. The real cause however was
inconsistent naming of the gfx api message types, which is the main fix, along
with adding the missing one. Now they all match and are easy to scan. Making
things consistent internally has been a main goal of the 3.3.32 release.

7a. CORE: See CODE 7b, fixed corner cases ps failures for older or more stripped
down busybox ps. Now should handle all cases automatically.

7b. CORE: Configs::set() had the wrong paths for all the .d directories, making
those fail. Was missing the .conf part of the path, just showed inxi.d/. Oops.

7c. CORE: main::set_basics(): found case where $ENV{'HOME'} undefined, which
trips undefined concat errors. Attempt to set it manually with whoami and paths.

8. PROCESSES: Long standing error, probably imported from original bash inxi,
with -tm showed broken throttled message even though no throttling occured. This
only happened with -tm, not -tc or -tcm.

9. INFO: GCC versions: switched to ProgramData::full(). Fixed regex to allow the
primary version number (12.2,9,4.8, etc)) for alt, we don't care about sub-sub
versions there, but we do care about sub versions. Sort numeric for results,
which corrects the odd order created by alpha sorts before. Fixed broken filter
to exclude default gcc version from alt list.

This fix also exposed alt gcc version detection failure on FreeBSD, different
path, and different executable name syntax (/usr/bin/gcc-9 vs
/usr/local/bin/gcc9 as well as an odd legacy numbering format for 4.8, 4.9
(gcc48,gcc49).

10. MACHINE: Fixed some BSD sysctl machine field name assignments that may have
resulted in those fields never showing in output. Added some conditional tests
as well. Also fixed and normalized some dmidecode mobo/chassis field names.

11a. RAM: In some cases, module locator is only DIMM 1, without the channel. If
Channel [A-Z]] is found in branch locator, prepend that to DIMM X to make actual
location more obvious.

11b. RAM: In cases of > 1 RAM array, failed to reset the slots active counter
in each array. This led to silly looking active slots totals for the arrays.

12. REPOS/INFO: PackageData for cases where distro uses a package manager non
natively, like AltLinux with apt-get, but no dpkg, so can't get package counts.
Now detects pm and uses right command to get package list and show tools.

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

1a. SYSTEM: DistroData:

* Adding initial support for Ubuntu internal spins, like Kubuntu, Lubuntu,
Xubuntu. Shows project name for distro, and adds base: Ubuntu for -Sx.

* Forcing os-release use for Fedora, that captures spins like Onyx
automatically. Was using redhat-release, which had the Fedora version string,
but best to use os-release explicitly. Too bad we can't default everything to
use os-release, but that's not reality.

* Added in Fedora system base for variety of Fedora based distros. This corrects
many from IDing as RHEL 39 etc, now shows Fedora. As with all derived distros,
these ids are not all tested, but often work. Confirmed: Nobara, risiOS,
Ultramarine. Not all are identifiable.

* Added Devuan system base distros: crowz, dowse, etertics, exe, fluxuan,
gnuinos gobmis, heads, miyo, refracta, star, virage. This should in many cases
automatically cover the specific derived distro ID as well since those usually
are in the 'PRETTY_NAME' field of /etc/os-release. Not exe, not star, I believe.

* Added in Debian/Devuan system base support for Peppermint, that requires
custom rule since the base can be either. Selection based on presence/absence of
/etc/devuan_version.

* Added special distro id where distro id is from distro-version file, but ID is
only numeric. Slitaz does this for example. Takes file, slices off
{-version,release}, then concatenates the distro name and number. This is
uncommon, but should anyone else do it that way, easy to add now.

1b. SYSTEM: DesktopData:

* Added screensaver/locker (tools:) to -Sxxx/-Sa. -Sxxx shows running tools, and
-Sa adds avail: for any installed, but not running. That's because many of these
tools are not daemons, but are triggered by a daemon.

* Added wm dawn, dusk. Those are dwm forks so assuming -v works the same for
version (to stderr). Added wms w9wm, x9wm - assuming -version info same as for
9wm, which is what they were forked from I believe.

* Added CDE and dtwm, because, well, why not? No version for either. And NsCDE,
which uses FVWM2 for wm.

* Added Draco (a Lumina spin) support.

* For -a and KDE, added advanced data info: frameworks v: x.y.z. Other desktops
with comparable and detectable advanced data will be added as we find them. Note
that this repurposed the previous use of the info: field name, which is now
with:.

* For qtile, spectrwm, and maybe others, they give wmctrl a false wm id, for
some reason, now inxi gets rid of that since it's a fictional result, done
deliberately, but is not the wm.

* Item: info: added more bars, panels, menus, launchers.

* Added --dbg 63 user debugger so we can track down how de/wm/tk detections
happen, their data sources, etc. See CODE 4c. Much easier to say add --dbg 63
than to say all the stuff to echo etc. antiX testers showed how useful this
could be right away, as did dev vm testing for de/wm.

* Added ELF toolkit data (Enlightenment, Moksha). The elf-version tool is not
always there, but if it is, tk is easy to get.

1c. SYSTEM/GRAPHICS: Added bismuth, maynard, orbment, polonium, swayfs
compositors.

1d. SYSTEM: DmData:

* Added lm: (login mamager) type fallback, if no dm detected. Added seatd,
elogind, greetd to the fallback lm. Some of those were in the main dm block
before, but now they are detected as login managers in case where no dm was
detected. This handles de, wm, wayland compositors using seatd, elogind, etc.

* Added lemurs display manager. Not verified, don't know if --version info.

2a. GRAPHICS: tentatively trying for Android Surfaceflinger, and other display
data.

2b. GRAPHICS: a long standing weakness, fuzzy mapping of X.org port IDs to
DRM port IDs may be finally resulved, assuming xrandr --prop and drm device in
/sys. Now matching connector_id to CONNECTOR_ID, which is an absolute match
using an integer value ID. This now precedes all other mapping tests in the
port ID mapper.

2c. GRAPHICS: added support for all known tiny X display servers:

Xchips Xfbdev Xi810 Xigs Xipaq Xmach64 Xmga Xmodesetting Xneomagic Xsavage
Xsis530 Xtrident Xtrio Xts300 Xvesa

I had no idea anything other than Xvesa existed, but apparently there's a bunch!
Found this when testing TinyCore Pure64, which uses Xfbdev. I did not know that
Xvesa only supports 32 bit either. This was exposed when testing on TinyCore
Pure64.

Also changed to dynamic detection using ps data, which then allows for sometimes
getting the screen resolution as well from ps for TinyX servers. Also avoids
cases where > 1 were installed but only 1 is running, of course.

2d. GRAPHICS: Xfbdev may expose the virtual_size of screen assuming
/sys/devices/platform/*/graphics/*/virtual_size exists.
In test system, that's:
/sys/devices/platform/vesa-framebuffer.0/graphics/fb0/virtual_size

This allows showing resolution for at least Xfbdev TinyX systems, like TinyCore
Pure64. No idea if this is a general thing or I just happened to find a case
where it works.

This goes along with adding the resolution from ps start string if present.

2e. GRAPHICS: gfx vendor ID updates: AMD, Intel, Nvidia. This finally saw more
IDs generated for their latest generation gpus, which had been sparse before.

3a. INFO/REPOS: PackageData: added pm tools:

* pacman: added baph, pacseek.

* deb/apt: added muon.

3b. INFO/REPOS: PackageData/RepoItem: added tazpkg (slitaz pm).

3a. INFO: Power: added to wakeups, and created Power: type that turns on with
-Ixxx:
* uptime
* states - suspend/hibernate types supported
* suspend: active type
  * other available types [-Ia]
  * wakeups
* hibernate: active type
  * other available types [-Ia]
  * hibernate image size [-Ia]

-Ia: Adds Power daemons running.

This closes issue #292 for adding power state report.

3b. INFO: Compiler: added tentative support for zigcc. Also extended to support
clang alt versions, along with BSD alt paths for clang, gcc alt locations. This
adds support also for BSD type /usr/local/bin alt gcc/clang paths, so that data
will suddenly appear for the inxi BSD users out there.

4. VERSION: Along with deprecating -V, added --vf (--version shortcut), which
goes along with --vs / --version-short to maybe easier to remember?

5. WEATHER: Added --wu as short-cut for --weather-unit, no idea why that wasn't
done already.

6. REPOS: Added tazpkg (slitaz).

7. CORE: Added /usr/etc, /usr/etc/inxi.conf.d, /usr/local/etc,
/usr/local/etc/inxi.conf.d as possible default paths for inxi.conf files.
Apparently IBM-Redhat is pushing for that change, which will ship first in
Fedora. Also, the /usr/local/etc paths would let BSDs, that use /usr/local for
non core, to put the inxi config in there instead, if they wanted. Though as far
as I know, none of the BSDs is actively packaging inxi.

8a. MACHINE: For -Mxx, show board part number (part-nu) if available. This
usually comes from /sys product_sku or SKU Number in dmidecode, but can be
sourced on other systems from different data sources.

8b. MACHINE: Add (if detectable, bad data sources) device type for Elbrus.

8c. MACHINE: Show board UUID with -Mxxx, if available. Filtered with --zu.

9a. RAM: Added udevadm as possible non root RAM array/module data source.

9b. RAM: Added for case of > 1 RAM system board array a Report: line for totals
of arrays, capacity, used capacity, slots, used slots, eec, module type.

10. CPU: more CPU microarch CPUID product IDs, for some future cpus as well.

11. RECOMMENDS: Added wayland-info to display recommends now that it finally hit
the repos.

12. DRIVES: More disk vendors, new ID matches! Yes, it never ends, like the Way,
like a river flowing from the mountains, like the sun and the moon...

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

1. DOCS: data/audio: renamed and removed some stray gz files.

2a. INFO: split into up to 3 separate primary lines, Memory, Power/Process/Init,
Packages, depending on verbosity levels. This really cleans up something that
has gotten increasingly messy and random over the years as features were added.

2b. INFO: -Ixx triggers wakeups, instead of -Ixxx. Also, -Ixx triggers the
parent Power: item that contains uptime:, wakeups:, and all the other power
items from -Ixx and higher verbosity levels.

2c. INFO: Compilers: changed order of detected compilers to be alphabetic
(clang, gcc, zigcc), now that zigcc added might as well make it not gcc-centric
as in past.

3a. OPTIONS: -W/--weather-location are removed, and location is merged into -w
[location], thus freeing up a redundant use of a primary single letter for a
feature. Also, upper case letters were supposed to be used mainly for core,
unique, features, not just a secondary feature of a secondary feature. Lower
case only is what should have been used, like with -s. I am guessing that in
inxi bash/gawk, I could not handle optional args, and thus had to use
lower/upper, one for no arg, one for arg.

3b. OPTIONS: -V is deprecated, and will show message. --vf/--version will
activate full version info, along with --vs/--version-short for the 1 liner
special short version.

Also done to reclaim an upper case primary letter. If nobody complains, will
remove -V next release, if someone complains, will keep -V / --version and
remove deprecation message.

-V is removed from help/man however so new users won't guess to use it, meaning
eventually we can get rid of that -V and free it for better use.

3c. OPTIONS: --gpu, --nvidia, --nv are removed. Those were replaced by -Ga a
while ago. They were only temporary options used when the feature was first
created, when it was not sure to remain.

4a. SYSTEM: Display Manager (dm:) now is dynamically assigned, in cases where no
dm but a login/seat manager like seatd, elogind running, which is more common
with Wayland starts, now shows lm: (login manager) instead if one was found.
Goes with CODE 3c refactor.

4b. SYSTEM: changed Desktop info: to with: (for bars, docks, menu, panels,
trays), which is more accurate, and switched info: to advanced de data, like KDE
frameworks.

4c. SYSTEM: changed output order, put wm: after de tk: info: and before with:.
This turns it into a sentence: DE: + tk: + info: + wm: + with: + tools: + dm/lm:

5. CORE: Configs::set() had wrong paths testing for config files, missing the
.conf in inxi.conf.d. The old version was an accident. Just on off chance anyone
actually used the wrong path, leaving those in the config path tests, but
removed from man/options etc.

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

1a. DOCS: docs/inxi-graphics.txt: added ANDROID DATA, following some new
information and research re Android display/compositors. Also refactored the doc
file, and added more and better navigation and organization, particularly for
DISPLAY SERVER DATA and MONITOR DATA. Moved COMPOSiTOR DATA to
inxi-desktop-wms.txt.

1b. DOCS: docs/inxi-distros.txt: updated for more distros and system base info.

1c. DOCS: docs/inxi-power.txt: power state, screensaver/locker data.

1d. DOCS: docs/inxi-tools-mapping.txt: added POWER section for screensaver/
lockers.

1e. DOCS: docs/inxi-values.txt: reorganized, improved navigation and
organization. Ongoing updates to values for new features and debuggers.

1f. DOCS: docs/inxi-init.txt: added BusyBox init, updated Upstart with warnings
about pre-tests required.

1g. DOCS: docs/inxi-desktop-wm.txt: These upgrades were done in conjunction with
the related refactors, particularly of PsData and ProgramData.

*added DISPLAY/LOGIN MANAGERS section, and documented all the dm/lm used. This
goes with refactor into DmData of CODE 3c.

* Added COMPOSITOR DATA (moved from inxi-graphics.txt) to make easier to match
up wm/compositor data.

* Added DESKTOP/WM INFO TOOLS itemized bars, docks, launchers, panels, menus,
trays.

2. DATA: data/audio: added huge collection of audio datasets from mrmazda.
Thanks!

3a. MAN/OPTIONS: Updates for power data for -Sxxx/-Sa, -Ixx/-Ixxx/-Ia.

3b. MAN/OPTIONS: Removed references to -V, -W options, merged -W with -w.

3c. MAN/OPTIONS:  Edits, fixes, proofreading corrections of issues that have
crept in over time.

3d. MAN/OPTIONS: Removed --gpu, --nvidia, --nv, which were merged into -Ga a
while ago.

3e. MAN/OPTIONS: Changed gcc specific compiler to compiler generics, since now
the old gcc\-centric compiler data supports clang alt versions, and zigcc.

3f. MAN/OPTIONS: Updated -m for new udevadm DMI RAM data source.

4. OPTIONS: Fixed some indentation errors.

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

1. Fixes 1, 2 were both due to some undefined values being improperly handled. 2
was odd because it's literally never shown up before (using regex on undefined
hash key), but it was a mistake in 3.3.31, just a Perl language thing that
didn't do what I thought it would do..

2a. GRAPHICS: xrandr_data(): switched to direct qx() for xrandr data, this
allows checking for error return, which allows using --prop, which was not
supported until xrandr 1.2 (~2009). Debian Etch had 1.1, for example. Also
switched to array data since it's local to function. This is to get
connector-id.

2b. GRAPHICS: map_monitor_ids() now first tries to map via connector ID, and
only falls back to the less reliable mapper tests if a match failed.

2c. GRAPHICS: abstracted away from Xvesa only tests to TinyX X server tests.
Note that so far only Xvesa appears to have an API via -list command.

2d. GRAPHICS: failed to set empty array ref to $x_drivers when --force wayland
is used, which made the @$x_drivers tests fail. Only devs would ever see this.

3a. SYSTEM: DistroData: made debian_id() also support devuan ID via switch.
Added redundancy testers for os_release codename append as well, using same
logic. This refactor also removed some tests that would never have been true.

3b. SYSTEM: main::get_display_manager(), had a silly error with creating
globbing pattern that could have made it fail in the case, > 1 directories used
to glob; refactored get_display_manager into DmData, which now also handles
Display Managers and Login Managers, like greetd, seatd, elogind.

3c. SYSTEM: DesktopData:
* Changed DesktopEnvironment to DesktopData, to be more consistent.

* Reordered, renamed subs, organized entire package to be more maintainable and
consistent with newer inxi style.

* DesktopData::wm_ps_xprop_data(). Reversed order, first now does ps tests, then
xprop, was getting false detections for blackbox.

* DesktopData::de_wm_debugger(). See 4c.

* DesktopData: improved methods for getting gtk/qt desktop data, using new
ProgramData::full version data return coupled with item_from_version(), avoids
extra subshells to get the same data we already collected, but threw away.

* DesktoppData::item_from_version(). Works with new ProgramData::full() option to get
full version data ref returned, this avoids making multiple subshell calls to
get two bits of data from same thing. Used for GTK and Qt data currently.

* DesktoppData::set_xprop(): Fully refactored all xprop data to be more
maintainable and clean.

3d. SYSTEM: changed CompilerVersion which is for kernel compiler to the more
obvious KernelCompiler, then moved it with the other kernel data tools.

4a. DEBUGGING: SystemDebugger:

* display_data(): added in xrandr --prop/--verbose to match upgraded xrandr data
parsing.

* system_data(): added fruid_print, udevadm commands.

* system_files(): added/proc/bootdata.

4b. DEBUGGING: added @dbg switches:

* --dbg 58: $power data.

* --dbg 59: $desktop data array (long overdue, no idea why that was left off).

* --dbg 60: display_mamager $found].

* --dbg 61: PsData::set_cmd(), print out @ps_cmd result working ps data.

* --dbg 62: $compilers main::get_compiler_data().

* --dbg 63: DesktopData::de_wm_debugger() for ps wm/comp/de output, and for
DesktopData step by step results, so we know what detected what and how.

* --dbg 64: ProgramData::version() print out full version data block.

5. ERROR HANDLER: Added option-deprecated, option-removed items, for -V, -W,
--gpu/--nvidia/--nv type change/remove scenario.

6a. CORE: fixed two stray redeclares of $start in OpticalItem::get() and
RepoItem::get() which Perl 5.008.0 correctly notes is redeclaring it, but for
some reason all newer Perl's accept. Funny things that show up testing on
ancient systems, in this case, I'd say the original Perl was right and the new
one is allowing something to happen it should not. Also changed $start in
PartitionItem::set_filters to $begin to avoid that pussible clash.

6b. CORE: Added filter type to main::filter, that way it can be used for other
filters, like filter-uuid for non partitions.

6c. CORE: Full ps logic refactor: PsData package created, merged in old
set_ps_aux, set_ps_gui and changed them to methods set_cmd and set_de_wm.
Refactored set_cmd to be much more robust and handle busybox automatically.

* Changed global $load{'ps-aux'} to $load{'ps-cmd'} which makes more sense since
that is what it was loading.

* Old busybox failed if you supplied it with standard ps args, but new busybox
accepts and ignores them. Now inxi checks if busybox ps, then dumps the args,
and sets a busybox switch to allow for more ps data for busybox ps, which will
be used to detect TinyX screen dimensions.

* Got rid of global $b_busybox_ps and test for that, it is not used anymore.
Added switch for busybox to use more columns of ps to try to trap -screen
resolution for TinyX servers. Only some show that in ps.

* Optimized subsequent uses of @ps_cmd by dumping stuff inxi will never need,
like browsers, various servers, etc. Also run uniq() on result since we only
nned one instance of each command for subsequent tests.

* Switched to using full %ps_data, including for header position counts, which
helps make much more robust odd ps types that might have CPU or RSS or MEM
but not in the expected order, or incomplete. Before relied on hoping it would
work and be consistent, which is not the case for BusyBox ps. Now all the hard
coded indexes are dynamically set, using the header positions grabbed in
PsData::set_cmd(). Specific detections added: info-active, tools-active,
tools-test to avoid duplicating test arrays globally.

* Got rid of @ps_gui global, replaced fully with granular de/wm/comp $ps_data
hash arrays, which are then assembled as needed in each section, desktop and
compositor, that might use them. This allowed, finally, for getting rid of all
those redundant wm/comp items, now the wm/comp/de ids are set in only one place,
PsData::set_gui(). This had been a long standing problem because I would forget
to update one set of wm/comp, and had to do loops over and over when all that is
required now is the initial searches through @ps_cmd, which is also much
shorter, containing only the stuff inxi will need to check.

Now to add a detection, wm, comp, tool, info, dm item, just need to add it in
one place, ps_gui, and there are also no repetitions in there, which there were
before. I expect this will make it much easier and less error prone to add new
items to the various lists.

* Added PsData::set_dm() to handle fallback dm detection, when none found in
/run type directories. Only fires when nothing else found.

* Added PsData::set_power() to handle power daemon detections.

* Added --dbg 61 to print out @ps_cmd in output section, where it's also logged.
Leaving it out was an oversight.

6d. CORE: Program data refactor into package: ProgramData

* Converted program_{data,values,version} and related subs into package
ProgramData with public methods full(), values(), version().

* Moved the entire package code block into the Items Data generator section.

* Moved more program version that used hardcoded values in the caller to use
full() and set_values() data instead, wherever practical.

* Made version() use array refs from start to finish, and dumped the old method
of using open on the text block from file or program version command result. Not
clear why I ever did it that way, probably I did not understand refs when that
was originally translated.

* Added version data array ref return option, useful to avoid having to make
double calls when getting stuff like toolkit version. Used for example in
DesktopData::item_from_version().

6e. CORE: Corrected paths for development fake data files, I'd forgotten to use
$fake_data_dir global in many places, now all fake data paths use that single
source, which can be changed using config or --fake-data-dir option.

6f. CORE: main::grabber(): made sure all commands for this include the proper
redirect, usually 2>/dev/null, several were missing that, which could in theory
have led to visible error output on the screen.

7a. INFO: InitData: got rid of redundant readlink /sbin/init, that's now read
at first to $link, which is then what is tested in all following tests.

7b. INFO: Refactored get_gcc_data() into get_compiler_data, which now supports
gcc and clang to do FIX 9. Cleaned up, switched to ProgramData::full(), fixed
weak globbing pattern, fixed broken compiler alt version exclude default
installed compiler version.

8a. CPU: Refactored, now all cpu fake data files are set in
CpuItem::set_fake_data(), makes it easier to manage.

8b. CPU: a change in either kernel /sys or Perl made Perl return udefined value
where before it returned '' in cpuinfo data() (now cpuinfo_speed_sys()) speeds.

8c. CPU: split out cpuinfo_speed_sys() from cpuinfo_data().

9a. RAM: refactored dmidecode_data module data into separate functions so they
can be used by udevadm_data_process as well. Made process_locator,
process_manufacturer.

9b. RAM: refactored the speed logic, now uses raw numeric plus units, so they
can be worked with then reassembled more readily.

9c. RAM: refactored speed_mapper, BSD matching table, to avoid loading entire
mapping table each time. Brings logic closer to Linux logic.

9d. RAM: refactored ram_output, split out arrays_output, which now handles
--memory-short/--ms, and case of > 1 array detected, same format for both.
2024-01-30 18:56:45 -08:00
Harald Hope
33a1d1ddbc A small point release, mainly for fixes and bugs, plus a few minor matching
table updates. Also some core tools updates, which make supporting gpu devices
easier over time, particularly nvidia ones. Also some gpu data updates, new
nvidia 545, which was unexpected, came out, extending the time to next legacy by
some months.

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

1. GRAPHICS: GPU DATA: codeberg user malcolmlewis who also posted both the first
pinxi issue, and the first codeberg issue. I had not thought nvidia would forget
to add their own device IDs to their lists, but they did. This prompted an
upgrade to the gpu_raw.pl/gpu_ids.pl to better handle manual add files for
Nvidia, as well as better overall consistency for gpu data files and processing.

2. SYSTEM: Wakeups: Mint user senjoz for alerting me to the well done but
unfortunately localized to mint forums report on the wrong wakeup count report,
because the data source was not what I thought it was.

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

1. Any distro forum person who finds issues related to inxi maybe being wrong or
operating from false assumptions in terms of data sources should ideally find a
way to report these issues directly, either via a codeberg issue, an email, or
something else. It's not possible or practical to track every forum that uses
inxi to debug user issues, so if members of those forums can be more proactive
in terms of sending what appear to be valid issue reports to the inxi project,
that will help a lot.

2. GRAPHICS: GPU: no data for things like Biren and other non AMD/Intel/Nvidia
GPUs. If you are into GPUs, by all means, help us out here!

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

1. INFO: main::get_wakeups(): I'd say that despite in the past largely being
correct, using /sys/power/wakeup_count is a bug, but a bug that is excusable
because the docs are just too opaque about what this thing actually refers to.
My assumption re its meaning was clearly wrong.

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

1. INFO: main::get_wakeups(): Issue reported via a Mint forum posting which I
was alerted to.

https://forums.linuxmint.com/viewtopic.php?p=2378107#p2378107

This would have made it into inxi 3.3.30 easily since the patch is changing file
name, but I unfortunetly did not become aware of it until right after the
release, On my system, for example, with systemctl suspend instead of the not
working xfce suspend from gui, I get 7 wakeup_count type events counted for each
suspend event. On another system I have, almost same everything, except fully
functioning xfce suspend feature, the success and wakeup_counts are matched.

I found a value of 49000+ digging through my datasets, and I can find no
pattern, nor can I find this clearly documented, so the behavior is simply going
to be use the value, including 0, from /sys/power/suspend_stats/success and
using it if it is defined, and getting rid of /sys/power/wakeup_count completely
as a data source, which I am now no longer sure at all about the meaning of. 1
of my systems has 7 events per resume, one, almost the same setup, has 1.

2. GRAPHICS: GPU DATA: Many nvidia fixes, device ID lists updated and corrected.

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

1a. PARTITIONS: added puzzlefs, atomfs to excludes. It's unclear, but both sound
like they are like isofs or something like that.

2a. GRAPHICS: GPU DATA: added Nvidia Pascal, Hopper, Lovelace device IDs. See
Code 1 for fixes to detections. Added AMD, Intel newer GPU IDs, going with Code
1 and GPU data fixes.

2b. GRAPHICS: GPU DATA: updated lists, added Nvidia current EOL data, added
newer kernel/X.org last supported. Added two more memssage types for current,
legacy messages. Found a site that lists EOL for the drivers, that helps.

2c. GRAPHCIS: GPU_DATA: added new 545 driver IDs, updated nv current to 545

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

1. DATA: pinxi/tools/lists: made file names consistent for gpu data types.

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

1. DOCS: docs/inxi-graphics.txt, docs/inxi-partitions.txt - ongoing updates for
features. More GPU data added, new file system types.

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

1a. GRAPHICS: GPU DATA: pinxi/tools/gpu_raw.pl, pinxi/tools/gpu_ids.pl. Upgraded
to enable basic manual additions to nvidia drivers. Also fixed detections for
Hopper and Lovelace, those were too tight and I missed some device IDs there.

Redid tools/gpu_raw.pl and gpu_ids.pl to have the more predictable file names.

Also changed the file names to be consistent for nv data in pinxi/tools/lists/
  gpu.[amd|intel].full
  gpu.[amd|intel].full.sorted
  gpu.[amd|intel].manual
  gpu.amd.github
  gpu.intel.com
  gpu.nv.[driver].full
  gpu.nv.[driver].full.sorted
  gpu.nv.[driver].manual
  gpu.nv.[driver].raw

This let me bring all the lists up to date, and some manual fixes added in to
some driver sets.

1b. GRAPHICS: GPU_DATA: pinxi/tools/gpu_ids.pl - updated for Nvidia: new
messages, current eol, filled out legacy drivers with their eol based on last
nvidia driver release date.

2. CORE: there were some pointless globals being used, as part of the overall
effort to get rid of globals where sensible, else move them into hashes/arrays,
makes code easier to maintain long term.
2023-10-31 15:37:14 -07:00
Harald Hope
cb15f8d88a PACKAGERS! inxi repos are moved to https://codeberg.org/smxi/inxi
The repos will mirror to github for a short amount of time, until after 3.3.30
is released, then I am probably going to do some big changes in the structure of
the inxi repo. Make sure to update your packaging tools and scripts for this
change.

--------------------------------------------------------------------------------

Finally, a huge upgrade for Wayland future proofing, and other futures that are
maybe coming, by adding EGL API, and Vulkan for good measure. This should handle
wayland finally, that's been a stub forever, but finally realized eglinfo was a
thing, and that vulkan as well could be a contender to replace OpenGL, at least
that's what Mesa says on their site, and they should know.

This handles one of the longest standing weak points of inxi graphics, being
completely X11-centric, even though wayland support exists fairly extensively,
but this glxinfo dependent feature was a niggling annoyance, now it's fairly
ambivalent about which api tool you throw at it, the hardest is to give the
right message for no data, or incomplete data. Note that eglinfo supplies at
least software rendering out of X11 or Wayland, so we can now get some API data
in console, including if supported, OpenGL data. Not all of it, but some of it.

Also since now all the docs are split and granular, with the Graphics API
upgrades, added data sample files from glxinfo, eglinfo, vulkaninfo, and vainfo
for good measure, just to have some of the latter. This is one of the first time
all the data used to develope a feature, docs for that feature, and the feature
itself, are being shared and released at the same time.

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

1a. GRAPHICS: API: Arch user Chrome30 on github for requesting vulkan data, and
providing the initial datasamples that made it possible to think about this new
API feature.

1b. CheckRecommends: Display packages: mrmazda, a frequent helper, checked and
updated OpenSUSE and Fedora vulkan/egl/glx API tool package names. Those have
been a bit fluid and many of the names I had were not right.

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

1a. GRAPHICS: nothing is perfect, for sudo/root the detections fail for OpenGL
API messages, but fallbacks will make it a bit nicer than it was, with some
data, instead of none as before.

1b. GRAPHICS: API: I'm assuming that the greatest EGL version number found is
the actual version, and lower versions are what that platform supports. This is
an assumption, not a known fact, but finding this stuff clearly documented tends
towards near impossibility, or takes forever to determine, so that's the
assumption that is being used. Correct via issue and clear explanation with
links to resources if this is incorrect.

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

1. Nothing to speak of.

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

1. PARTITIONS: had wekafs as a zfs type fs, it's not, it's more like NAS, cloud.
Added to distributed list, and removed from zfs|btrfs|hammer list. I know, I
know, will it ever matter? Probably not. But just in case, wouldn't want your
local machine to report with petabytes of storage now would we!

2. CheckRecommends: corrected some Fedora, SUSE package names.

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

1a. SYSTEM: DistroData: added Bodhi id method, /etc/bodhi/info file which is
similar to /etc/lsb_release, updated system base detection as well. System base
comes from /etc/os-release.

1b. SYSTEM: DistroData: Added Nitrux system base (debian). Why they try hide
this is beyond me. Maybe because they are not using a real PM, and don't include
apt, who knows.

2a. GRAPHICS: new nvidia gpu ids.

2b. Graphics: EGL API data:
* Shows eglinfo missing if appropriate, no data messages if appropriate.
* -G shows EGL version(s), drivers, active platforms.
* -Gx adds active/inactive platforms as sub items of platforms.
* -Gxx shows platforms by platform, with egl version, driver. EGL version only
shows if there were more than 1 detected, otherwise it shows with EGL v:
* -Gxxx shows hw based on driver, if found, like vulkan.

To avoid excess verbosity, does not show renderer OpenGL name per platform
because it would be way too long and repetetive. And besides, that would show
in OpenGL anyway, more or less, unless there are two different GPUs, which is a
case that is not fully handled.

2c. GRAPHICS: OpenGL data:
* If glxinfo not present, or with null output due to root/no display, and if
eglinfo available, and has OpenGL items, will populate most of OpenGL API with
data, except for Direct Rendering and GLX version. Shows appropriate messages
indicating it's EGL sourced for console, root, no data, or glxinfo missing.
* -Gx adds GLX version, if detected.
* -Gxx add: ES version, if detected; device-ID, if available. Also adds
display-ID, if Display-ID was not found in the Display line (which probably
means that xdpyinfo or xrandr were not installed). Does not always show since it
already appeared in Display line if it was discovered.
* -Ga adds device memory, and unified memory status (yes/no).

2d. GRAPHICS: Vulkan API data:
* Shows appropriate messages if vulkaninfo present, but no data found.
* -G shows Vulkan version, drivers, and surfaces.
* -Gx device counts.
* -Gxx adds device by id, type, driver report.
* -Gxxx adds layer count; adds device hardware vendor, based on mesa driver. Not
for nvidia driver, since that is self evident. Goes away with -Ga if device name
exists.
* -Ga adds full device report, including per device names, ids, drivers, driver
versions, surfaces.

3. UPDATE: Because the smxi.org server no longer accepts TSL 1.1 based HTTP
requests, added for extreme legacy systems a new update option, -U 4, which
uses direct FTP download from smxi.org ftp server. If system set to default to
perl downloader HTTP::Tiny it switches to using a non perl downloader
automatically, like wget or curl.

4. CPU: Microarch: got early zen5 possible IDs. Both Intel/AMD may have rough
ID working well before they ship in public. CPU stuff has slowed down a lot,
the 4,3n nodes are not easy, obviously.

5. DRIVES: Many more drive vendors and drive IDs.

6. RAM: More RAM vendors. Note that it's not unusual for a Drive vendor to also
make RAM, and vice versa.

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

1a. GRAPHICS: For API, show OpenGL mesa-v: x.x.x separate from main API v:
string. Also only shows the actual API version with v: now, like v: 4.5. Also
shows vendor: nvidia v: 340.23 for nvidia, without mesa. Falls back for
unhandled cases or syntaxes to the whole version string for v:.

1b. GRAPHICS: For OpenGL, shows compat-v: always if present, that was a mistake
not to show it unless -Gx, since otherwise you'd think you are running a
different version. Not a common situation, but on legacy hardware, can happen.

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

1a. DOCS: docs/inxi-cpu.txt - reorganized into more coherent sections, like with
like, etc. Added better top Sections navigation since there is so much data.

1b. DOCS: docs/inxi-resources.txt - moved last code tricks to
docs/tips-tricks.txt.

1c. DOCS: new docs/ files inxi-battery.txt, inxi-debuggers.txt,
inxi-devices.txt, inxi-kernel.txt, inxi-machine.txt, inxi-network.txt,
inxi-raid-logical.txt, inxi-start-client.txt, inxi-tty.txt, inxi-weather.

These new files cleaned out docs/inxi-data.txt and docs/inxi-resources.txt,
which are now merely placeholder files, and have no data in them beyond pointers
to the actual data files.

1d. DOCS: docs/inxi-custom-recommends.txt updated for SUSE/Fedora packag name
fixes and new eglinfo and vulkaninfo items.

2a. DATA: moved more data from non public data to shared. Refactored directories
to be better organized, and to follow the overall inxi data structures better.

2b. DATA: added many more eglinfo, glxinfo, vulkaninfo to data/graphics. Also
added some clinfo, vainfo just in case decide to support those APIs.

3a. MAN/OPTIONS: updated for new graphics API features, new verbsity features,
etc.

3b. MAN/OPTIONS: added -U arguments for man, for some reason I'd left those out.
Also removed options references to -U 1, 2, because those should never be used,
if those versions of inxi even exist, they are ancient. Added -U 4 option, and
explanation of when/why to use it.

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

1a. FAKE DATA: updated paths for fake data to reflect data reorganization.

1b. FAKE DATA: Added --fake egl,glx,vulkan for GRAPHICS API.

2. GRAPHICS: Fully refactored opengl_output, moved to gl_data/opengl_output.
Added egl_data, egl_output, and vulkan_data, vulkan_output, and some other
tools.

3. UPDATE: if downloader is set to 'perl', aka, Tiny::HTTP, and -U 4 is used,
which is a direct FTP download of the inxi/pinxi files, tiny is disabled, and
the next available downloader (wget/curl/fetch) is used instead.

4. DEBUGGER: added clinfo, eglinfo, es2_info, vainfo, vdpauinfo, vulkaninfo.
2023-09-25 15:11:51 -07:00
Harald Hope
71cfe887a3 Updated for change to codeberg.org from github, updated readme,
added a short term patch version so the master inxi has the right
urls in it.
2023-09-17 17:42:36 -07:00
Harald Hope
9cca058f5d Some significant bugs, 1 showstopper for FreeBSD, and one universal one for USB
network devices, and possibly some other USB device types. Also some nice new
features.

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

1. SYSTEM: Github user chromer030 in issue #285 - a very nice small enhancement
to -Sxxx line, adding kernel clocksource, and with -Sa, adding available
clocksources. I wish all issues were this clean and easy to implemment, with
such clear benefit.

2. BLUETOOTH: Github user chromer030, issue #286 - extending and adding
bluetooth report feature. This required refactors and some cleanup of bad logic
to make -E more able to handle new data sources, and also made me fix the docs
and add debugger data files to make testing changes for various bluetooth
datasources easier. Adding btmgmt turned out to have a lot of long term benefits
to the bluetooth feature and internal inxi logic, I hadn't realized how hacked
on bluetooth feature was, but code review showed it clearly.

3. SYSTEM: Github user oleg-indeez found a break in FreeBSD compiler data, 2
glitches, one made inxi crash due to is array test on undefined reference, the
other maybe a bad copy paste in the past that assigned compiler data to wrong
hash. See CODE 3 for details on the ref issue.

4. SWAP: Github user chromer030, again, issue #290 suggested some swap
zram/zswap data enhancements, seems good, so thanks.

5. UsbData: Slackware/Linuxquestions.org poster J_W for posting on a device
missing in his output as of 3.3.27 inxi. This exposed bug 3, which usually was
npt visible since the fallback was catching most of the network matches, but
since he had a TP-Link, and it went missing, it triggered the issues, and also
exposed the inconsistent upper/lower case use in device type from kernel.

6. NETWORK: Slackware user babydr on linuxquestions.org tripped a bug in
network, was not counting correctly to limit IP list. Led to showing limit
message on 10th row of network report, not 10th IP of a device. See Bug 4.

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

1. Nothing new.

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

1. BLUETOOTH: with hciconfig, would show wrong LMP/HCI version because either
the syntax changed for those strings, or it was wrong always. I think it changed
because this worked correctly at one point. Should now show the right hci/lmp
versions, and the bluetooth version as expected for hcicconfig/btmgmt.

2. SYSTEM: CPU compiler broke for FreeBSD 13.2, caused by bad test for undefined
array in CompilerVersion::version_bsd(), and also, assigned kernel compiler data
to %dboot instead of %sysctl hash. Thanks oleg-indeez for spotting that one and
figuring it out.

3a. UsbData: Failure to use /i caseinsensitive on regex led to failure to detect
USB type using standard defaults, but then a further regex error, subtle, missed
a | between two elements of a pattern, led to the last fallback case for network
detection failing. This was coupled with a change in the Kernel, which now uses
Uppercase first sometimes, and sometimes lowercase first. I think that's a
change anyway. This resulted in some usb type hashes failing to load specific
devices, network in this case, TP-Link, which was the fallback pattern that
broke.

3b. UsbData::assign_usb_type() improper nesting of tests led to failures that
should not have happened, like a bluetooth device cascading down to network.

4. NETWORK: IP limit was limiting based on total row count, not the actual count
of IPs for that device. Not sure how that slipped up. Now correctly limits the
IPs, not the previous total rows in Network report. Thanks babydr / Slackware
forums for finding yet more issues.

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

1a. BLUETOOTH: added in switches for fake bluetooth data for all bluetooth data
sources.

1b. BLUETOOTH: made --bt-tool load $force{[tool]} to be consistent with rest of
logic in inxi for forcing use of specific tools. No idea why I made a standalone
one only for Bluetooth.

1c. BLUETOOTH: the HCI/LMP version generators were mixing up bluetooth version
string and LMP, leading to wrong results. See BUGS 1. I think this was a syntax
change because I would not have generated this originally if the syntax had not
worked, at least I don't think I would have. See also DOCS DATA item, added in
samples for dev purposes to avoid this type of issue in future.

2. UsbData: Device type from /sys could be upper/lower case first, but inxi was
not testing for anything but lower case, which would lead to fallback tests for
Bluetooth, Network, at least, maybe others. This goes with BUG 3, which exposed
a small torrent of such potential failure cases. The fallback block of regex is
really only designed to catch the few that don't get caught by the generic type
tests.

3. NETWORK: UsbData::set_network_regex(). Bad regex caused bluetooth device:
"Intel Bluetooth wireless interface" to trip an overly loose regex for wireless.
See BUG 3b. The real issue was incorrect test nesting which led to a bluetooth
device falling down to network regex, which it should not have done. It also
failed test the product name for bluetooth, which led to failure as well.

4. SWAP: Was failing to capture some zram syntaxes, regex was too tight. Failed:
/run/initramfs/dev/zram0.

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

1. SYSTEM: added kernel current clocksource for -Sxxx, and alternates for -Sa.

2. BLUETOOTH: added btmgmt as first fallback to hciconfig, that one also
supplies bt version via lmp version, like hciconfig. Note this tool has very
little useful information.

3. Added back in discoverable, active discovery, and pairing status with -Ea.
This data is also crudely available from btmgmt but I would not bet on those
items actually being right. I'm not totally convinced that's good data, so
making it admin for now. Put these in a 'status:' parent container.

4a. SWAP: Added zswap enabled, compressor, max_pool_percent for -ja swap general
features line. If no zswap data and Linux, shows 'N/A'.
https://www.kernel.org/doc/Documentation/vm/zswap.txt

4b. SWAP: Added zram comp_algorithm max_comp_streams to -j per line report, only
for zram, of course.
https://docs.kernel.org/admin-guide/blockdev/zram.html

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

1. None that are obvious.

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

1. DATA: Added new data/bluetooth/, with several sample 'btmgmt info' and
'hciconfig -a' outputs for debugging and reference purposes. These work with
the revised debuggers and force/fake data switches for bluetooth. Should add
some bt-adapter --info samples too to make testing/debugging easier.

2a. DOCS: Made new docs/inxi-bluetooth.txt doc.

2b. DOCS: Moved more data out of inxi-data.txt and inxi-resources.txt, into
inxi-bluetooth.txt, tips-tricks.txt, man-pages.txt. While I'm not going to do it
all at once, I am trying to move relevant data into granular doc file as I hit
that during dev.

2c. DOCS: Updated and organized docs/inxi-tools-mapping.txt more, new mapping
tools added. inxi has so many manually updated mapping tools that it's going to
get more and more important that this document is accurate, and is updated when
required.

3a. MAN/OPTIONS: Added BT tools to --force lists, and updated --bt-tool list.
Also added -Ea options, the status: stuff.

3b. MAN/OPTIONS: Made consistent, lower case rpm, both PM type rpm and rpm as
rotation were switching between RPM and rpm randomly.

3b. MAN/OPTIONS: Updated for --force ip/ifconfig, --ifconfig.

3c. MAN/OPTIONS: Updated for zswap, zram extra -ja data.

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

1. BLUETOOTH: added %force bluetoothctrl, bt-adapter, btmgmt, hciconfig, rfkill,
and added checks to enable $fake{'bluetooth'} in the main callers for each type.
This makes debugging and development a lot easier. Also removed the force tool
block in CheckTools, no idea, again, why I did it that way only for bluetooth.

2. CheckTools: got rid of set_forced_tools(), which was only used for bluetooth
tools, and didn't fit with the rest of the core logic.

3. SYSTEM: CompilerVersion: used array refs wrong, or rather, used refs wrong,
which led to various errors that were confusing. Corrected to start out with an
array ref, then to pass that as is, leaving it the same ref all through, for bsd
and linux. This is the method inxi should have always used for passing array/
hash refs around, create as ref, then pass around, and update, without assigning
a new ref to it.

I had failed to verify that the same ref was being used through the sequence.
Unfortunately this error is probably very widespread in inxi, because no
consistent rule was created and enforced from the first lines of Perl.

4. UsbData: added source type to --dbg 6 output, and added --dbg 55 to output
the per type arrays.

5. NETWORK: IpData:: added --ifconfig/--force [ip|ifconfig], --fake ip-if to
allow for basic debugging for -n / -i IP data sources. Not super useful since so
much comes from /sys, but there was nothing there at all, which is weird for
networking.

6. SWAP: Changed to passing data using scalar references, not returning an
array of the items, and got rid of the copies in the swap_data_advanced() tool.
It's less readable, but incurs basically very little overhead, and with the new
function / method arg lists I'm using more now, it's clear what the references
are.

7. IpData: got rid of extra array copies for push, pointless.
2023-08-15 20:07:26 -07:00
Harald Hope
2434d89d0c New version, new man. Continuing the Memory info rollout started in 3.3.27.
--------------------------------------------------------------------------------
SPECIAL THANKS:

1. Thanks to linuxquestions.org Slackware forums for poking around a bit at the
new Memory total logic.

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

1a. MEMORY: The memory total: has to be synthesized in some cases, based on some
math and educated guessing. When these guesses fall outside of predetermined
ranges, inxi will show note: est. to let the user know the total was synthesized
and possibly incorrect. For detected virtual machines, inxi does not try to
synthesize the total because a VM can have any amount of RAM assigned.

If superuser, and -m used, shows the real total from dmidecode if any RAM was
found. Not all systems have DMI RAM data however, or have dmidecode installed.
Will fallback to sythetic method in that case, which is usually right.

1b. MEMORY: With the superuser /proc/iomem method, if on a VM and not using even
GiB sized RAM ollocation, and -M is not triggered (which usually lets inxi know
it's a VM), the total will get rounded up or down based on a set of rules. For
example, 2.5 GiB real would become 3 GiB. I don't see any solution to this,
either assume the /proc/iomem is right but needs rounding up, or assume the /sys
block counts are right, or remove the feature.

Shows note: est. in cases where the rounded total is greater than a dynamic
factor difference from the internal total amount.

2. GENERAL/GRAPHICS: The problem of users showing up, requesting a feature, then
not doing any work, research, supplying energy, interest, and dare I say,
passion - nothing, expecting 'someone else' to do the work for them, continues,
sadly, with the recent request for vulkan data for Graphics. This appears to be
a problem more with the modern generation of free software users, I don't
remember this type of attitude 20 years ago, but I did watch it as it started
getting more common. Demotivating to be honest, but maybe one day someone will
show up who actually cares enough to help get the features they want developed.

While I am leaving that up as a low priority feature request, I am not
personally interested in that feature, nor is anyone else I asked, and given how
much raw data there is, and how difficult it is to parse, I'll just leave it as
an existing issue which might get work in a few years time, or not, basically
will require someone showing up who actually actively cares.

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

1. DISK: total: used: report could have had wrong results for used:, like used
being > total: because the filter lists were missing some file systems for
exclusion. More of a fix than a bug, but users might see it as a bug.

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

1. INFO: get_gcc_data(): was showing same GCC version as main and alternate.
Failed to filter out the discovered primary, that is. This is because usually
name is gcc-11 but sometimes it's the whole version, like gcc-11.2.0, the full
version string. This is the case in Slackware for example.

2. SHORT: MEMORY: BSD: did not show '%' for memory used percent, just the
number.

3. DRIVES/PARTITIONS: PartitionItem::set_filters() added many more exclude
types, that will help avoid both creating wrong disk used totals, and also not
show label:/uuid: fields for filesystem types that don't have uuid/labels. There
were a lot missing: encrypted, distributed, stackable, remote. Should clean up
wrong disk used values in some cases.

4a. PARTITIONS: PartitionItem::set_filters(). Added a lot of file systems, many
fuse, distributed, stackable types.

4b. PARTITIONS: Extended remote file system ID by fs, and added fuse fs for
local mounts, like gvfs, mtp, ptp and many other variants, that's things like
mounting apple partition, android, iphone, archives, etc. This should correct an
entire class of source: ERR-102 outputs.

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

1. BATTERY: Added 'power' to battery report. That's the amount of watts its
using at that moment, so not super useful since it's running inxi at that
moment. But the data was there, so might as well show it. Only for -Bxx since it
will be so variable. Shows after the charge/condition item.

2. SYSTEM: DistroData: added Oracle id and system base. Added Springdale/PUIAS
system base support. Note, unusually, Eurolinux, ScientificLinux 'just worked'
re id and system base even though that had never been explicitly added. This is
because their os-release file contains 'centos' string.

3. SYSTEM: DistroData: Added ubuntu mantic minotaur to ubuntu id matching table.
This only really is used by Mint, but there you have it. Also added Debian 14
codename Forky.

4a. MEMORY: Add total RAM from one of following:

* /sys/devices/system/memory (if it's available). This directory has to be
compiled into kernel, so is not always present. This source has advantage of
being user readable. If out of set bounds, shows note: est. to let user know
it's an estimate.

* If superuser and /proc/iomme, gets the total from /proc/iomem using some
tricks and synthetic methods, which in general is pretty accurate, but when out
of the bounds set, shows note: est. to let user know results are only estimates.
This overrides /sys total.

* If -m and dmidecode data found, uses the real RAM module total. For Linux and
superuser. This overrides iomem and /sys totals.

4b. MEMORY: add iGPU RAM from /proc/iomem when detected. Requires sudo/root.

4c. MEMORY: using the real -m/RAM total for memory total when available, since
that is the actual value we want, not the estimated stuff from /proc/iomem or
/sys/devices/system.

5. RAM: added a long time oversight, lack of per array RAM installed size and
occupied slots (modules). Those are now part of the Array line for each set of
modules. Since total already shows in System RAM line above, the granular per
array installed size total only shows if > 1 array is present, ie, almost never.

6. DRIVES: disk vendors, added more matches and vendors. We'll know the world is
changing in a significant way when no new vendors appear for a while, but that's
unlikely in the near term.

7. CPU: cpu_arch(), a few new ids added.

8. GRAPHICS: new amd, intel, nvidia ids, updates to driver version etc.

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

1. SHORT: for Memory:, switched to using MiB/GiB/TiB, these numbers are just
getting too big to be readable. This is also dynamic, if both used and available
are the same unit, shows x/y [unit], otherwise shows x [unit]/y [unit].

2. MEMORY: changed gpu: to igpu: to avoid confusing it with standalone gpu.
Since only raspberry pi had gpu ram data before, almost nobody would have seen
this in general anyway.

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

1. MAN/OPTIONS: Updated for -Bxx, battery power now.

2. MAN: updated to better define where the System RAM: total:.. available etc
come from, and what they refer to. Also added explanation in -m section about
what the stuff is, and what the field names refer to.

2a. DOCS: docs/inxi-ram.txt added, and more info moved from inxi-data.txt and
inxi-resources.txt. Goal is to remove both those files and move all their data,
and any new data, into granular inxi-xxx.txt files. Also moved some RAM data
from inx-unit-handling.txt to inxi-ram.txt.

2b. DOCS: docs/inxi-unit-handling.txt: updated with more ram / memory units,
code, etc, to better fit with the concept of the inxi-unit-handling.txt doc.

2c. DOCS: docs/inxi-partitions.txt: updated, added more sources for partition
file system types, cleaned up, more useful as a reference now.

2d. DOCS: docs/inxi-distros.txt: NEW, merged data from inxi-data.txt,
inxi-resources.txt. Updated and added more info.

2e. DOCS: docs/inxi-tools-mapping.txt split off from inxi-tools.txt, makes it
easier to find the mapping functions and features, which are hard to remember.
Also updated and improved its usability. This is kind of a key document because
it's hard to remember all the mapping tools internally, and this also connects
those tools to their relevant granular inxi-xxx.txt docs. Not that it will help
get helpers for these tedious tasks, but one can always dream, can't one?

3. DATA: data/graphics/ added for first vulkaninfo output file.

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

1a. RAM: Fixed an irregularity, for RamItem, it used MiB as internal unit, this
was silly because inxi uses KiB everywhere else. This correction was relatively
easy to do, and allows the values to be used by other parts of inxi, like
MemoryData.

1b. RAM: Added return of ram total for memory.

2a. INFO/RAM/PROCESSES: When MEMORY active, now uses row reference to create the
fields. For INFO, now uses MemoryData::row() to generate the row fields instead
of doing the logic in the info line generator. This simplifies the processing
and allows for more granular control of output.

2b. INFO/RAM/PROCESSES: Added debugger switches --dbg 53 (show raw KiB/count
values for /sys/devices/system/memory and /proc/iomem. Added --dbg 54, which
shows per line size for iomem, in human readable units, and a final summary
report of iomem and /sys data, this speeds up debugging.

2c. INFO/RAM/PROCESSES: Added --fake iomem, --fake sys-mem for debugging and
testing.

3. MEMORY: MemoryData::short_data(): added so one tool generates output for all
sources for short data. Easier to track and make consistent, and to make more
granular and robust.

4. DRIVES/PARTITIONS: PartitionItem::partition_filters(),
PartitionItem::fs_excludes(): refactored into PartitionItem::get_filters(),
PartitionItem::set_filters(). Cleaned up, organized better, made comments much
more useful. Goes with DOCS 2c updates. Now there's just one sub that does this
filter/exclude work, which makes it easier to maintain long term.

5. GLOBAL: Used a trick I just learned, declaring variables in the bracket scope
of a class, but not inside the package/class declaration. This makes it work
like a static variable, which Perl 5.008 doesn't support. You have to use a sub
inside the bracket scope to return the data outside that scope, but that is easy
to do.

6. MACHINE: Added return of b_vm for VM detection in MEMORY.

7. SYSTEM: CompilerVersion: Failed to properly use references when passing
$compiler around, not actually sure why it worked, but now is consistent.
2023-07-10 14:18:45 -07:00
Harald Hope
ed7049fcc1 Completion of the audio fixes and improvements of 3.3.26. Added less common
sound servers like EsounD and aRts, and made state reports more accurate for
ALSA.

Major USB code and data upgrades/refactors. The USB changes prepare inxi for USB
4, and adds lanes and Si/IEC speeds to the report. It is important to determine
what USB mode you are running in with 3.x and 4. These changes conform more
closely to how the USB consortium wants USB speeds refered to.

With more robust USB data, this data now appears in a similar form as pcie: data
for Devices, -A, -E, -G, -N, and for -D drives, as usb: plus rev, speed, lanes,
mode, with the -xx/-a options, like pcie. This has been a long standing
oversight and weakness of inxi USB and Device data, but now the two are fully
integrated, including for drives, which was quite tricky to get working.

Added netpkg and Zenwalk support to packages and repos. Also added repos support
for sbopkg and slpkg, and updated package tools for Slackware.

And more distros added to system base feature, and a few more for main ID.

Improved --recommends report quite a bit, now it's more granular for missing
packages and package manager reports, and also fixed a long standing missing
current shell + version issue. Added the final package manager type, pkgtool
(Slackware), that will be supported, which makes for 4, which is enough. Note
that other package managers can be added following the documentation
instructions for packagers, but this is enough for out of the box pm handling.

Fixed a long standing oddity with how free / /proc/meminfo report MemTotal vs
the actual physical RAM. I believe this issue also showed with GPU assigned RAM,
but now for all but short form, shows Memory/RAM: available: ... used: ...

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

1. To the Slackware people at linuxquestions.org forums, who helped, again, on
this audio feature, even finding current or not too old systems that use some of
the new / old audio servers (EsoundD) running in the wild, which I never
expected to see. And also for exposing some weak spots in the USB advanced
logic, and helping with the sbopkg and slpkg repo logic and tools reports.

2. To the Manjaro forum users, for providing cases that show where inxi can be
improved. The audio server/api issue, the current USB 3/4 upgrade, were
initiated by threads pointing to things that could be improved in inxi. So I
guess the real thanks are for using inxi enough to trigger cases that show where
it's weak or can be better. Note that this requires that I follow roughly their
forums, however I only look at threads that seem like they might be of general
interest, or which suggest a possible weak spot in inxi, and I don't follow them
consistently. More reliable is to file github issues, since I will always see
those.

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

1. DesktopData: at one point, BunsenLabs Debian OpenBox had XDG_CURRENT_DESKTOP
set to XFCE, which it isn't, but inxi can't work around such hacks, plus I don't
even know if Bunsen is around anymore anyway.

2. DesktopData: CODE 1 reminds us that the time to depend on x tools like xprop
for anything re desktop/wm detections is fast drawing to a close, true Wayland
will not have xprop, unless it's running on xwayland, which is not something
that should be relied on. Maybe recheck Moksha/Enlightenment which depend on
xprop for version detection.

The list of xprop detected wm/desktops in get_env_xprop_misc_data() is almost
all X only wm/desktops, so those should be safe unless one of them decides to
work on a wayland comositor.

3. BSD: ongoing weaknesses in BSD data sources make maintaining feature parity
impossible, but I am trying to get the BSD data as clean and consistent as
possible. I wish this were not the case, but the fact is, /sys is expanding and
creating excellent and reliable data sources with every major Linux kernel
update, and so far nothing comparable has appeared in the BSDs. This is just
reality, it's not a condemnation, but something like the /proc then /sys file
systems are an excellent idea, well worth emulating.

4. For the RAM available/total clarification, there's a slight issue because
free/meminfo show MemAvailable as Free for use RAM, but dmesg shows available
meaning what was available to the system during boot, minus the reserved
percentage. Since we needed one term, available to System offers the closest
in terms of technical precision without being too verbose. Technically available
in this context means: total physical minus 'kernel code' minus 'reserved'.

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

1. CheckRecommends: See Fix 6b, more or less a bug, but really just a fix.

2. AUDIO: for USB devices, put extra data into row 0, no matter which row the
USB device is. This led to the extra data for USB being assigned to the wrong
row. Sigh.

3. OptionsHandler: When show{'ram'} was set, for bsd, set use{'bsd-raid'}, which
makes both show raid and ram fail for BSD. Oops. User mode RAM data only seen in
OpenBSD so far. This made loading $dboot{'ram'} fail, and any raid as well,
sigh, unless -m was also tripped.

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

1. DistroData: typo for Arch base: was ctios, was supposed to be ctlos.

2a. DesktopData: found case where xprop -root not present (Void Linux), so xfce
test failed. Split to new function dedicated to xfce detection that doesn't use
xprop data. Also, XFCE is working on their Wayland version, which would in
theory not even have xprop by default.

Also, the base version number test for xfce depended on xprop, but
xprop doesn't even have that xfce version data anymore, so just checking if
xfce(4|5|)-panel exist and assigning primary version based on that test.

2b. DesktopData: Also see See CODE 1a,1b for further xprop and test fixes that
could have led to false positive or negative test conditions for the items that
used xprop tests. These tests are all xprop agnostic now, if it's there, they
will use it, if not, do the best they can.

3. PackageData: fixed legacy dpkg-query, old version did not support -f shortcut
for --showformat. This made dpkg package listing fail.

4a. GRAPHICS: Added legacy XFree86.0.log to X log path detection, that was an
oversight. Also added legacy module syntax _drv.o (not _drv.so). This gets X
driver data now for very old systems.

4b. GRAPHICS: fixed corner case where no x driver data, running as root, was not
supposed to show 'note: X driver n/a' message, that was a holdover from before
driver output was cleaned up and driver: N/A shows when no drivers at all found.
Just forgot to remove it when doing recent updates in the driver section, maybe?

5. REPOS/PackageData: For netpkg Zenwalk Slackware systems, showed only slackpkg
repo data, empty, and showed the Slackware pm, not netpkg for pm. See
Enhancements 5, 6.

6. REPOS: removed slapt_get file /etc/slapt-get/pubring.kbx, that's not a repo
file. Thanks chrisreturn for pointing that out.

7a. CheckRecommends: See also CODE 6. Fixed case where > 1 package manager is
detected on system, now lists them one by one for detected, and shows package
install options as well. Before only picked first detected, which could lead
to wrong results for Missing Package lists.

7b. CheckRecommends: Fixed glitch, forgot to update the current shell/version
when ShellData was refactored, this led to no current shell + version showing
up in recommends core tools report.

8. RAM: fixed speed_mapper string match to allow for older syntaxes. This is as
far as known OpenBSD only, from dboot data. Matches then converts PC2700 to
PC-2700 which then allows for mapping.

9. RAM/PROCESSES/INFO/SHORT: Finally tracked down a long time oddity, where for
example:
 RAM: total: 31.28 GiB
does not match 32 GiB physical installed. This is because that is the total
available after kernel and system reserved RAM is deducted, and in some cases,
GPU allocated RAM. There are also corner cases where the listed amount can be
less due to physical RAM damage, but that's uncommon.

Added explanation of why it's different, and what available is referring to in
man -m/--memory.

Changed -m, -tm to show:

System RAM: available: 31.28 GiB used 26.23 GiB (83.9%)

and -I to show:

Memory: available: 31.28 GiB used 26.23 GiB (83.9%)

You can get the 'reserved' and 'kernel code' data from dmesg, but since Debian
made that root/sudo tool, can't count on being able to parse that out of dmesg,
plus you can never count no dmesg anyway since it can get overwritten by kernel
oops or wonky device etc. inxi doesn't use dmesg data for Linux for this reason.

... [    0.000000] Memory: 32784756K/33435864K available (10252K kernel code,
1243K rwdata, 3324K rodata, 1584K init, 2280K bss, 651108K reserved, 0K
cma-reserved)

Also removed Raspberry Pi video RAM added back in to total now that it's clear
it's what is available. This may also make systems with GPU using system RAM
more correct.

9. SENSORS: sensors /sys tried to create concatenated string with $unit $value
but these are not necessarily defined, that needed to be protected with defined
tests.

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

1a. AUDIO: JACK: added helper nsmd (new session manager), and its recommended
gui agordejo. That's the drop in replacement for non-session-manager, the dev of
which apparently lost interest in that project. But the ID method will work fine
for for either, since both ran as nsmd.

1b. AUDIO: PULSE: added pulseaudio-alsa plugin support for helpers. This is like
pipewire-alsa plugin, just alsa config file. Only seen in Arch Linux so far, but
if others use similar paths for the glob pattern, they will also work fine.

Also added pulseaudio-esound-compat plugin, which is easier to detect with
/usr/bin/esdcompat.

Also added paman, pulseaudio manager.

1c. AUDIO: ESOUND,ARTS: added legacy esd (EsounD aka: Enlightened Sound Daemon)
and aRts sound server support, with basic help/tools. These are quite old, but
are still occasionally seen in the wild on newer systems, surprisingly enough.

1d. AUDIO: ALSA: added alsactl to alsa tools. Missed that one, it's an /sbin
type utility.

1e. AUDIO: ALSA: First try at ALSA compiled in but inactive report,  previously
depended on active only state of the API. Now uses compiled in SND_ kernel
switch using the /boot/config-[kernel] file, which is a big expensive parse but
only will activate on Linux kernels with no /proc/asound present. This fallback
fails if kernel config file not present: /boot/config-$(uname -r).

1f. AUDIO: OSS: added tool ossctl.

1g. AUDIO: NAS: added helper: audiooss which is an OSS compat layer.

2a. DistroData: added Arch base distros: ArchEX, Bridge Linux, Condres OS,
Feliz, LiriOS, Magpie, Namib, Porteus, RevengeOS, SalientOS, VeltOS.

None of these are verified. Some don't exist anymore.
Source: https://www.slant.co/topics/7603/~arch-linux-based-distributions

2b. DistroData: added ubuntu lunar 23-4 release id.

2c. DistroData: added porteux, added porteux, zenwalk to slackware systembase

3. DesktopData/GRAPHICS: added Smithay Wayland compositor. Not verified.

4a. UsbData/UsbItem: added USB lanes (-Jxx) and mode (-Ja), to add more useful
data about USB revision and mode names the USB group has created. Otherwise it's
too difficult to try to explain it. Note that -Jxx lanes follows other inxi
items that show PCIe lanes as an -xx item to try to keep it consistent.

This also consolidates the bsd and linux data sources, see CODE 5.

Note modes and lanes are Linux only because the revision number, lanes, and
speed used to determine mode are only natively available in Linux as actual
internal data values. If this changes BSD support will be added in the future.

The BSD rev and speed data is synthesized completely by inxi using some string
values, and thus is not reliable, which means that pretending inxi can get this
granular with data that is not coming directly from the system itself is
probably not a good idea.

Following wikipedia mode names: https://en.wikipedia.org/wiki/USB4

These are the known possible combinations:
rev: 1.0 mode: 1.0 lanes: 1 speed: 1.5 Mbps
rev: 1.1 mode: 1.0 lanes: 1 speed: 1.5 Mbps
rev: 1.1 mode: 1.1 lanes: 1 speed: 12 Mbps
rev: 2.0 mode: 1.0 lanes: 1 speed: 1.5 Mbps
rev: 2.0 mode: 1.1 lanes: 1 speed: 12 Mbps
rev: 2.0 mode: 2.0 lanes: 1 speed: 480 Mbps
rev: 2.1 mode: 2.0 lanes: 1 speed: 480 Mbps
rev: 3.0 mode: 3.2 gen-1x1 lanes: 1 speed:  5 Gbps
rev: 3.0 mode: 3.2 gen-1x2 lanes: 2 speed: 10 Gbps
rev: 3.1 mode: 3.2 gen-1x1 lanes: 1 speed:  5 Gbps
rev: 3.1 mode: 3.2 gen-1x2 lanes: 2 speed: 10 Gbps
rev: 3.1 mode: 3.2 gen-2x2 lanes: 2 speed: 20 Gbps [seen this case]
rev: 3.2 mode: 3.2 gen-1x1 lanes: 1 speed:  5 Gbps [wrong rev: seen this case]
rev: 3.2 mode: 3.2 gen-1x2 lanes: 2 speed: 10 Gbps [wrong rev: possible case]
rev: 3.2 mode: 3.2 gen-2x1 lanes: 1 speed: 10 Gbps
rev: 3.2 mode: 3.2 gen-2x2 lanes: 2 speed: 20 Gbps
rev: 3.2 mode: 4-v1 gen-3x2 lanes: 2 speed: 40 Gbps [not seen, but possible]
rev: 4 mode: 4-v1 gen-2x1 lanes; 1 speed: 10 Gbps
rev: 4 mode: 4-v1 gen-2x2 lanes: 2 speed: 20 Gbps
rev: 4 mode: 4-v1 gen-3x1 lanes: 1 speed: 20 Gbps
rev: 4 mode: 4-v2 gen-3x2 lanes: 2 speed: 40 Gbps
rev: 4 mode: 4-v2 gen-4x1 lanes: 1 speed: 40 Gbps
rev: 4 mode: 4-v2 gen-4x2 lanes: 2 speed: 80 Gbps
rev: 4 mode: 4-v2 gen-4x3-asymmetric lanes: 3 up, 1 down speed:120 Gbps

I believe 120Gbps takes the 2 lanes of tx/rx and converts 2 rx lanes to tx so
the entire lane is dedicated to transmit. and the third lane is dedicated to rx.

Includes error message for unknown usb 3/4 rev/speed match combos. These can be
bad hardware self reporting or unknown other issues.

4b. USB: Added Si/IEC speeds (base 2, base 10). -Ja triggers extra IEC, base 2
Bytes (xxx [MG]iB/s). -Jx triggers basic standard Si xxx [MG]b/s base 10 bits.

5a. PackageData: added netpkg as package tool. This stores data in same location
as slackpkg, but assume if exists directory /var/netpkg, then the system is
using netpkg as pm, not slackpkg.

5b. PackageData: added Slackware sbopkg, sboui as tools for pkgtool and netpkg.

6a. REPOS: added netpkg (Zenwalk Slackware based pm) repo report.

6b. REPOS: added sbopkg basic repo report. This handles both value syntax types,
as well as the ability of /root config file to overwrite /etc config repo.

6c. REPOS: added slpkg repo report. This handles their old and newer syntax.

7a. CheckRecommends: For Slackware users, added pkgtool missing package name,
also will use netpkg so hopefully Zenwalk uses same package names.

7b. CheckRecommends: Added radeon to kernel modules checks.

8. AUDIO/BLUETOOTH/DRIVES/GRAPHICS/NETWORK: For USB, -[ADEGN]xx adds rev, speed,
lanes. -[ADEGN]a adds mode.

9. RAM: Updated RAM PC DDR in speed_mapper(), which is as far as I know only
used by OpenBSD, which allows for MT/s speeds as non-root user, which is nice.
That list hadn't been updated in a long time, so filled out DDR 1-5 PCx-yyyy
ids.

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

1a. USB: For -Jxy1, speed is now a child of rev: parent. This goes along with
mode: and lanes: being children of rev:. This follows how USB consortium wants
to refer to USB revisions now: by speed, lanes, and modes, the latter being the
technical term, the speed being the marketing term.

1b. USB: If no speed data found, show N/A. This should almost never happen
except for very old Linux and rarely with BSD.

1c. USB: Device type is lower cased except for abbreviations (type-C, HID). This
makes it more consistent as a value.

1d. USB: Show basic Si speed with -Jx, and adds new IEC speed with -Ja.

2. CheckRecommends: See ENHANCEMENT, CODE 6. Now showing row by row package
managers and missing packages, by package manager(s).

3. DRIVES: Changed long standing redundant use of 'type':
type: USB ... type: HDD
to:
type: USB ... tech: HDD
'tech:' means the technology used, HDD, SDD, and if we can ever figure out how
to detect it, Hybrid Hard Drive (HHD),

4. AUDIO/BLUETOOTH/DRIVES/GRAPHIC/NETWORK: moved 'type: USB' pair to after
driver for -A/-E/-G/-N, which allows it to be the parent of the new USB data
block. Negative is it moves it a bit further back in the line.

For Drives, it moves it from after /dev.. maj-min to after block-size, However,
with -D/-Dx, it's last in the line, which is nice. This is the only way I could
find to make it more consistent across all possible USB device/drive type
reports.

5. INFO/RAM/PROCESSES: Changed -I:

Memory: [total] used:
to:
Memory: available: [total] used:

Changed -tm/-m to be consistent:

Memory: RAM: total: .. used..
to:
Memory: System RAM: available: ... used:..

This corrects a long standing inaccuracy where MemTotal is not actually the full
system RAM, but is the RAM minus reserved stuff for system and kernel, and GPU
memory in some cases.

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

1a. DOCS: docs/inxi-audio.txt: ongoing updates, adding more information, more
on helpers, detection methods, etc.

1b. DOCS: New: docs/inxi-usb.txt: USB info, update, added more, a work in
progress.

1c. DOCS: docs/inxi-custom-recommends.txt: name in inxi comment did not match,
and updated to new comment cleaned up syntax in example. Fixed inxi comment file
name.

1d. DOCS: New: docs/inxi-unit-handling.txt: To document how inxi handles
size/speed data internally, and ideally, to help integrate all those methods
into one big tool one day, not spread across many area.

1e. DOCS: New: docs/inxi-repo-package-manager.txt: To start to document arcana
and methods and commands and outputs for package managers. Since this is a late
start, will take time to complete, but better late than never.

2a. MAN/OPTIONS: updated for USB -Jx, -Jxx, -Ja, adding lanes, mode, iec speed
items.

2b. MAN/OPTIONS: fixed error which had USB speed as -Jxxx instead of -Jxx. Also
then changed speed to be -Jx.

2c. MAN/OPTIONS: updated for repos for SBOPKG, SBOUI, SLPKG, and added
SLAPT_GET, I'd forgotten that one.

2d. MAN/OPTIONS: updated for -xx[ADEGN] USB rev, speed, lanes; for -a[ADEGN]
updated for USB mode.

2e. MAN/OPTIONS: updated for memory available/used changed.

3. MAN: fixed some inconsistent use of short/long form display in extra data
options.

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

1a. DesktopData: New function for xfce only detections, turns out xprop is not
necessarily installed, Void Linux for example had failed ID. Old version
required xprop to do the tests, which was not robust and failed in this case.
Function: get_env_xfce_data(). Also made xprop data optional for all the
xxx_xprop_data desktop tests, not just some of them. This will forward proof
the desktops

1b. DesktopData: Fixed bad parens in test cases, was not correctly organized.
if (a || b || (c || d) && e)
was supposed to be:
if (a || b || ((c || d) && e))
Odd how those types of glitches creep in, one fix is also to just make the lines
break more reasonably so the conditions are easier to parse visually.

2a. DEBUGGER: Added /etc/X11/XF86Config-4 xorg conf file to debugger.

2b. DEBUGGER: audio_data(): added audio server versions to cover all known ones.

3. MemoryData: changed all $memory to array references, got rid of split :
separators, which were clearly legacy items leftover from bash/gawk days. Also
changed MemoryData::get('splits') to get('full') to reflect this change.

This change should be transparent though it may introduce corner case undefined
value situation but that should not happen since array values are defined first.

4. UsbData: Refactor of usb speed, rev, added lanes, mode. Refactored most of
the bsd/linux rev/speed logic, merged some of bsd speed/rev into the new
version_data() function, which loads all the data based on what is calling it.
This helps consolidate the logic across usb data sources.

5a. GLOBAL: made functions/methods use same comment syntax for args:
 args: 0:...; 1:...
always starting with 0, to match array index. Same syntax for return array index
values. In some cases simply note a variable is passed by ref:
 args: $value passed by reference.

5b. GLOBAL: made all sub/functions/methods follow the same spacing syntax. This
seems to be a good compromise for space/readability. Note that adding in these
new lines added about 400 lines to the total length, plus the line breaks that
were already there. Yes, inxi has a lot of sub routines! aka functions and
sometimes aka methods.

[empty line]
[comments]
sub [name] {

Packages/classes now also all follow the same spacing rules:

[empty line]
[comments]
{
package [name];
[empty line]
[comments]
sub [name] {
...
}
}

Internally, subs generally do not use any empty lines unless it makes sense to
do so for some specific reason.

5c: GLOBAL: made start of sub comments be upper case, I have a bad habit of
typing comments in lower case, easier to read if it's reads like a normal
sentence.

6. CheckRecommends: refactored entire items logic, set global hash for test
items. Made support > 1 detected package manager.

7. REPOS: cleaned up comments for package manager/repo blocks.

8. SENSORS: sensors_sys failed to reset to undefined $unit and $value, and also
failed to test if they were defined before using them in concatenation.
2023-05-07 11:59:56 -07:00
Harald Hope
f22449a205 man fix 2023-03-28 14:54:49 -07:00
Harald Hope
5ee29fa022 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.
2023-03-28 14:48:52 -07:00
Harald Hope
464cac2f1e A small point release, various smaller items, ongoing updates to matching table
features, bug fixes, but nothing major.

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

1. Thanks Umio-Yasuno in github issue #281 for actually being proactive and
finding some Intel/AMD gpu device id lists. I wish more issues would be like
that.

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

1. DEBUG: --debug-arg and --debug-arg-use must use the full format:
--debug-arg="-GS", or else the command line eats the args, even if in quotes.
The error handlers will then complain about no data supplied, and it will exit.

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

1. GRAPHICS: An accidental 'and' instead of 'or' test (see Code 1) led to
systems without gpu or dri graphics drivers not showing their xorg driver even
when present. This was due to a mistake, and also due to how Perl handles || and
&& in sequence, which made this bug not show up until I tested on a system with
xorg graphics driver, but without dri or gpu drivers. Virtually no modern
hardware or operating systems would trip this condition, but older hardware and
operating systems, which may not have gpu or dri drivers, might. And did, in my
case. This is by the way why I try to test on old hardware at least now and
then.

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

1. CODE: A poorly done attempt at optimization would have broken case
insensitive pre-compiled regex with $pattern = qr/../ because you can't add
/$pattern/i to precompiled pattern, but qr/.../i support only added perl 5.014.
This should impact almost nobody, but it is/was a glitch. Basically qr/../ can
only be used when no /i type modifier is required if supporting Perl less than
5.014.

See inxi-perl/docs/optimization.txt section REGEX for more on this.

Note that Perl already compares the values in the variable each iteration via a
simple equality test, so the only real gain from using qr// is not having to do
that equality test each iteration of a loop.

2. OUTPUT: Fixed a few small inner key name failures to use '-' instead of ' '
to separate key terms:

3. REPOS: Called urpm urpmq, which is the query tool, not the actual type.

4. GRAPHICS: Fixed some gpu_id.pl matching rules. Thanks Umio-Yasuno in github
issue #281 for noticing that some of the matching rules were either wrong or not
loose enough.

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

1a. OPTIONS: Long time oversight, no option to test or do one time change of key:
value separator string ':'. This goes along with existing config option
SEP2_CONSOLE. Added --separator/--sep {character}.

1b. OPTIONS: Added synonym for --output: --export, and for --output-file:
--export-file.

2a. GRAPHICS: New Intel gpu data source, from intel, finally. This let us add a
lot more gpu ids. Thanks Umio-Yasuno in github issue #281 for finding these.

2b. GRAPHICS: New AMD data source, from github. This let me fill in some more,
albeit not as accurately as previous sources, but added more so fine. Thanks
Umio-Yasuno in github issue #281 for finding these.

3. CONFIG: In a first, took a feature from acxi, --config, and imported it into
inxi! This shows active current configuration, by file.

4. CPU: updated, fine tuned amd cpu microarch ids.

5. DISKS: More disk vendors added. Not as many as usual, I think the high tech
sanctions against China may be slowing the rate of new Chinese SSD/USB vendors.
But still some new ones, as always. Not many new IDs for existing ones though,
that is noteworthy. A few new data sources to help pinpoint vendor names found
too, though those won't in general impact users, but can be used to determine if
a string is in fact a company name.

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

1. OUTPUT: Fix 2, -t 'started by:' key name changed to: started-by:
-G 'direct render:' changed to 'direct-render:'.

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

1a. MAN: there were a few <...> instead of [...] for required option arguments.
Fixed those.

1b. MAN: also added --debug-id [string] since that is in general useful info.

1c. MAN: Added qualifiers about when xwayland: and compositor: items appear for
default -Ga output.

1d. MAN: Typo in config path in man page, .conf/ should be .config/.

1e. MAN: for --output json/xml, added pointer to doc page on smxi.org, people
being unable to grasp the output is getting tiresome.

1f. MAN: Added synonym for --output, --export.

2a. SMXI.ORG DOCS: added --output json/xml documentation page:
https://smxi.org/docs/inxi-json-xml-output.htm - this is also linked to from the
github wiki page, though of course nobody is going to read it, as well as from
a few pages in smxi.org.

2b. Updated inxi-man,options,changelog.htm files.

3. CHANGELOG: Changed to use same format as acxi.changelog, leading topic id's
in upper case, makes it easier to scan read and organize.

4a. DOCS: docs/inxi-cpu.txt - cleaned up, re-arranged a bit, added cpuid data
explanation, and updated header on inxi-perl/data/cpu/microarch to better
explain the way amd does ext fam / ext model, which are not the same,
bizarrrely, very confusing.

4b. DOCS: New: docs/inxi-disks.txt. Split out from inxi-resources.txt, part of
the ongoing to documentation modularization, slowly splitting out sub topics
from inxi-data.txt and inxi-resources.txt. Note this is in general only done
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
showed x driver. Was supposed to be all || for tests:

if (@$gpu_drivers || $graphics{'dri-drivers'} && @$x_drivers){

https://perldoc.perl.org/perlop. I believe this led to test 1 being false, test
2 being false, and since that left tests 2 and 3 needing to be true for the &&
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
to assign the array ref for drivers like this:

@$x_drivers = (a, b, c);
when it was supposed to be:
$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
combination that may be causing issues.

3b. 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
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 = '';
	# there's no current kde 5 konvi config tool that we're aware of. Correct if changes.
	# This part may never have worked, but I don't have legacy data to determine.
	# The idea was to get inxi.conf files from konvi data stores, but that was never right.
	# if (main::check_program('kde4-config')){
	#	$config_cmd = 'kde4-config --path data';
	# }
	# kde5-coinfig never existed, was replaced by $XDG_DATA_HOME in KDE
	# elsif (main::check_program('kde-config')){
	# 	$config_cmd = 'kde-config --path data';
	# }
	# elsif (main::check_program('qtpaths')){
	# 	$config_cmd = 'qtpaths --paths GenericDataLocation';
	# }
	# The section below is on request of Argonel from the Konversation developer team:
	# it sources config files like $HOME/.kde/share/apps/konversation/scripts/inxi.conf
	#  if ($config_cmd){
	#	  my @data = main::grabber("$config_cmd 2>/dev/null",':');
	# 	Configs::set(\@data) if @data;
	#	 main::log_data('dump',"kde config \@data",\@data) if $b_log;
	# }

5. OPTIONS: in OptionsHandler::post_process(), reorganized the various run and
exit triggers, help, configs, recommends, version, etc. All on top now.
2023-02-07 17:59:56 -08:00
Harald Hope
85f1720a93 A small point release, mainly to get some bug fixes, and a few minor issues, and
some ongoing updates to various matching rule features like CPU, Disk Vendors,
etc.

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

1. mrmazda, for continuing to poke around and finding oddities on occasion.

2. The various packagers, for continuing to package inxi.

3. Nothing else really comes to mind, so I'm thankful that no real issues popped
up, and the ongoing attempt to stabilize and clean up the several year
aggressive development cycle of code is proceeding quite well.

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

1. I'm currently getting no data samples from new server type CPU systems,
Nvidia Grace, Ampere, both ARM V2 based. The ARM cpu arch logic hasn't been
updated in many years since I have gotten no meaningful data, currently
Raspberry Pi 4 is the latest ARM generation I've seen data for, and no ARM
server type for many years. So support there is really not happening, and won't
be until I start getting real datasets on those server systems.

Nvidia uses Neoverse V2 ARM core, but I have no information on that yet. Also
nothing from the Amazon CPU, new Marvell datacenter type CPUs. But that's not
surprising.Also, nothing from the N1 (2019) or V1 Neoverse (2021) ARM CPU family
even though those have now been out a while.

A lot of the advanced CPU data should 'just work' because of the huge CPU
refactor done recently, but some of the more advanced data, particularly
cpu_arch type data, isn't going to be available until I get real data sets so I
can see what's going on. No idea how CPUID might work for ARM cpus, for example.

Objectively many of these datacenter/machine learning focused CPUs will never
see a system inxi will run on, though most I suspect will be running GNU/Linux
in some form, so inxi can in theory run on them, but those people all know what
their systems are doing, so the need isn't particularly pressing of course.

With this said, I did used to have more access to cutting edge server stuff, but
that has largely dried up, particularly ARM based chips.

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

1. Found while resolving Fix 2, it turns out > 1 X Screens would not have shown
correctly due to failing to pass $j row counter by reference. This bug was
introduced when the big Monitor updates were done, since you almost never see
> 1 X Screens now, I never saw it until testing something for another reason.

This led to > 1 Screen showing on the same line as the last monitor of the
previous Screen.

See also Fixes 2, 3, 4, and Code 1, 2, 3.

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

1. Changed Intel Saphire Rapids release data from 2021+ (what Intel had
initially announced) to 2023+ (the actual release date). Not my fault!! They
were too optimistic, inxi merely repeated their claims.

2. While trying to figure out extra Screen showing up, found a series of subtle
issues with how X Screens are handled. Added in more robust test for if Screen
ID has been added by xdpyinfo_data, and other weird corner cases that might
cause strange results in Display Screen-x.

Created check_screen() to allow for more granular and debugable testing.

This forum post helped focus attention on this issue:

https://forum.endeavouros.com/t/\
my-second-screen-is-not-working-after-installing-nvidia/33388

3. %monitors was not correctly assigned in xrandr screen fallback.

4. Set number of Screens found if no xdpyinfo or if xrandr found > xdpyinfo
number of screens.

5. Added Zhaoxin match to Centaur match, might show up on cpu string.

6. OpenBSD's package manager was listed as pkg_info, but it's slightly more
accurate to call it pkg_add. As far as I understand it, OpenBSD doesn't really
have a 'package manager' per se, it has a suite of tools to manage packages.

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

1. Added some Zhaoxin/Centaur IDs, unlikely to show up, but you never know.

2. Added m68k to X display driver list. This was just added to kernel as a full
drm driver! Very legacy, but has users in vm, qemu, etc.

3. More disk vendors! I skipped updating this last time because, well,
collecting the data is really boring, and slightly tedious, and really serves to
simply remind that this is not the way towards a better world. Or are cheap SSDs
the true path after all? I doubt it, but you never know.

4. New AMD, Nvidia gpu ids.

5. New Intel Cpu Microarch IDs.

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

1. No changes to speak of, so I won't.

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

1. Various ongoing updates to inxi-perl/docs. These are very slowly being pulled
into a more useful form. Emphasis on slowly.

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

1. In Graphics::xdpyinfo_data() and Graphics::xrandr_data() got rid of extra
step, now just assign hash reference directly to push anonymous hash reference
into array. Had used intermidiate variable assignement of hash ref, but that is
pointless.

2. Added $fake{'xdpyinfo'}, hoping to get some debugger data to test weird
extra 'Screen' seen with Endeavor user (see Fix 2, 3, Bug 1).

3. Also, instead of using \%monitors, which creates a reference to the last
value of %monitors, used the correct and safer {%monitors}, which creates an
anonymous reference of the value %monitors had at that moment. This is a subtle
Perl error which is easy to make in cases where the hash or array reference is
almsot never > 1 instance, such as > 1 X Screens.

This should at least help resolve the repeated 'monitors' rows in the output
in Fixes 2, 3, 4.

4. Added 'source' to $graphics{'screens'} to log where each detected screen came
from, xdpyinfo or xrandr.
2022-12-10 16:04:04 -08:00
Harald Hope
029a331a06 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.
2022-10-31 15:47:31 -07:00
Harald Hope
b6ac6026f2 Another big one, with a long time to-do item done! /sys based sensors data is
now used as a fallback, with fully revised error messages to handle this new
sensor data variant. Due to potential bugs this might create, this was left off
of the 3.3.21 release, which needed to go out on a schedule, but there is plenty
of time for 3.3.22 to be debugged.

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

1. inxi can't currently handle raw in[0-9] voltage sensor data from
/sys/class/hwmon, that may get corrected, but I've honestly never seen a system
that shows raw in[0-9] values as field names, so it's probably not very
pressing, but it can happen. Similar that is to how default fanx and tempx field
names are processed.

2. Currently only checking -Gx, -Nx device temp for bus IDs ending in .0, which
is the primary PCI device. I think that's the only one that will have a temp,
.1, which is a second device on the same hardware, doesn't have that data in
tests. Saves some requests since it's a big glob of /sys.

3. Spiral Linux has no obvious way to determine that it is Spiral and not Debian
11 as base distro. No /etc/ files for distro ID contain anything for spiral, so
leaving that one alone.

4. Can't get 100% reliable cpu level > v2 due to it not being a pure cpu flag
based test, which is kind of sadly typical for the originators of this idea, but
since the choice was dump the feature, or just use the note: check for > v2,
opted for note: check. One wants to ask questions here, but honestly I already
know the answer so why bother asking the question... The docs for this are
awful, inadequate, incomplete.

My strong suspicion is that this is NOT intended to be a distro-wide feature
beyond v2 support minimum, but rather is for specific compile options for a
package or daemon or server or whatever that can benefit from this type of
fine-tuning. One thinks of Gentoo for example back when such fine-tunings could
actually deliver noticeable differences in performance. A per system type
feature that is, not a distro-wide feature. At least that's my initial feeling,
but this is probably about all the  time I will spend on it since inxi can't get
it more accurate anyway.

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

1. Bug in monitor position logic, the horizontal/vertical sorts were being done
alphanumerically, leading to absurd results where 800 > 2560 or whatever.
Basically all x / y positions less than 1000 would have forced the smaller
number to be considered as the greatest value. Another corner case find by
mrmazda. Thanks mrmazda!

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

1. Added i350bb sensor to network sensor type.

2. Small glitch with some scenarios with missing fan1 in sensors, showed fan1 0
rpm, but then showed fan 3: empty. That was a slight error in how undefined vs
'' empty was treated.

3. Added fix for defective fan speeds, skip fan item if > 15000, which is a bug
in the fan speed report, making it useless. Seen 65535 reported RPM. Could
probably make it 10000 upper limit but suspect that is a simple bug that creates
an absurd value, 2^16 so won't be anything high unless bug active. This fix runs
for ipmi, linux, and sysctl fan data.

4. Trying for fix for dynamic gpu voltage, assumed always mV, but might be V.

5. Inadequate or obscure or non-existent redhat/suse documentation led to some
fixes for cpu v levels. Note that level v3/v4 can't be fully determined by cpu
flag tests, but who cares? Certainly not me. Added 'note: check' for v3/v4.

6. Nvidia device arch id was too loose, false id for non existing lovelace arch.
Note that due to array reverse, the newest ids will always run first, which
leads to possible false positives with first string match tests when no product
IDs are available yet.

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

1. Elbrus CPU arch, process, year, arch data made more complete using new data
resource. Thanks Elbrus guys!

2. Finally, raw, basic /sys/class/hwmon temp data. Linux kernel docs note
supports temp, fan, volts, amps, energy. But have only seen temps so far. Can
force /sys use with --force sensors-sys / --sensors-sys, though there's no point
to doing that except to test.

Also changed --recommends to note lm-sensors not required for sensor data now.

3. Adding device temp for -Gx, -Nx. Will only work for Linux and when found, and
only for free drivers (I think).

4. Added xdriinfo based dri drivers (with fallback to Xorg.0.log as data source,
not as accurate), that will show if and only if that driver is not the same name
as a detected X or gpu driver.

5. Another big upgrade to cp_cpu_arch, added and corrected many AMD/Intel
matches.

6. A few more gpu product ids, Intel, added.

7. More disk vendors, ids, the list, as we are now well aware, is endless,
reflecting perhaps the futility of pursuing the infinite using finite means.

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

1. Slight changes in how inxi supplies no sensor data messages, and in the
fallback cases and handling. More accurate and precise, and more robust overall.

2. Due to complexity of understanding level: and the fact not all cpu flags are
exposed that are required, moved -Cxx level: to -Ca.

3. Changing slightly inaccurate Sound Server for ALSA/OSS to Sound API, which is
the closest I can come to explaining clearly what it is. Note that you can only
load one API type audio subsystem/driver, so you will be running one or the
other, never both, from what I understand.

Since OpenBSD sndio includes sndiod, calling that a sound server is basically
fine, since it's both the server and the interface, if I understand it right,
and there won't be a second sound server listed, actually won't be for any BSD
that I know of, it's going to be sndio or OSS or nothing, unless something has
changed.

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

1. Man page, updates for /sys/class/hwmon based sensor data.

2. Small update for cpu level v3/v4, added note: check explanation, though it's
too hard to really explain this stuff since the docs are... not wonderful, when
they even exist and don't contradict each other.

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

1. Refined significantly sensors missing data and error messages to be much more
accurate and granular. Also enables more sensors tools, though hopefully they
won't appear since those are a real pain to implement, but it's more open to
being sensor tool agnostic now due to these refinements than before.

2. Added xdpiinfo to debugger.

3. Switched x_drivers to return ref of array of refs, use join for output only,
that lets us use the drivers to test dri stuff also (if we want or need to), and
keeps it consistent with how most of inxi does that type of data
handling/testing. If undef, it means no array ref exists, which makes testing
easy.

Not truly understanding hash/array refs when inxi rewrite to Perl started is
probably one of the bigger causes of glitches and ongoing optimizations.
Basically, in all but very small array cases, it's almost always better to start
with a ref from the start as soon as the hash/array moves between functions,
with one exception, when it's a globally stored data item. Then it depends. But
this requires a consistent testing for null data as well, which is harder if you
did it in different ways from the start. But slowly and surely chipping away at
these.
2022-10-07 19:43:17 -07:00
Harald Hope
915c7efa34 A small point release, some nice enhancements, a few bug fixes, and some fixes
to correct or update some issues. Main new features:
* -rx,-rxx,-ra/-Ix,-Ixx,-Ia: enhanced Packages: report
* -Cxx: microarchitecture level. This is a relatively new convention, used to
set various compile flags.

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

1. Can't safely look for pm tool KDE Discover because apt calls it
plasma-discover, but other packaging systems call it discover, which is already
a non-related program (hardware data). Since it's not really core to any package
manager, it's not really a necessary thing to report anyway, though
gnome-software is added because that appears to be more like syntaptic than
anything else.

There's also a qt variant of the rpm packagekit, packagekit-qt, which is
available in for example Arch, but again, it's too granular, and not really
core.

2. At some point, sensors should add /sys hwmon sensor data, then switch to
using lm-sensors as a fallback, and remove one recommended tool from newer linux
systems. I don't think that's too hard, just a bunch of little steps to
integrate that into the main logic.

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

1. For Slackware slackpkg/pkgtool:
a: Failed to show package counts at all because of bad globbing path, forgot /*.
b. Failed to show lib counts for packages due to having wrong counter for path.

2. If no ipmi sensor data was found but the tools are present, could result in
an undefined hash reference error for sensors. The most likely cause for this is
that one of the ipmi commands:
"ipmi-tool sensors" or "ipmi-sensors"
had an error, and since errors are sent to /dev/null, inxi saw null data, then
returned an undefined value instead of the hash reference it was supposed to.
This is the first time I've seen this happen with ipmi, but there have not been
a lot of ipmi samples.

Thanks issue poster #274 for having systems that triggered this scenario.

3. $source for ipmi was set to lm-sensors by accident.

4. For sensors, with > 1 sensor type, like lm-sensors + ipmi, sensor data from
second sensor type was getting written to first sensor type row. See Fixes 9 for
more sensors fixes.

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

1. Force CPU bits to 64 if LM flag is present, if it reports as i686. This fix
only runs for non RISC CPUs that show as 32 bit, so it won't run very often. If
no LM found, remains 32 bit.

This fix goes along with enhancement 1, which only applies to 64 bit CPUs.

2. In --recommends, JSON::PP module package names were wrong, they were copied
from JSON::Cpanel::XS and hadn't been changed to the right package names. Note
that for most distros, this is in Perl Core Modules, but not all.

3. Samsung ram vendor id was too tight, loosened it up a bit. Missed this one:
K3LK7K70BM

4. With Bug 1, extended possible package manager tool detection for slackware
type systems. Slackware is kind of unique in that it is not actually made out of
a core package manager as a collection of packages, but uses package managers as
a kind of layer on top of that, but none of those tools is required to run the
system.

5. Found another corner case indentation glitch, was adding in level 2 on -I
which is has no second level indentation.

6. Forgot to add $force{'pkg'} to -v8.

7. Small fix, if -Z is used, forgot to force --zl, --zu, --zv to false as well
as -z.

8. Small fix, for saphire rapids, alder lake, added + to year built, since those
are ongoing.

9. Sensors:
a. in one case, with an array of fan speeds, set to '' instead of undef, which
made test fail, and showed empty fan item.
b. added wildcards for possible voltage/power matches, was too restrictive for
ipmi sensors values.
c. added better space regex for ipmi temps [\s_-]?
d. DIMM voltage/temp excluded > 9 numbering, like DIMM 19

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

1. New feature: -Cxx shows for AMD / Intel 64 bit CPUs the microarchitecture
level (v1,v2,v3,v4). v1 is baseline. GCC supports this I believe in latest
versions, and some distros use it to determine CPU support levels for compile
time optimizations. This was introduced in 2020 via a collaboration between AMD,
Intel, SUSE, and Redhat. Now you know. This is a simple test based on which CPU
flags/features are present.

These levels can be used for Go language optimization (GOAMD64), GCC
optimization switches (GCC -O2 for example), and probably more.

2. Expanded YMTC (Yangtze Memory) RAM vendor ids and detections.

3. Added [unverified] window managers CDE and NsCDE. No data, only using ps aux
method.

4a. Added slax ID to distro id, added slax to system base support. Currently
only work on slackware based 15.0, not debian based 11.4.

4b. Added SteamOS debian/arch for system  base.

4c. Added os-release VERSION_CODENAME to enhance distro ID data (eg steamos)

5. Added to -ra/-Ia package tools installed report, this goes along with change
2, which changes apt to dpkg, the low level tool. Now with -a, shows the package
manager tools installed, like slackpkg, apt, apt-get, dnf, yum, zypper, etc.

rpm installed as secondary pm requires some further tests. Currently known pm
that have tools (and rpm tests if detected):
All these are known to support rpm secondary pm:
* dpkg - Debian, Ubuntu, and apt-rpm based distros like PCLinuxOS, Alt Linux
* pacman - Arch based distros
* pkgtool - Slackware based distros
* tce - TinyCore Linux

6. A few more pci product IDs for GPU matches. Slow going.

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

1. Changed --pkg to --rpm, the original intention was that this could apply to
more than RPM package manager, but that's the only one that it's used for. This
leads to unclear output for other distributions where the user might have rpm
installed alongside their standard package manager.

2. Changed package pm: 'apt' to 'dpkg', to go along with type rpm (suse,redhat)
and pkgtool (slackware). Note that dpkg is the actual package manager of Debian,
inxi had this wrong, apt interacts with dpkg.

3. Changed -h -a section, to follow after -x, -xx, -xxx, like on man page.

4. For rpm notes, after running some tests to determine whether to use rpm or
not, will show the rpm note: see --rpm in pm: rpm note:... This allows for
more granular errors which will be more useful to users.

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

1. Docs were wrong for -ra/-Ia packages, from original when it package report
was only an -a option, but it got moved to -rx, -rxx for basic features, and -a
for advanced features.

2. Updated for --pkg/--rpm and --force rpm/pkg

3. See change 3, I think people tend to miss the sequence of -x, -xx, -xxx, -a
because -a came before -x, -xx, -xxx in -h menu, but on man page, -a correctly
comes after the -xxx options. Better to be consistent.

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

1. Switched force{pkg} to force{package} internally, and added converts to
change --force pkg/rpm to switch on $force{package}.

2. Refactored package PackageData to be more granular.
2022-08-22 17:55:45 -07:00
Harald Hope
a17d1b958a man fix 2022-07-27 14:10:52 -07:00
Harald Hope
a980e17a18 man page fix 2022-07-27 14:03:40 -07:00
Harald Hope
ff81310652 A good bug fix, and several very good indentation fixes that had always been
around, and some of them known. More fine tuning of CPU process/built data. Bit
by bit it's getting filled out.

Thanks again mrmazda for all the suggestions and watchful eyes.

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

1. CPU built, process are not perfect and complete and always right. Like life,
it's not perfect, but it is ok. Help complete the feature if it bothers you.

2. Intel Raptor Lake and related APUs are trickling out, but I have not found
cpuid data for the cpu, or generation data for the apu. Was hoping to squeeze
that into 3.3.20, but looks like it will have to go into 3.3.21 or later.

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

1. MrMazda pointed this out, the printer was not correctly indenting long values
in specific cases, not adding indentation level 1 when the key: value pair was
not the last item on the logical line. Subtle, but could hit Device, OpenGL, and
a few other cases.

2. When SMT is disabled, cpu speed from /sys can return <unknown>, which is a
string, not the numeric value inxi expected. This trips multipe errors when
speed cleaner is used. Thanks issue #273 reporter iamc for this one. My guess is
all during all cpu testing, none of us thought to disable smt to see what would
happen.

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

1. On disk vendors, Initio isn't a vendor, it's either a misconfigured ide hdd,
slave/master wrong, or bad usb controller. Initio is a default controller, not a
vendor. Added pre-filter in disk_vendor() to remove that string if it appears.

2. Going along with bug 1, finally fixed long standing weakness with long value
wrapping, now continues to build line until it's done, and does not force a new
line after the last long value item.

3. Another glitch where last key: value pair was less than working width, but
total width was greater, was not wrapping correctly.

4. Saw a corner case Intel Core name: Core i7-1165G7 which did not use the
expected intel (core number)(3 digits), modified to look for 3 digits after core
numer OR 2 digits + letter + digit.

5. Added 'tar' installed test for debugger, found cases in actual distros that
shipped without it in their minimal installs. Times sure have changed!

6. Another Centos type change, amazingly, this was shipped without lspci as
well! No idea what went into the install ISO if this stuff didn't include the
most elementary Linux tools. Added lspci missing error if linux and not risc and
no pci_tool detected. I have to admit this is really surprising to me, I mean, I
thought the entire purpose of the rhel family was to provide enterprise
solutions, but to leave out such elementary tools required by every sys admin is
very difficult to understand. This was centos 7.5. I believe Alma and Rocky 9
minimal have those basic tools, so that's an improvement, though they didn't
have tar.

7. Added a '-' between gen and gen number for Intel GPU generation output. Even
though it's documented as for example gen9.5, it looks odd to see it that way,
it's easier to read it as gen-9.5 I think.

8. Did same for AMD arch/codes, for numbered arch/codes like Rage 9, easier to
read as Rage-9.

9. Extreme corner case spotted by mrmazda, if KDE is started by TDE, inxi showed
Trinity, not KDE-Plasma as the desktop. Further, it failed to show Trinity
version, maybe because Trinity was not installed?

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

1a. More or less completed verification of AMD cpu microarch/built/process, and
added more accurate fallback cases for stray model IDs.
* family 5h: K5, K6
* family 6h: K7
* family 7h: K8 - mostly done, needs some checks.
* family 10h: K10
* family 11h: K11 Turion X2. Note there is some uncertainy about this family
name. Built years n/a yet. Mix of K8/K10
* family 12h: K12 Fusion, K10 based, first APU type?

1b. Extended Intel cpu data a bit more as well. Thanks linuxdaddy from slackware
for the research help there.
* family 4: mostly new, fine tuned, granular
* family 5: more granular, better date/process info.
* family 6: built dates added
* family F: corrected some overly specific stuff

2. Tentative support for finit init system (fast init). Runs in /proc/1/comm,
uses initctl, which may have been revived from its upstart days, not sure. Added
potential support for nosh, linux only, don't know how to detect other bsd init
system.

3. Added amd/intel gpu product IDs.

4. Added shortcut --filter-all/--za, activates all filters: -z, --zl, --zu,
--zv. Why not?

5. Added support for dm types kdmctl and xdmctl, opensuse and maybe redhat use
the latter to start the actual dm running the desktop/wm. You want to see that
because you need to do systemctl restart xdm to restart the actual dm. Thanks
mrmazda for pointing out this one.

6. Added AlmaLinux, RockyLinux, CentosStream to system base (RHEL derived).

7. Basic Raptor Lake gpu/apu support added, with patterns to detect since few
product ids yet. Same applies to Arctic and Alchemist, which still have no
product IDs.

8. More disk vendors and disk vendor ids, never stops - the waters flow on, the
rain falls, then the sun comes out. Until one day it doesn't.

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

1. Deprecated --gpu, now it works the same as -Ga, that was too granular and
nobody would use it I think. Now that the new gpu features are solid, no need
for this special feature.

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

1. Updated docs/inxi-values.txt, it didn't have all the --debug-xxx options
listed.

2. Split out some BSD data into docs/inxi-bsd.txt.

3. Big update on docs/inxi-init.txt, moved data to it from other files, updated
the init/service tool data.

4. Renamed init-data.txt to inxi-init.txt, renamed cpu-flags to
inxi-cpu-flags.txt to be more consistent.

5. Updated help, man for new --filter-all option.

6. Updated help and man for --gpu deprecation.

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

1. Moved required perl modules and system programs checks to
check_required_items() in debugger, why not? Also added an error handler for
missing required programs, this is really the only one, and only for
--debug >= 20
This is the only required program test inxi has in it I believe, really amazing
that such a core tool would be left out of an OS today.

2. Removed this redundant block of code from Network device_output() end
section, that repeated in the main get() so didn't seem to serve any purpose.
The test in get() is if n!@rows and if !%risc, same as here, so can't see any
use for it. I'm leaving this here in case that did have some use, but I don't
see it.

if (!@$rows && !%risc){
	my $key = 'Message';
	my $type = 'pci-card-data';
	if ($pci_tool && $alerts{$pci_tool}->{'action'} eq 'permissions'){
		$type = 'pci-card-data-root';
	}
	@$rows = ({
	main::key($num++,0,1,$key) => main::message($type,'')
	});
}
2022-07-27 12:02:36 -07:00
Harald Hope
25b2d2edb9 This is a quick bug fix release, and one other fix, the bug only impact Debian/
Ubuntu distros.

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

1. Nothing new.

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

1. Two repo_builders could create an undefined array ref situation, one in Antix
I have no idea was triggered since it requires an apt file be not readable but
existing, which just isn't a normal debian/ubuntu situation. Void linux was the
other. Since those were the only two with a -r file test, there must be some
case where the file was not readable, though I have no idea what that case might
be.

Further examination showed this can hit all apt based systems, the cause is no
/etc/apt/sources.list file, which is a possible scenario across all apt systems.

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

1. Blacklisted all apcitz sensors that are not acpitz-virtual, which is the cpu
temp. This may help resolve issues for some users where for example using
acpitz-acpi, which is not the cpu sensor.

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

1. A few more AMD family F empirical IDs made.

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

1. None.

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

1. Started to split/merge inxi-data.txt and inxi-resources.txt into topic
specific files, like inxi-sensors.txt, inxi-graphics.txt, etc. inxi-values and
inxi-resources have just gotten too big over the years.

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

1. Corrected in RepoItem possible use of undefined array references.

2. Finally, a full releawse tool!! inxi-perl/tools/release.pl. Validates man,
verifies pinxi commands to avoid errors, then updates man/options/changelog
html pages for smxi.org/docs, and then syncs pinxi* files to inxi*.
2022-06-16 16:04:35 -07:00
Harald Hope
80522b55b1 Bug release, replace 3.3.17 asap, most users will not experience the bug, but if
they do, inxi stops right before the -D line. Failed to do an if defined test on
an array ref that could be undefined or an array ref. That makes Perl very
unhappy!

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

1. AMD family F, K8 series, will need more granular treatments to get the data
to be more accurate and less generic. We got 2 IDs nailed from raw visual data
confirmations and cpuid values, which leaves many, but good start. We will chip
away (pardon the pun) at these more ambiguous IDs over time, but don't need to
get them all done instantly, just eventually. Thanks slackware person linuxdaddy
for doing really good research and actually looking at the cpu to find dates
etc.

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

1. Bug, fatal, caused by internal hash/array ref refactor of 3.3.17. Thanks
alaymari github issue #271 for reporting this one.

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

1. None except for code fixes to try to avoid the cause of the bug in Bugs 1.

2. Fixed nvidia eol try --gpu, it was showing backwards, with --gpu, not
without, sigh.

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

1. Added slimski dm data. That's a new fork of SLiM. Also guessing that brzdm
has same version -v output: brzdm version x.xx

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

1. None

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

1. Refactors of core docs, ongoing, but will list those next release.

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

1. Cleaned up some array ref handling in subs, returned as: ($var1,$var2) =
@{block_data(...)}, skipped initializing and creating scalar to hold the ref,
just use it directly for DiskItem::block_data().

2. Also switched to local ref scalar array in DiskItem::scsi_data(),
DiskItem::block_data(). Not set local array, set local array ref, to keep it
clear. Also made DriveItem::drive_speed() return straight ref, not array then
ref. Same for many other subs, switched to ref assignment so it's the same ref
all through all the sub and return.

3. Fixed a redundant return \@$data to simply assinging to @$data ref, no return
needed, in DiskItem::smartctl_data().

4. Tightened some returns of ref so that tests if good test @$ref, not $ref.
Trying to avoid more cases like issue #271.

5. Going along with array ref local/return, switched all hash refs to local hash
ref returning ref, and working local with ref. More efficient, avoids creating
new refs over and over, dugh. This made a particularly large difference in CPU
because in certain parts, new references were being created over and over, and
subs were returning like \@arr or \%hash instead of declaring to start:
my $arr = []; my $hash = {};

Then working with the data from there on as an array or hash reference, to the
same original reference, rather than creating new ones over and over, which Perl
then has to track til they expire.
2022-06-13 16:32:32 -07:00
Harald Hope
35e8a95055 Rollout of advanced microarchitecture info continues, added AMD/Intel gfx
devices, CPU built dates, process nodes, generation (in some cases, where it
makes sense), etc.

Please note: the 3.3.16 > 17 releases require manual matching table updates. If
you think disk or ram vendor, CPU or GPU process, release date, generation, etc,
information is not correct:

* FIRST: do the research, confirm it's wrong, using wikichips, techpowerup,
wikipedia links, but also be aware, sometimes these slightly contradict each-
other, so research. Don't make me do all your work for you.

* Show the relelevant data, like cpu model/stepping, to correct the issue, or
model name string.

* There are 4 main manually updated matching tables, which use either raw regex
to generate the match based on the model name (ram, disk vendors), or vendor id
matching (ram vendors), product id matching (gpu data), or cpu family / model /
stepping id matching. Each of these has its own matching tool at:
  inxi-perl/tools/[tool-name].pl
which is used to generate either raw data used by the functions (ids for gpu
data), or which contains the master copy of the function used to generate the
regex matches (cp_cpu_arch/set_ram_vendors/set_disk_vendors).

* Please use pinxi and inxi-perl branch for this data, inxi is only released
when next stable is done, all development is done in inxi-perl branch. All
development for the data or functions these tools are made for occurs in the
tools, not in pinxi, and those results are moved into pinxi from the tools.

* Saying something "doesn't work" is not helpful, provide the required data for
the feature that needs updating, or ideally, find the correct answer yourself
and do the research and then provide the updated data for matching.

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

1. GPU/CPU process node sizes are marketing, not engineering, terms, but
work-around is to list the fab too so you at least know which set of marketing
terms you're dealing with. As of around 7nm, most of the fabs are not using nm
in their names anymore, TSMC is using n7, Intel 7, for example. While these
marketing terms do reflect changes from the previous process node, more
efficient, faster, faster per watt, and so on, and these changes are often quite
significant, 10-30%, or more, they do not reflect the size of the transistor
gate like they used to up until about 350nm. Intel will move to A20 for the node
after 4 or 5, 2nm, meaning 20 angstroms.

Intel suggested million transistors per mm^2 as an objective measure (currently
around 300+ million!! as of ~7nm), but TSMC didn't take them up on it.

GlobalFoundries (GF) stepped away from these ultra small processes at around
14nm, so you won't see GF very often in the data. AMD spun off its chip fabs to
GF aound 2009, so you don't see AMD as foundry after GF was formed. ATI always
used TSMC so GPU data for AMD/ATI is I think all TSMC. Intel has always been its
own foundry.

2. Wayland drops all its data and can't be detected if sudo or su is used to run
inxi. That's unfortunate, but goes along with their dropping support for > 1
user, which was one of the points of wayland, same reason you can do desktop
sharing or ssh desktop forwarding etc. This means inxi doesn't show wayland as
Display protocol, it is just blank, if you use su, or sudo start. This makes
some internal inxi wayland triggers then fail. Still looking to see if there is
a fix or workaround for this.

3. In sensors, a new syntax for k10-pci temp, Tctl, which unfortunately is the
only temp type present for AMD family 17h (zen) and newer cpus, but that is not
an actual cpu temp, it's:
https://www.kernel.org/doc/html/v5.12/hwmon/k10temp.html

"Tctl is the processor temperature control value, used by the platform to
control cooling systems. Tctl is a non-physical temperature on an arbitrary
scale measured in degrees. It does _not_ represent an actual physical
temperature like die or case temperature."

Even worse, it replaced Tdie, which was, correctly, temp1_input, and, somewhat
insanely, the non real cpu temp is now temp1_input, and if present, the real
Tdie cpu temp is temp2_input. I don't know how to work around this problem.

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

1. Fallback test for Intel cpu arch was not doing anything, used wrong variable
name.

2. A very old bug, thanks mrmazda for spotting this one, runlevel in case of
init 3 > init 5 showed 35, not 5. Doesn't show on systemd stuff often since it
doesn't use runlevels in this way, but this bug has been around a really long
time.

3. SensorItem::gpu_data was always logging its data, missing the if $b_log.

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

1. Fixed some disk vendor detection rules.

2. Failing to return default target for systemd/systemctl when no:
 /etc/systemd/system/default.target
file exists. Corrected to use systemctl get-default as fallback if file doesn't
exist.

3. Fixed indentation for default: runlevel, should be child of runlevel: /
target:

4. Fixed corner case where systemd has no /proc/1/comm file but is still the
init system. Added fallback check for /run/systemd/units, if that exists, safe
to assume systemd is running init.

5. Fixed subtle case, -h/--recommends/--version/--version-short should not print
to -y1 width, but rather to the original or modified widths >= 80 cols.
Corrected this in print_basic() by using max-cols-basic.

6. Forgot to add --pkg, --edid, and --gpu to debugger run_self() tool.

7. Fixed broken sandisk vendor id.

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

1. Added AMD and Intel GPU microarchitecture detections for -Gx. These are not
as easy as Nvidia because there is no one reliable data source for product ids.

2. Going with the -Ga process: .. built: item, -Ca will show process: [node] and
built: years and sometimes gen: if available. Geeky, sure, not always perfect,
or correct, but will generally be close. Due to difficultly in finding reliable
release > build end years for example, not all cpus have all this data.

Using CPU generation,where that data is available and makes sense. Like AMD
Zen+ is zen gen: 2, for example,. Because Intel microarch names are often
marketing driven, not engineering, it's too difficult to assign gen consistently
based only on model names. Shows for Core intels like: gen: core 3

That will cover most consumer Intel CPU users currently.

3. Added initial Zen 3+ and Zen 4 ids for cp_cpu_arch(). There is very little
info on these yet, so I'm going on what may prove to be incomplete or wrong
data.

4. Added GPU process, build years for -Ga.

5. Added fallback test for gpus that we don't have product IDs for yet because
dbs have not been updated. Only used for cases where it's the newest gpu series
and no prodoct IDs have been found.

6. Added AMD am386 support to cp_cpu_arch... ok ok, inxi takes 9 minutes to
execute on that, but there you have it.

7. Added unverified Hyprland wayland compositor detection.

8. By request, added --version-short/--vs, which outputs version info in one
line if used together with other options and if not short form. With any normal
line option, will output version (date) info first line, without any other
option, will output 1 line version info and exit.

9. More disk vendors, ids! Much easier with new tool disk_vendors.pl.

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

1. Deprecated --nvidia/--nv in favor of more consistent --gpu, that's easier to
work with multiple vendors for advanced gpu architecture. Note for non nvidia,
--gpu only adds codename, if available and different from arch name. For nvidia,
it adds a lot more data.

2. Changed inxi-perl/tools tool names to more clearly reflect what function they
serve.

3. Going with runlevel fixes, changed 'runlevel:' to be 'target:' if systemd.
Also changed incorrect 'target:' for 'default:'.

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

1. Updated man, help, docs/inxi-data.txt for new gpu data and tools, and to
indicate switch to more generic --gpu trigger for advanced gpu data, instead of
the now deprecated --nvidia/--nv, which probably will go down as the shortest
lasting option documented, though of course inxi always keeps legacy syntax
working, behind the scenes, it's just removed from the -h and man page in favor
of --gpu. Also updated to show AMD/Intel/Nvidia now, since the data now roughly
works for all three main gpus.

2. Updated pinxi README.txt to reflect the tools and how to use them and what
they are for.

3. --help, man, updated for target/runlevel, default: changes for init data.

4. Updated configuration html and man for --fake-data-dir.

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

1. Upgraded tools/gpu_ids.pl to handle nvidia, intel, or amd data, added data
files in tools/lists/ for amd. First changed name from ids.pl to gpu_ids.pl

2. New data files added for amd/intel pci ids, and a new tool to merge them and
prep them for gpu_ids.pl -j amd|intel handling. All work. Took a while to get
these things sorted, but don't want to get stuck in future with manual updates,
it needs to be automated as much as possible, same as with disk_vendors.pl etc,
if I'm going to try to maintain this over time.

3. Made all gpu data file names use consistent formats, and made disk data files
also follow this format.

4. Changed raw_ids.pl to gpu_raw.pl, trying to keep things easy to remember and
consistent here.

5. Refactored core gpu data logic, now all types use the same sub, and just
assign various data depending on the type.

6. Changed vendors.pl name to disk_vendors.pl

7. Big redo of array/hash handling in OutputHandler, was partially by reference,
now is completely by reference. All Items now use and return $rows array ref as
well, from start to finish, unlike previously, where @rows was copied
repeatedly.

8. Going along with 7, made most internal passing of hash/arrays use hash/array
references instead, where it makes sense, and doesn't make the code harder to
work with.

9. Refactored WeatherItem, split apart the parts from output to be more like
normal Items in terms of error handling etc.

10. Added 'ref' return option for reader() and grabber(). Only useful for very
large data sets, added also default 'arr' if no value is provided for that
argument.

11. Switched some features to use grabber/reader by ref on the off chance that
will dump some execution time.

12. A few places added qr/.../ precompiled regex, in simple form, for loops,
maybe it helps a little. I don't know.

13. Added global $fake_data_dir, this can be changed via configuration item:
FAKE_DATA_DIR or one time by --fake-data-dir.

14. Created data directory, and initial data items. cpu is the fake data used to
test CPU info. More will be added as data is checked and sanitized.
2022-06-10 12:40:18 -07:00
Harald Hope
6023702097 A nice release, some good corner case bug and glitch fixes, along with some much
needed documentation fixes to bring inxi-values.txt up to date for changes that
have been evolving steadily. And a useful option for nvidia legacy card info.

I'm hoping that will help support people and users as nvidia open source driver
gets more usable in the future, since that will never support legacy cards, only
the current series supported by 510/515 drivers.

Also, in inxi-perl/tools, new tools and data so you can reproduce certain arcane
data assembly features like disk vendors and nvidia product ids.

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

1. Not known yet if you can get Wayland display drivers along with kernel gpu
drivers. In other words, is a similar use of kernel/display driver as in Xorg
found with Wayland? Hard to dig up actual answers to questions like this.

2. Similarly, unknown if it's possible to get current active xorg display
driver, not just the list from Xorg.0.log file. No idea how to discover that,
there are cases where past use of Xorg leaves log file present, but drivers are
not used with Wayland, leading to confusing driver reports. Issues 1 and 2 are
similar but probably have similar solutions.

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

1. Very subtle failure caused by odd mount point in partitions: a too loose
regex rule designed to capture spaces in device names was running loose to the
end of the string, where it was triggered by a number in the mount point.

Fix was to make rule much more strict, now needs to match 3 number space in a
row after the initial part, and then a number%

2. Bug in corner case, with Monitors, if > 2 connected monitors, and 1 disabled,
inxi was trying to test numeric position values for the disabled monitor, which
with xrandr, has no position values, thus tripping undefined pos-x and pos-y
errors. Thanks to fourtysixandtwo for spotting this corner case.

3. Bug in wan IP, if dig failed, set_dowloader() is not set unless other
parameters were used, which results in failing to set parameters for downloader,
which leads to screen errors spraying out. Thanks to Manjaro user exaveal for
posting this issue, with error outputs, which helped pinpoint the cause.

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

1. More absurd xorg port ID variations: DP-1 kernel, DP1-1 X driver. Wny?
Trying to add in XX-?\d+-\d+ variation, which I think will be safe, made the
first - optional, though it's just idiotic for this amount of randomness to be
allowed to exist in the 21st century. If this reflects other discipline failures
in Xorg, it starts to get somewhat more obvious why Wayland was considered as
the only forward path, though that's just as chaotic and disorganized... but in
different ways.

2. Removed darwin distro version detection, which of course broke, and using
standard fallback for BSD made out of uname array bits. If it works, it works,
if not, who cares. This should handle issue #267 hopefully.

3. Trying for more monitor matches, now in cases where 1 monitor display ID
remained unmatched, and 1 sys kms id remains unused, assume the remaining
nonitor ID is a match and overwrite the unmatched message for that ID. This
will cover basically all single monitor match failure cases, and many multi
monitor failures with only 1 out of x monitor ids unmatched. While guessing a
bit, it's not a bad guess, and will slightly expand the number of matched
monitor ids. This extends the previous guess where if single monitor and
unmatched, use it to cover > 1 monitors, with 1 unmatched.

4. LINES_MAX configuration item did not assign to right variable when -1 value.
Used non-existing $size{'output-block'} instead of correct $use{'output-block'}

5. Forgot to add pkg to --force, goes with --pkg.

6. Finally! Added in busybox shell detection, it's not of course reliable if
they change internal light shells, but all the docs say they use ash, so now
it will show shell: ash (busybox) to make it clear. Hurray!! This means that
tinycore users will get this long awaited feature! Ok, ok, long awaited by
probably only me, but since I package inxi for busybox, it was on my todo list.

7. Cleaned up and re-organized many disk vendor matching rules, made them easier
to read and debug, going along with Code 3, vendors.pl development and release.

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

1. New feature: in -Ga, if Nvidia card, shows last supported nvidia legacy
series driver (like 304.xx), status, microarch. If --nvidia and EOL, shows
last-supported: kernel: xorg: info. This should be useful for support people,
we'll see.

-Gx shows nvidia microarchitecture, if it was found. This is based on matching
tables so will go out of date if you have non current inxi's, but that's life.

If --nvidia or --nv shortcut is used instead, triggers -Ga and shows much more
nvidia driver data for legacy, and for EOL drivers, last supported kernel, xorg,
and last release version. --nvidia also adds process node if available.

More important perhaps is the fact that as of May 2022, nvidia is starting the
process of open sourcing its current latest driver (515, but Turning, Ampere
architectures only so far), which will only support non legacy nvidia cards,
making detection of legacy cards even more important to support people and end
users, since that will be a common question support people will have: does my
card support the open source driver?"

Read about the new open sourcing of the 515 nvidia module:
https://developer.nvidia.com/blog/nvidia-releases-open-source-gpu-kernel-modules/
https://github.com/NVIDIA/open-gpu-kernel-modules
https://www.phoronix.com/scan.php?page=article&item=nvidia-open-kernel&num=1

2. Going along with new and upgraded tools in Code 3, massive, huge, upgrade to
disk vendors, 100s of new matches, biggest upgrade ever for disk vendors. This
feature should work much better now with the new backend tools.

3. Added shortcuts: --mm for --memory-modules, --ms for --memory-short.

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

1. None.

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

1. Big update to docs/inxi-values.txt. This had gotten really out of date, with
incorrect hash and other internal data assignments, all updated to be current,
along with sample greps to make it easier to locate changes in the future as
well. This makes this document fairly up to date and useful again for dev
reference purposes, should such a dev ever appear, lol. Many values had not
been updated after global refactors, like switching to the %risk data for all
arm/mips/ppc platform types, and making %load, %use, %force, %fake uses more
consistent. Doing this helped expose some subtle bugs and failure cases in
inxi as well.

2. Added to -h and man -Ga Nvidia option info. Fixed some typos and glitches.
Includes new --nvidia / --nv options for full data.

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

1. Changed $dl{'no-ssl-opt'} to $use{'no-ssl'} and $dl{'no-ssl'}, that was a
confusing inconsistency.

2. Added comma separated list of --dbg numbers, since often > 1 is used. Saves
some debugging time, otherwise nothing changes.

3. Huge new public release of some back end tools in new section:
inxi-perl/tools
* vendors.pl - disk vendors tool, with data in lists/disks*.txt
* ids.pl - nvidia product id generator tool, with data in lists/nv_*

4. While doing vendors.pl, I noticed that the use of array ref for $vendors was
not done correctly, that's fixed now, simplifies it slightly.
2022-05-19 14:17:33 -07:00
Harald Hope
8e0b7b5ccf Bug fix, it's a bad edid data bug, rare, but when it trips, kills inxi execution
dead right before -G/Graphics shows. Also some nice fixes and enhancements.

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

1. Possible case of Gnome Wayland failing to set any gnome environmental
variables, making wayland detection not possible. This was in anonymous dataset
inxi-proBook4540s dataset. Person never appeared in real life so can't follow up
on it. This cascaded down to other failures in display detection, and desktop
detection, though in theory much of the data needed was present. I expect
similar issues may appear with kde wayland. This is/was probably a configuration
or build error I believe, though not enough data yet.

It appears that sudo start disabled the display environmental variable
detections, which is unfortunate, and the fallback loginctl tests do not appear
to work for unknown reasons. I've confirmed this on Fedora stock Gnome as well.

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

1. Forgot to test that return from get_display_manager is array ref, this
impacts only a tiny handful of distros probably, TinyCore was one, but it is
a fatal failure, so fixed it. Also fixed in 3.3.14 inxi branch. Never trips in
console, only on tiny linux where no dm is used at all, I think Xvesa might be
the only case this would have tripped.

2. EDID errors and warnings had several bugs, errors a fatal critical bug which
made execution stop. Had forgotten to pass the $edid hash reference to the error
constructor. Also had used wrong hash key in output so would never have shown.

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

1. Corrected ram device indentation levels.

2. Made memory width more clear with: width: data: total: which more
accurately reflects the source data. Also in cases where no data or total
values, only show width: N/A, not the data: total: sub items.

3. Made edid errors/warnings output to numbered list of warnings/errors instead
of using join() to made one long list. Much more consistent that way. This fixes
issue #266 - thanks SheridanOAI for finding this bug.

4. In --slots, -x wasn't loading the bus ID so it showed N/A, unnecessary data
collection granularity, removed.

5. For Display, if no X or gpu driver, show: driver: N/A. Showed driver: gpu:
N/A before.

6. For Display, remove filters for Xwayland tests, we always want to see
xwayland data if it's installed. This was actually an error to not show it since
display_server_data already had the correct tests to not redo Xorg data if found
previously, which would be glxinfo based data. This is a partial fix also for
Known Issue 1, at least we'll see Xwayland is present even if Wayland detections
failed for unkonwn reasons.

7. Added some ram value dmi filters, found some that had 'none' or 'unknown'.

8. Show display protocol out of display!! Also handles most common root use
cases as well, so in most cases, if the initial protocol detections failed, this
will result in a decent attempt, though if root it is less reliable. sudo or
regular user will be fine since looks for not tty/pts TTY type and username.

This should also help narrow down Known Issue 1 failures, though there are more
cases to be dealt with, but can only chip away since not enough data.

9. Made info: item in slots more robust, and able to handle more diverse
scenarios.

10. Added alternate syntaxes for dmidecode permissions errors.

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

1. Added brzdm clogin mlogind xlogin display managers. Not verified. Version for
brzdm is probably like slim since brzdm is a fork of slim.

2. Added voltages to ram module report, that had been left out. Note that it's
common for voltages to be either 'unknown' or not present at all. This is as
close as inxi can get to handling issue #265 since there is no other source for
the requested data type (show DDR3L, low voltage DDR3, which doesn't exist as a
type in dmidecode).

3. Added voltages to --slots report, --slots -xx. Only shows if present.

4. Added for --slots -a for Linux, if detected, the PCI children of the bus ID
of the slot. This is recursive, so supports as many levels as are present,
though it would be rare for there to be more than one level of children.

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

1. In -m ram report, moved ram type before size/speed/voltage, that makes more
sense.

2. Also in -m ram report, make type: the default value (was an -x options
before), which contains the no module found messages etc, making the order:
  Device-1: DIMM 0 type: no module installed
  Device-2: DIMM 1 type: DDR4 size: 16 GiB speed: 2400 MT/s

This puts all the speed/size/voltage data together, and stops putting the no
module found message in speed, which never made any sense.

2. In -m, changed width data to more clearly reflect the data source:
      width (bits):
        data: 64
        total: 72

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

1. Man page, added a TABLE OF CONTENTS section which lists all the primary
sections. Can help since the man page has gotten so darned long and man doesn't
as far as I know support clickable internal links, sadly.

2. For -m, updated for revised output syntax and -x levels. Note that the help
and man actually had the type: as default for -m, not -mx, but for some reason,
the code had it wrong. Oops.

3. For -m, fixed some legacy output syntax in the examples.

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

1. Some refactors of slots, ram, as well as a bit more refactoring of edid stuff
for graphics.

2. Added $ENV{'DISPLAY'} to debugger data collector, no idea why that was left
out.
2022-04-07 22:49:36 -07:00
Harald Hope
b3cdcd979a New version, man. Continuing development of EDID and monitor features, bug
fixes, normal fixes.

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

1. Failed to handle case for monitor positions of array type: 2-2, 3-1, 1-3,
4-4. I'm not sure what structure those are really arranged in, but might be
worth adding in the x+y pos values along with the row-col values.

2. For Monitors and graphics Device ports, if using non free nvidia driver and:
nvidia-drm.modeset=1 not set in grub kernel boot parameters, there will be no
/sys/class/drm data for the nvidia device, and thus no ports data, and no
monitor data.

3. A class of high count DP or DVI port IDs are changed by Xorg drivers to for
example: DP-6 > DP-2-3. This is very difficult to handle and will in general
probably fail unfortunately because that level of port ID abstraction is just
reazlly hard to deal with dynamically.

4. A to-do item: add bus ID children on --slots. This will probablby be in next
inxi.

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

1. None outside of the various fixes.

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

1. In sensors, failed to pull out BAT sensor data. In most cases, this would not
lead to any issues, but it could have.

2. This one just slipped my mind, I'd meant to do it, but in Montitor-x:, the
primary ID should have been the 'real' kernel ID, not the mapped: ID, which is
the X.org ID when different from the kernel ID. So mapped should be the Xorg
version when they are different from the kernel version.

3. In Graphics, monitors can show > 1 ratio, failed to set all to :, resulting
in: ratio: 3:2 or 16/10 modes:. Also fixed ParseEDID to output an array of
ratios, which can then be processed as wanted.

4. Monitor map fixes:
* Handle case in monitors where display ID: eDP and sys ID: eDP-1, this only
works if 1 monitor in array. There's a variety of this type of failure, when
X.org or its drivers decide to call the port ID XYZ with no number at all. All
those possible cases are now handled, like eDP > eDP-1, VGA > VGA-1, and so on.

* Added fallback, if no match, and if only 1 monitor, just map them to eachother
if other mappings failed. Prompted by things like: s: DP-6 > d: DP-2-3;
s: eDP-1 > d: DP-4, which are just impossible to create logic to map.

5. Removed 'ati' driver from xorg drivers list, it's simply a wrapper for r128,
mach64, or radeon (and maybe amdgpu), and shows as failed, unloaded, or loaded,
because of this. ati basically assigns the correct driver, that is, but is not
itself a driver. Thanks mrmazda for spotting this issue.

6. Typo on QDI => Quantum Data.

7. Added fallback for monitor model, now using vendor code plus product code
if nothing found for vendor nice name or model. This will show as 'model-id:'
instead of model: to help differentiate the two.

8. Added Monitor product_code to manufacturer if no model name is found.

9. get_pci_vendor was trimming at ' / ' if the product string also contained
' / '. Fix is to ignore 1 character 'words' in the logic.

10. In Slots, failed to remove_duplicates in the slot info field, leading to
redundant output strings. See Enhancement 3 and Code 4.

11. See Change 3, finally made -S section use full key: value pair, which makes
stuff more explicit, like:

System:
  Host: yawn
  Kernel: 5.16.0-11.1-liquorix-amd64
    arch: x86_64
    bits: 64
    compiler: gcc
      v: 11.2.0
  Desktop: Xfce
    v: 4.16.0
    tk: Gtk
      v: 3.24.24
    info: xfce4-panel
    wm: xfwm
      v: 4.16.1
    vt: 7
    dm:
      1: LightDM
        v: 1.26.0
      2: SDDM
        note: stopped
  Distro: Debian GNU/Linux bookworm/sid

12. Fix for mageia and lsb distro data, force use of os-release for mageia if
detected. That overrides the forced use of lsb release for mandrake/mandriva,
because for some reason mageia has decided to carry ALL the legacy distro files:
'/etc/lsb-release',
'/etc/lsb-release.d',
'/etc/mageia-release',
'/etc/mandrake-release',
'/etc/mandrakelinux-release',
'/etc/mandriva-release',
'/etc/os-release',
'/etc/redhat-release',
'/etc/system-release'
which is really not what this stuff is intended for, if it's an actual derived
distro from a living base, then yes, include the base file, but all these have
the same distro id data for mageia, none for the derived distros.

Also, fixed an lsb release thing to avoid using codename if codename contains
release number as well. Since lsb_release is totally legacy at this point, who
cares if we might miss a specific codename here and there on legacy system.

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

1. Added Color Characteristics to EDID parser, for some reason that had been
left out.

2. Added advanced EDID output option --edid, that allows for showing more
advanced EDID data than is appropriate for most users cases. Ihcludes errors,
color characteristics chroma: (chromacity), full modes, not just min/max.

3. In --slots, added bus-ID.

Also extended report quality, made more granular, got rid of single blob from
Type and Designation and now get more accurate and useful data.

4. In cases with > 1 DM, check to see if one or more are stopped or disabled, =
and add (stopped) if it was detected in running service as stopped.

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

1. Reversed monitor ID and mapped: ID values, that was a mistake, the mapped:
item was supposed to contain the X.org mapped name, and the primary ID was
supposed to be the actual real ID the kernel uses. Not a huge deal either way,
but there it is.

2. Include disabled but connected Monitors. This works around nvidia bug showing
monitors disabled when they are enabled, but also allows for showing connected
monitors, though without as much data.

3. Made the last holdout -S > -Sa use strict full key: value pair output, like
Desktop: XFCE v: 4.14.12 and so on.

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

1. Added help/man for --edid info.

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

1. In ParseEDID: made new key: edid_error, which contains an array ref of 1 or
more edid errors. The previous version did a poor job and returned only the
first error found, so there could have been > 1 error, and you'd never know it.

This changes check_parsed_edid to _check_parsed_edid(). and adds a utility tool
_edid_error, which grabs the message from main::message, giving better output
integration.

This also allows for future error handling expansion quite easily.

2. In map_monitor_ids() fixed matching pattern, made more robust and explicit,
to catch things like s: eDP-1 d: eDP or eDP-1-1, both have been seen. Also added
fallback for single monitor, just map them to eachother if mapping failed.

3. get_pci_vendor() added test for using anything that is 1 character length,
to not break on 1 character length string matches.

4. Fully refactored --slots, that was originally written purely as a proof of
concept in terms of adding a new feature during the original inxi 2.9 rewrite,
and was never actually touched after that.
2022-03-24 11:45:05 -07:00
Harald Hope
cd1e29b0af Just as 3.3.10 > 3.3.11 were a huge set of CPU upgrades, including significant
internal refactors, so too is 3.3.13 a significant Graphics upgrade, featuring
significant upgrades to Wayland (and Xvesa/TinyX!) support, and allowing for
much more granular output controls. The legacy -Ga showing
Display/Screen/Monitors is now split apart, and can now work for some features
in and out of display.

This upgrade should be of significant interest to any Wayland using distro, as
well as the tiny Xvesa based distros like TinyCore, Slitaz, and Puppy.

--------------------------------------------------------------------------------
NOTE TO MAINTAINERS AND PACKAGERS:

If you had Cpanel::JSON::XS or JSON::XS Perl modules as dependencies, you can
remove those, inxi now can use JSON::PP, which is in Core Modules since Perl
5.14 (unless for some reason your distro removed that module from Core Modules).

Basically inxi will simply look for whichever of the 3 is installed, and use
that one.

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

1. The free drivers for xorg like amdgpu, modesetting, alter the the internal
kernel IDs for monitors/gfx device ports, which is somewhat bizarre since the
ideal role of any ID is to be an identifier that always works. Due to this
situation, inxi has to map the kernel ids to the x driver monitor IDs in order
to show the advanced monitor data, like model: mapped: and modes:. This may not
always work as expected since if the mapping fails, the data will fail to match
to the monitors. While not enough data is in to make any conclusions, hoping
that this issue does not exist on Wayland compositors.

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

1. Not sure if this was a bug, but I believe RAM vendor ID matches would never
have generated results, and might have generated errors. That's corrected as
part of Code fix 1.

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

1. Tiny indentation level issue, for -Ga, Monitor was not set to be a container
for its data. This would only impact -y 1 or json and xml output cases, and would
be subtle, but it was an oversight.

2. Small fix for monitor dimensions, failed to switch the mm dimensions for
monitors placed in a vertical, portait mode, instead of standard landscape mode.
Now switches mm x and y if that is detected, which corrects dpi as well.

3. For Xvesa:

* Show vesa as display driver, Xvesa == vesa, dugh,lol.

* Show better Interface and Screen resolution data missing messages.

* See FIX 5 for adding in display-ID:.

* Show TinX Xvesa string for server data, not just Xvesa.

4. For Wayland, which currently has no EGL support in inxi, if no glxinfo
present, show EGL Wayland specific Messsage: for advanced EGL data, not the
generic glxinfo that were shown previously.

5. Display was relying on xdpyinfo or a Wayland environmental variable to set
display-ID:, now falls back always to $ENV{DISPLAY} if nothing else was found
and that exists. I hadn't realized how much was depending on those x tools,
which many people never had installed in the first place. This also supplies
that for Xvesa as well, which has features that need the Display-ID to use.

6. Intel family 6, model 17h, supposed to be yorkfield, was penryn, fixed.

7. Small fix for remove_duplicates, it was not case insensitive so missed things
like DELL Dell in strings.

8. Failed to detect or get Xfree86 X server version number.

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

1. Extensive Graphics Upgrades:

* -Gxx Devices: For some gpus / drivers, show vram total and used for -Gxx.
amdgpu supports this, I believe it's the only one, but don't know for sure.

* -Gxx Devices: (Linux only): Show active, off (connected but disabled, like a
closed laptop screen with attached moniitor), and empty ports on devices. Not
tested for USB yet.

* -Gxx Devices: Show device ports (like VGA-1, DVI-I-1, HDMI-A-1), active, off
(off is connected but disabled) and empty (linux only).

* -G Display/Screen: Removed strict dependency on xdpyinfo to show advanced xorg
screen and display data. Now it will show most of the data if xrandr is
available, and all if xrandr and xdpyinfo are installed. More granular error
messages as well.

* -G Wayland Display: new type, d-rect: for > 1 monitor Wayland display layouts.
Works roughly the same as Screen: s-res: does, except since Wayland has no
'Screen' concept, that goes into Display. This is sort of a rough algo,
basically it takes either the dimensions of the total of x and y resolutions, or
the greatest x or y resolution found for any monitor, whichever is greater, and
uses that to create the display rectangle resolution composite value.

* -G Display, Monitors: Extended display tool options from just xrandr to
swaymsg, wlr-xrandr, weston-info, wayland-info. Still nothing on kwin_wayland or
gnome-shell and mutter data.

*. -S, -G: compositors, full redo of list, now supported:

asc awc cage cagebreak cardboard chameleonwm clayland comfc dwc dwl epd-wm
fireplace feathers fenestra glass gamescope greenfield grefson hikari hopalong
inaban japokwm kiwmi kwinft  labwc laikawm lipstick liri mahogany marina maze
motorcar newm nucleus orbital perceptia phoc pywm qtile river rustland simulavr
skylight sommelier sway swc swvkc tabby taiwins tinybox tinywl trinkster velox
vimway vivarium wavy waybox way-cooler wayfire wayhouse waymonad westeros
westford weston wio+ wio wxrc wxrd xuake

* -G Enhanced Interfaces/GL item, previously only type OpenGL forX, now has:

  * X - OpenGL, requires glxinfo , same as before.

  * Wayland - EGL, currently no tool available, stub in place. Allegedly this
  data can be found but have no idea how or if a tool does that yet

  * Xvesa - Interface: interface type (VBE/GOP). GOP not confirmed, no data
  samples; v:, source:, dac: (no idea what it is, show it though), controller:,
  and ram: items.

  This is based on TinyX/Xvesa as found in TinyCore, but should work in Slitaz
  and Puppy TinyX as well if those projects are still around.

* -G Display/Screen/Monitor data: Created structures and abstractions that allow
for Wayland/Xorg/Xvesa data, most new features will work with any of these. Or
Arcan, if that actually makes it, and we get data for it. We'll wait on Arcan,
heh.

* -G Display server: For Xvesa, added type TinyX to server if detected. Added
Xwayland, which was not handled previously. For Xwayland, if wayland running,
and if Xorg also installed, shows:

  server: X.org
    v: 1.20.14
    with: Xwayland
      v: 21.01

Otherwise shows:

  server: Xwayland
    v: 21.01

* -G Compositors: fixed a long standing weak spot, if > 1 compositor detected
running, not common, but could happen, shows all detected compositors.

  Display: x11
    server: X.Org
      v: 1.20.13
    compositors:
      1: Mutter
        v: 41.1
      2: xfwm
        v: 4.16.1
    driver:
      X:
        loaded: modesetting
      gpu: radeon

* -G drivers: now shows if X or gpu driver, in each its own section. This makes
it more obvious what is going on:

  Display: x11
    server: X.Org
      v: 1.20.13
    driver:
      X:
        loaded: modesetting
      gpu: radeon
    resolution:

* -Gxx Monitors: Show primary monitor with pos: primary,right. Uses either
xrandr 'primary' value, or if no 'primary' found in an Xorg Screen, uses +0+0
positioned monitor. Position is based on the row and column number in the
rectangular grid of monitors when monitors per Xorg Screen are > 1.

For most common multi-monitor layouts, text positions are used, which are in
general more clear and easy to understand than their internal numeric
counterparts, that is, unless the layout is too complicated, it will show left,
or top-left, instead of 1-1, and so on.

Text mode positions are available for the following grid styles currently: 1x2,
1x3, 1x4, 2x1, 2x2, 2x3, 3x1, 3x2, 3x3. 'top' means the top row if > 1 row,
'bottom' means the bottom row, 'middle' is the middle row if 3 rows, 'left' is
the first column, 'right' the last, 'center' if 3 columns, and 'center-l' (1-2),
'center-r' (1-3) are the 2 center columns if 4 columns. 'bottom-l', 'bottom-c',
'bottom-r'; 'middle-l', 'middle-c', 'middle-r'; 'top-left', 'top-center',
'top-right' complete the possible values.

If the grid of monitors is greater than the supported rows or columns, it will
switch to numeric row-column mode, with column-row numbering starting at 1-1,
top left.

* -Gxx Monitors: show (if detected, Linux only) monitor model, and if the
display ID (from Xorg or Wayland) is different from the /sys monitor ID, show
mapped: to show the /sys id.

* -Gxxx Monitors: show modes: max: XxY min: XxY, or mode: XxY (if only 1 mode
found). Shows hz:

* -Ga Monitors: shows serial, built year, gamma, ratio, if detected.

2. Added impish 21-10 and jammy 22-04 to ubuntu id. That's for Mint base ID. Not
huge point in updating if Mint doesn't update inxi, but there it is.

3. For -Axx, -Exx, -Gxx, -Nxx, shows PCIe speed and lanes. With -a, shows max
speed / lanes if different than current speeds/lanes. Note that for unknown
reasons not all devices in a PCIe slot show this data.

4. -Ixx: terminals added: foot, ate

5. -Sxx: login/display managers added: emptty, greetd, qingy, tbsm. See CODE 5
for more info on how this change was done.

6. -Sxxx: status/dock/panel bars added: i3-status-rs, luastatus, nwg-bar,
nwg-dock, nwg-panel, rootbar, sfwbar, wapanel, waybar, yambar

7. Added a Tyan board IPMI sensor data set.

8. Added support for fruid_print for Elbrus -M Machine data. Those boards don't
have dmi tables, but do ship with Elbrus OS which has fruid_print.

9. More disk vendors! Yes, you know the drill, the world turns, and with every
turn, a flock of new vendors appears, like baby rabbits emerging from their
warren, endlessly, a stream that is the life essence itself... or something.

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

1. When xdpyinfo is not installed, user will still see advanced -Ga Monitor and
Screen data as long as xrandr at least is installed. Better error messages as
well now to explain which tool or tools missing caused the missing data.

2. -Gxx will show basic Screen and Monitors, id, mapped, pos:, model, res, dpi,
diag; -Gxxx adds Monitor modes; --Ga adds screen/monitor size, Screen diag.

3. -ba/-v2 no longer show the full screens/monitor report, now it remains basic
mode output, which it should have always done, unless -G is also explicitly
added.

4. Split apart x-server version to v:, which should always have been the case.

5. Xvesa and Wayland no longer show glxinfo messages for no glxinfo for GL data.
Now they show their own custom messages, appropriate to the case.

6. json features now test for JSON::PP, JSON::XS, or Cpanel::JSON::XS modules,
and use whichever is found. Note I did not realize JSON::PP was in core modules
as of 5.14 so that makes sense to use, and will allow inxi to start using json
data sources, which are a lot easier to parse.

7. Changed -G drivers to show subsections for X and gpu drivers, and updated
missing driver messages to account for this change. X drivers now show the sub
sets of loaded/unloaded/failed/alternate, and gpu shows active gpu drivers,
assuming such are detected.

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

1. Help and man page updates for -G Display/Screen/Monitor changes. Redid -G,
-Gx, -Gxx, -Gxxx, -Ga. Added monitor layout position feature.

2. Updated -Ga for xrandr/xdpyinfo changes.

3. Updated --recommends to more accurately show function of xdpyinfo and xrandr
for -G and -Ga.

4. Reorganized and added complete table of contents to docs/inxi-data.txt

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

1. Slightly optimized use of array loads on disk_vendor() and ram_vendor() based
on how it's now done for monitor layouts, which is more efficient, use a scalar
to hold a reference to the array, that avoids having the array ever exist in
more than 1 place. Part of the ongoing process of avoiding extra hash and array
copies globally.

2. Moved to consistent undef behaviors.
 * For lists of variables use () to undefine, changed all of the the following:
    1. (@a,$b,$c,%d) = (undef,undef,undef,undef);
    2. (@a,$b,$c,%d) = (undef);
    3. (@a,$b,$c,%d) = undef;
   to use: (@a,$b,$c,%d) = (); This undefines all the variables in the list.
   Note that assigning undef to @a in the first example creates an array of 1
   key, with the value undef, and (@a,@b) = (undef,undef) creates arrays of 2
   indexes, or something like that. Not what was wanted.
   Examples 2 and 3 assign undef to @a: an array of 1 index, value undef, and
   undefine the others variables in the list. This was not the desired behavior!
 * For most scalars, arrays, and hashes, use: undef @a; undef $s; undef %h.
 * For some hash and array index values, use $h{a} = undef. These cases may want
   the key itself to exist, with the value of undef, though I believe:
    undef $h{a};
   is synonymous, but still have to verify that.

I did some testing, and realized that some of the undef I had used in the
various previous ways of using undef were not actually resulting in the expected
behaviors.

3. Refactored display_data_x into 3 functions, added display_data_xdpyinfo and
display_data_xrandr, which allows for more granular handling of those
dependencies, now inxi can show most advanced display data with only xrandr
installed.

4. Significantly improved all error handling and missing data for Wayland/Xorg.

5. Refactored get_display_manager() to better handle corner case dm file or
directory names, and to avoid endless loops. Much cleaner now. Required because
greetd had varying file names, greetd.run, or just greet-546.sock. With some
other dm's that use similar, or unreadable directories in /run, now just doing
a glob of /run/ /var/run, /var/run/rc.d as detected and checking for the dms
in the names, then just using the dms that were found. Simpler.

6. Massively simplified and integrated compositor logic in Graphics, now using
program_values() and program_data() as appropriate, and simple matching list
to ps_gui data to get detected compositor[s], much simpler, far more efficient
code, less to maintain. Also fixed long-standing weak spot of exiting on first
detected compositor, now shows all detected, with version etc for each if
available.

7. With 6. also significantly simplified and optimized get_ps_de_data() for
desktop data, that's the ps aux fallback case for wm desktop detections.

8. Made $wl compositors list global to avoid having to update each section,
that's now used in -G compositor, -S desktop/wm, and wm sections. It is set
in ps_gui() on initial load.

7. Settled on one and only way to do multiline conditionals, now use no space,
use same indent level as starting if/elsif etc. I've been debating this one, but
can't find any real way to handle that elegantly so I think best to just not
try, and leave it up the code flow to show when it's wrapped condition tests.

8. Refactored previous gl_output, expanded it to handle all interface types,
OpenGL, EGL (not currently active due to no known tool to get EGL data for
Wayland, and Interface: VBE type data for Xvesa. This roughly completed the
breaking apart of the X.org centric logic for Display, Monitors, and GL data,
and make all sections now fully agnostic to display server or protocol type.

Should new display servers appear, it will now be far more simple to add support
for them, since they would just plug into the existing abstraction layers.

9. Added --debug-arg to allow for passing specific custom args to the debugger.

10. Refactored display_server version, now works much better, creates lists of
server/version, and xwayland as well if found.
2022-02-22 15:58:37 -08:00
Harald Hope
1da75146cc Small point release with some useful fixes, some bugs corrected, small
enhancement.

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

1. Note on KNOWN ISSUES 2 from 3.3.10, I realized that the second level
indentation actually takes care of that hanging parent, since now it's quite
clear that its children are indented on the following line. So that issue took
care of itself.

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

1. In $bsd_type cases, specifically SunOS triggered this, where sysctl was not
present (which it always is in all other BSD types), it tripped an error due to
failure to update to revised $alerts{'sysctl'}->{'message'}, instead was using
the old method. Failed to update that in refactor of CheckTools logic. Would
impact no supported operating systems, but is a bug.

2. Corner case, a combination I never used, inxi -a, triggers error in the RAID
logic because the mdadm test was not run, generating an undefined eq error. Only
happened when mdraid was present and used on system.

3. Tiny bug, for st+mt cpus, like alder lake,  was printing out second tpc by
accident which made it look like it said st: 4 tpc: 2. Just a small output
glitch.

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

1. Added some fallback 32 bit system tests, [2345]86, like i386, i686.

2. Changed shell: Unknown Shell to shell: N/A, that was a legacy use, and was
obviously redundant. N/A is more consistent with rest of output no value found
handling. Due to requirement of doing empty tests, this is set in the data, not
output, generator component.

3. Refactored partition data logic to get rid of bsd tests for df -kTP, -kT, -k.
Now tests only to see if returns data, cascades down until it gets something.
Now will attempt to reconnect hanging lines when no -P feature available prior
to main partition data processing. This makes it agnostic to os issues, and it
just pays attention to feature support.

Also adds in dynamic column count instead of hard-coded, this avoids oddities
and future proofs to some degree. Now systems will adapt seamlessly if support
for -P appears, or -T, or whatever.

4. Partitions corner case, where has zram, but has no partitions, failed to show
partitions no data found message since @partitions had data in it, but nothing
for partitions output to print. Seen in TinyCore for example, but might happen
in other ram based systems.

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

1. Added Slint to distro ID, and slint/slackware to system base.

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

1. None

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

1. Typo in man page fixed.

2. A few more edits and corrections on 3.3.10 changelong. That thing was written
concurrently with the development, and thus had lingering errors when things
were changed in midstream.

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

1. Added --cygwin and --android fake system type flag. Switches on $b_android/
$b_cygwin flags.
2022-01-18 14:08:04 -08:00
Harald Hope
ec8ab3c213 Quick bug fix release. With as many changes as we got in 3.3.10, there were
bound to be a handful of oversights that were not caught in testing simply
because those hardware scenarios were not present in the tested systems.

Also minor feature enhancement for CPU scaling min/max speeds.

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

1. Due to the huge amount of changes, and the speed of change, while the new
code is working as intended, it's somewhat lacking in coding elegance since a
lot of it was hacked out very quickly, in near real time. This will get cleaned
up and refactored to be less redundant if it does not impact execution speed,
but is not pressing since there should be no functional difference.

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

1. Tiny oversight, in single case CPU model id would fail because it was using
an undefined test from previous tests, not the right test, that is. Tripped
error on Elbrus for example.

2. Typo in battery secondary type status, created undefined value error. This
was I believe an older bug.

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

1. PPC revision change broke Elbrus revision test for stepping. Added in more
tests to show stepping for elbrus revision.

2. Single core Elbrus in cpuinfo fallback mode failed to assign core multiplier
so L1 cache failed.

3. In cpuinfo fallback mode, Elbrus E2C3 cache data failed to appear, that data
in not per block in cpuinfo, but is the last block, so those tests had to run
on each block, not just the first one.

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

1. Show for -Ca scaling min/max speeds if different from CPU min/max speeds.

2. If no cpuinfo_min/max_freq speeds found, and scaling_min/max_freq found, set
overall min/max to use scaling min/max instead of cpuinfo min/max.

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

1. None.

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

1. Cleaned up and proofread better 3.3.10 changelog, it had a lot of errors
because stuff kept changing.

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

1. Small code optimizations.
2021-12-16 16:17:02 -08:00
Harald Hope
c3d0e551a4 lintian edit 2021-12-14 10:42:16 -08:00
Harald Hope
4c3ab65d46 Huge refactor of CPU physical/core/cache logic. That was some very old logic
with a lot of hacks and patches, but it had never been actually rewritten to
take advantage of Perl's far more powerful and robust data structures and logic.
This caused a continuous stream of error cases in subtle ways, or not so subtle,
and fixes were just changing how the errors manifested.

Tnanks very much to linuxquestions.org Slackware forum people for massive help,
and also to linux.org forum members for ongoing help and data and debugging.

Note Changes 5, change of default widths in display to 80 columns, and out (aka,
console, or ssh into remote system), 100. You can still use other widths if you
like something wider using the configuration options shown. Also upped max
columns wrapping line starters to own rows to 110 columns from 90, again the
idea being to make output more readable to other users when posted in public.

I've been thinking of this change for a long time, but was hoping -y would
register with users, but it hasn't gained enough traction, so the result is way
too many super hard to read issue reports, forum posts, linux kernel issues,
etc, it's honestly gotten sort of embarrassing because they make it look like
inxi has bad output. Sidescrolling code blocks in forums in particular are
absurdly hard to read and scan rapidly for data.

Going along with the width and indentation changes, for most main row types, if
they wrap to a second row, they are further indented 2 column2, to make it
easier to see what they belong to. The two levels of indentation contain more
useful visual cues as to what belongs to what.

There was a temptation to release this as either 3.4.00 or 4.0.00 but in the
end, I decided to follow the numbering rules, and to just roll it to 3.3.10
since there aren't really any primary new features even though CPU was basically
rewritten in large part, and big parts of inxi were also changed, upgraded, and
enhanced. But no truly new features, just some display control items like -Y,
--indent, --indents.

I hope this refactor meets its primary goals, and that the new defaults for
display help resolve public posting issues which have grown increasingly
annoying for anyone trying to read those pasted in too long outputs.

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

1. Android seems to have CPU cache data, but does not show any 'size' item. But
it does have the other data for each cache type internally, which is odd.

2. In some instances, the parent key:value pairs with '' as value, those are
parents of children key:value pairs, are left hanging at end of line, with the
children on the following line. This can look awkward, but in other cases,
actually looks very good, it depends if it's at the start or end of the line.

I won't say this is not correctable, but it would be very difficult, and outside
the scope of this release, but that is something that I may look at for a future
release now that the output generator logic was reworked slightly for Change 5b.

It's tricky though, because in cases where it's the first item on the line, you
want that behavior, but when it's last, you don't. But this may be worth
revisiting in the future.

3. In some cases, -Y + -y1 may lead to the start of the block scrolling off the
top of the visible screen. This isn't really correctable, so if that's an issue
for you, just don't use -y1 with -Y and all the output will wrap nicely.

4. There is an unaccountable ~10-20ms delay reading cpufreq/scaling_cur_freq,
per thread/core, which really adds up on high thread count CPUs. There is a
workaround in inxi to use cpufreq_cur_freq if it is readable, ie, if you are
root or use sudo, but to fallback to scaling_cur_freq if can't read cpuinfo_...

This is a drag, and really looks like a kernel bug, or a frequency driver bug.

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

1. 3.3.09 and 3.3.10 CPU bug fixes:
* Failed to filter out certain virtual machine CPU core speeds, and showed more
speeds than the instance actually has. Noticed this with KVM running on Xeon
CPUs.
* For many cases, L2 cache, particularly for Intel, was completely wrong, it was
showing L3 caches, or L3+L2. Failed to handle cases where L2 cache belongs to
more than 1 core, except for using a crude hack for AMD Bulldozer microarch.
Older Intel Core 4 core CPUs would sometimes be 1 L2 per die, and the 4 cores
were actually 2 core duo cpu dies, with one L2 cache per die.
* Shows wrong core count for complex core complexes like those found in Intel
Alder Lake, now shows correct count of actual cores, regardless of the MT or ST
state of each core.
* Showed invalid L3 cache values in some legacy cpus that had no L3 cache, that
is due to a bug in the dmidecode data itself. Solution is to never use dmidecode
cache data if any other valid L1, L2, or L3 cache data found for Linux, and to
only use dmidecode data for bsds if no L1, or L2, or L3 data found. Or if forced
with --dmidecode.

2. An unfortunately long standing bug found and fixed, thanks slackware users!
cp_cpu_arch was, and has been for a while, failing to convert hex stepping to
decimal, or test if the string it gets is even a possible hex value, this
resulted in all Intel CPUs with stepping > 9 failing to ID correctly for cpu
arch.

3. In a related bug, hex to decimal tool used to create --admin hex/decimal
output for family/model/stepping was also not testing if the string was an
actual valid hex number. Case in particular, power pc with revision field
contained a long string, which was of course not a valid hex number, and that
tripped a Perl error when it was asked to convert a non hex string to decimal.

4. Long standing bug found while doing Change 5: inxi actually never applied
separate in/out of dispay to widths because using a legacy boolean that was not
updated, so it was always using out of display widths.

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

1. Incorrectly calling PowerPC 'revision' 'stepping' for -Ca, that is now stored
as $cpu{'revision'} to avoid mixing up the logics there. For PowerPC shows as
rev: [string].

2. Microarch:
* AMD family 15, model 2 as bulldozer, actually piledriver.
* AMD family 17, model 18, was supposed to be zen/zen+, since I can't tell those
apart, seen stepping 1 is zen+, but had incorrect match.
* Intel family 6, model 25, stepping 2 as nehalem, should have been westmere.
* Changed Penryn to Core Penryn, intel family 6, model 17
* misc other micro arch fine tunings.

3. Code fix 8, switched to global %risc for arm, mips, ppc, riscv, sparc. This
corrects many sloppy handlers, and makes all risc processing the same, and calls
device tree readers for all risc systems, not just arm or arm and mips.

4. In cases where bogomips were 0 due to false values in risc results, show N/A.

5. Removed all attempts to guess at what /proc/cpuinfo cache size: refers to,
it can literally be anything, a per core L1, a per core or cpu L2, or an L3.
So applying any math to it is just a random guess at that point. If any L1,2,3
cache data is found, don't use the cache: value at all, but that will only be
present if no /sys data was found anyway, and if cpuinfo had no specific cache
type fields, only generic cache.

6. Added failsafe tests for stepping and model id before doing conversion to
hex. Make sure integer!

7. Added L1 D cache, was only using I cache for BSDs. Output will show total for
L1 A + L1 D. No idea why I didn't use L1 D, makes little sense, but that's how
it goes.

8. Made bogomips tests more granular, now only rejects low sub 50 bogomips
values if %risc cpu type. Legacy ancient cpus like 486 could and did have
bogomip counts below 50.
https://tldp.org/HOWTO/BogoMips/bogo-list.html

9. See Enhancement 12 as well. If OpenBSD, which has no per core data or
physical cpu data, is running on MT capable cpu, but for security OpenBSD has
disabled MT, will now force MT to be not shown via the hw.smt value. This
removes a small glitch that would have bothered OpenBSD users who know that
OpenBSD has disabled MT for security purposes.

10. Changed BSD hack to use L2 cache totals to deduce > 1 physical cpus, that
was flat out dumb, since we can just use dmidecode type 4 to iterate physical
cpu counts and skip the pointless logic. Thus, if dmidecode, and if > 1
dmidecode type 4 found, and if physical cpu counts equal 1, then replace the
found counts with the dmidecode physical cpu counts.

11. Corrected bad assumption that threads would always be 2 per core for MT
tests. Still no way to reliably determine threads per core for non x86 cpus like
powerpc however, but those are very fringe and should rarely be an issue since
that data is only missing on very old linux now I think.

12. Fixed 'parameters:' going to its own line with -Sa, that wasn't supposed to.
-S is two lines, the kernel / host stuff, and the desktop/console/distro stuff.

13. Fixed case when key: value first word plus other parts of line longer than
max width, failed to wrap as expected.

14. Added start/end ' and " start / end \s to main filters.

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

1. CPU: most Linux will now show L1 and L3 cache with -Cx without needing
sudo/root, and it will be more accurate than ever before.

2. CPU: shows per CPU L1/L2/L3 totals, and shows actual full system physical
processor count * L1/L2/L3 total in parentheses, like: L2: 1.5 MiB (3 MiB).

3. CPU: A long standing annoyance, previously for main CPU 'Speed:' item, showed
the fastest core speed found, now shows avg: [speed] and with -Cx, shows the
'high:' as well if > 1 cores, and if 1 or more cores have a higher speed than
the other(s).

4. CPU: Handles advanced cases of new architectures, like Alder Lake with
Performance and Efficiency cores, future Zen, and existing ARM CPUs with 2 or
more different core sets, with different max/min frequencies. Previously a hack
was used to handle only ARM CPUs with this type of architecture. Will show
correct CPU core counts, which previous inxi versions would fail to do for Alder
Lake type scenarios of 8 single threaded CPUs and 4-8 multithreaded )MT)
perforance cores.

This should also in theory show different the different min/max speeds if they
were detected. Those did not seem to be set correctly in Alder Lake sample data
I saw however, P and E cores were set to the same min/max speeds.

5. Added CPU types MST (Multi+Single Thread), AMP (Asymmetric Multi Processing),
and AMCP (Asymmetrical Multi Core Processor). This will be applied to any CPU
that has this type of complex topology that has been dynamically detected, like
Alder Lake or different core count or min/max speed RISC CPUs.

6. CPU: shows with -Ca for cases where different L1/L2/L3 caches found per
physical CPU, as with Alder Lake, but also many other variants that were poorly
or not at all handled before, how many of each cache type (L1 Data, instruction)
were found, otherwise will show how many of each cache were found.

7. CPU: shows with -Ca in Topology: report, for cases like Alder Lake with
different core types in one physical CPU (type: MST AMCP), the number that are
single threaded (st) and number that are multi-threaded (mt).

8. Basic support for rsyc-v systems, going along with code fix 8, fix 3, now
it's easy to add this type of support.

9. Added shortcut options for --filter-label (--zl), --filter-uuid (--zu), and
andded new filter option, --filter-vulnerabilities (--zv). The latter is added
by request, a decent idea to have option to not show cpu vulnerabilities.

10. Going with fix 7, switched to a sort of pseudo L1 d/i with desc report for
any BSD with L1 I/D cache found, or elbrus cache0 (icache) / cache1 (d cache).
Elbrus should hopefully be handled by the /sys tool. Guesses on the L1 are ok,
since those are almost always per core, so it's fine. Didn't expect to enhance
any BSD cpu data this time around, but there you go!! If they have the data,
then it will be used. Not going to go overboard though in that, quite useless
overall since usually can't see how many CPUs are present, at least not usually.

11. For -Ca, full CPU topology report if any complex topogy is detected,
otherwise shows the same basic Info: 2x 6-core or Info: dual core as before, no
point in wasting a line for something with no more data than the short string.
Complex types include MT CPUs since they will have different thread counts etc,
and will have 2 or more threads per core, which will also be listed.

12. If smt status is defined (0/1), shows smt: enabled|disabled in Topology
section, can be useful for systems with disabled MT, but supporting it. If no
topology data found (OpenBSD for example), for -C shows 'smt: disabled' after
'type:' section, and enabled if -Cxxx (since MT really already tells you that).

13. For -Ca Speed: report, added 'governor:' item, if found. Can show 1 or more
active governors.

14. Output height (in lines) control: -Y [-2|-1|0|1-xxx]]. This lets you break
up any of the output into whatever number of lines you want. Also useful out of
DISPLAY for reading -h options menu items etc.

It came tp my attention that the long standing shift+pgup/pgdown (aka
'softscrollback) behavior had stopped working, and in fact has been removed from
the current Linux kernel, at least until it is rewritten to be more clean and
understandable. Read more about it in these kernel post/commit messages:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=50145474f6ef4a9c19205b173da6264a644c7489
https://lwn.net/ml/linux-kernel/CAHk-=whe4ZdTdCebneWqC4gSQZwsVJ5-Emg0BucOGCwPhOAJpw@mail.gmail.com/

Options for -Y are:
* -Y 0 or -Y: Set maximum block height to terminal line height.
* -Y [1-xxx]: Set maximum block line height to given integer.
* -Y -1: Print out one primary data block item at a time, with -F for example.
* -Y -2: Restore default unlimited height if LINES_MAX configuration item used.

15. And finally, more disk vendors/vendor ids. As usual. As expected.

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

1. If /sys or /proc/cpuinfo speed data available:
* For -b CPU item:
   speed: [speed MHz] min/max: [min]/[max] MHz
  becomes:
   speed (MHz): avg: [speed] min/max: [min]/[max]
* For -C, Speed item
   Speed: [speed MHz] min/max: [min]/[max] MHz Cores (MHz): ...
  becomes:
   Speed (MHz): avg: [speed] min/max: [min]/[max] cores: ...
* For short form, shows speed/min/max but uses average speed if available.

For -b and -C, only shows one MHz in Speed line starter, which slightly shortens
the line even with the added 'avg:' item since 3 MHz are replaced with 1.

2. Going with change 1, now the 'avg:' item shows not the fastest cpu speed
found, which was the case before, but shows an average of all cpu speeds found.
Showing the fastest made some sense back in the days of single core, or even
dual core CPUs, but makes little sense today with many core/threaded cpus.

With -x, it will show the high: [speed] item as well, after 'avg:'.

3. By suggestion, wrapped first Type item in Vulnerabilities to its own line,
that's a verbose --admin option after all, no need to save lines!

4. Going along with Fix 5, give up on trying to pretend we can guess at L2
cache, now if only 'cache' data was available from cpuinfo, will just say:
cache: [cache size]
 note: check

and call it a day.

5a. Change default width to 80 columns, in and out of display. Too many users
are posting horribly wrapping inxi output in forums, issue trackers, etc, and it
frankly makes inxi look really bad, creates awful side scrolling code boxes,
etc. So now default widths in and out of console are 80 (since often data is
generated in SSH or out of X/Wayland) for issues.

This essentially makes -y 80/-y the default width. This is what I've been using
for a few years now, and after seeing far too many side scrolling or badly
wrapping inxi outputs online, I think it's probably time to just force 80 column
widths as default and call it a day.

You can change these new defaults using configuration options (these are the
previous options, though due to a bug, COLS_MAX_CONSOLE was never being used):

 COLS_MAX_CONSOLE=115 # in display, terminal client max width
 COLS_MAX_IRC=100
 COLS_MAX_NO_DISPLAY=130 # not in display, no X/Wayland running

5b. Changed output wrapped indent to 1 column from 2, and make second and
greater rows of a line indent +1 to make it more clear that it is a child row of
its parent row. Note that because no arg short form, -S, and -I are special
types of rows, this behavior is not used, they just print out as usual. This 1
column indent also applies to -y1, making for a little more data per line but
more readable and easy to follow.

6. If > 1 physical cpu detected, no longer uses single/dual/triple/quad core
strings, rather uses: 2x 2-core. Also uses lower case -core, not -Core.

7. Only show die counts for CPU (on rare occasions > 1 found) with -xx. Not
particularly important bit of data afterall.

8. Make L1, L3 cache data show with -Cx, not -Cxx, now that it's working well.

9. Removed CPU die for -Cxx, that's only going to show with -Ca now.

10. If -Ca, and if certain complexity conditions are met, shows a separate
Topology line rather than the Info: 6-core type item. For -b, short, -Cx, -Cxxx
shows the Info: topology short form.

11. Bogomips always shows before flags data, whether -f or just -Cx trips flag
output.

12. Flags/Features now shows in the same place, under Speeds: always, whether
-Cx shortlist, or -Cf full list. Makes more sense that way, and code is much
cleaner too.

13. Bogomips, being essentially bogus units of speed for cpu, are moved into
Speed: report.

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

1. Updated man/help for new CPU extra data options and output changes.

2. Cleaned up and added sample outputs for man CPU items.

3. Now that doas is getting into Linux distros, removed all mentions of doas as
a BSD option, and made it a general doas/sudo item. Glad to see doas making it
into linux distros, it's a good tool, much easier to configure and use than
sudo. Good job OpenBSD guys. Note that inxi already has had full doas support
for a while now, but this finalizes it, and makes it fully agnostic. Internally
doas is actually preferred over sudo, by the way.

4. Added documention items for INDENT (--indent), INDENT_MIN (--inident-min).

5. Re-ordered help menu and man page, created new Filters and Output Controls
sections to make stuff easier to find. In man page, also added on top a list of
OPTIONS sections to make finding stuff easier.

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

1. Removed legacy /sys cpu functions: cpu_bugs_sys(); get_boost_status();
set_cpu_speeds_sys(). cpu_speeds() is deprecated and now will only be used for
legacy Linux and BSDs if they had any per core speeds found; get_caches() was
only a placeholder for the full featured cpu_sys data source, and was removed;
cpu_speeds() no longer needed, integrated into other logic; cpu_dies_sys()
removed, integrated into other logic.

This logic is now integrated into cpu_data_sys() data generator.

2. Changed the main CpuItems functions to use array/hash references, not passing
full hashes or arrays in most cases now.

3. For machine_data_soc(), switched to CpuItem::cpuinfo_grabber() which then
sets the global @cpuinfo and %cpuinfo_machine items, which will be used again
in Cpu if cpu data is requested. This gets rid of a full parsing of cpuinfo
just to get the machine data section, and also makes it so cpuinfo in cpu does
not need to worry about the machine data block, which is not related to the
processor blocks anyway, that was always a hack done by the kernel guys to toss
that SOC data somewhere as far as I can tell.

4. New tools:
* either_or() - takes a list, and returns the first defined element of list.
* regex_range() - generate ranges from comma, space, or ranges like 2-29, or any
combination of those, like 3,6,12-29

5. Added --force cpuinfo to bypass all /sys based cpu logic, useful for testing
to see what would have happened using old logic.

6. Added --dbg switches 39, 40, 41, for the new cpu sys data features, also made
more consistent --dbg 8 and --dbg 38 switches.

7. Added sys/cpuinfo pair debugger to support debugging complex sys/cpuinfo
issues.

8. Got rid of $b_arm,$b_mips,$b_ppc,$b_sparc, replaced with global %risc, also
added $risc{'riscv'} type. this makes general risc type feature testing a lot
easier since inxi can either test for %risc defined, or for a specific type of
risc cpu. This is much cleaner, and use $risc{'id'} for print purposes, which
got rid of a lot of tests. Also made all risc tests consistent, some were ARM
only, or arm/mips, but were supposed to be for all risc cpus.

9. Set help menu code to roughly 80 columns width assuming 2 space tab
indentation.

10. Changed all xxx_cleaner subs to clean_xxx, all filter subs to filter_xxx,
and row_defaults() to message().

11. Dumped redundant fallback logic in get_kernel_bits, if first getconf method
fails, use $sys_bits, and call it good, it was repeating the 32/64 bit tests
pointlessly.

12. Cleaned up print_data() to allow for more fine tuned indentation for the new
2 indent levels.

13. Made help menu code more or less wrap to 80 columns, or close. Ongoing to
bring to 80 columns where practical, but never at expense of clarity or logic.

--------------------------------------------------------------------------------
-- Harald Hope - Tue, 13 Dec 2021 10:25:49 -0800
2021-12-14 10:35:42 -08:00
Harald Hope
2feaf0b853 Thanks manjaro user alven for finding a bunch of corner and not so corner case
errors, glitches, documentation oversights, etc.

This is a point release between the coming full CPU refactor and the current
set of bug fixes and issue handlings.

This release also contains the debuggers for the new CPU data logic, which are
important to get this CPU refactor stable and reliable across old/new systems,
different operating systems and platforms.

Wanted to do this intermediate releaase to get the current fixes out, which
make inxi overall better for CPU issues, but do not handle the core requirement
to do a full refactor.

--------------------------------------------------------------------------------

CORRECTION:

1. On release notes for 3.3.08: due to a long delay to get real debugger data
from the person who had the issue, but finally getting it after the release of
3.3.08, there was NO bug in ps wwaux output. Something else was creating the
linewraps, maybe the subshell, it's basically impossible to know since we never
got a real debugger data set, which is the only real way to get the actual same
data inxi will see.

Was it a subshell wrapping the output? We just can't know, nor are we likely to
ever find out.

This highlights very well however why some issues are essentially impossible to
ever fully resolve without the --debug 22 dataset. This bug/fix is definitely in
that class of issues.

It's never good to accuse another program of having a bug when it doesn't, so
sorry to ps authors, no bug or issue exists for ps in this area.

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

1. wiryonolau issue #259 points out that if --tty is used, default IRC filter
rule is still active and on. Because his case appears to be from an autostart
using Bash, which then gives up to find the parent at dash, which then makes
inxi believe it's in an IRC shell client, that issue doesn't appear to be
resolvable.

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

1. Documentation, help menu and man page showed wmctl instead of wmctrl,
which for someone who reads the help man, leads to command --fake wmctl failing.
Thanks manjaro user alven for finding this typo.

2. For dmidecode cpu data, had global total values for cache that could result
in wrong output values, 2x or more wrong for L1 / L3 cache on linux. Difficulty
is preserving that data for bsd, which in general do not show phys cpu counts,
and thus make showing totals off. Created new '-total' item for each L cache
type, which will handle > 1 cpus, and also can be used to determine if > 1 cpus
present!.

3. Manjaro user pointed out that hub types were wrong, this is because inxi was
using the INTERFACE ID values for hubs instead of the TYPE values. For all other
device types, INTERFACE is correct, but for hubs, we needed TYPE, so fix is to
detect INTERFACE 9/0/0 and if TYPE present for that, swap.

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

1. For > 1 cpu systems, with dmidecode sourced cpu cache data, can now determine
physical cpu count based on comparing L2 and L2-total values. This means that
when dmidecode is used on BSD for CPU data, inxi may now be able to deduce that
it is a > 1 cpu system.

2. Forgot to set $run{'filter'} to 0 for whitelist start client detection.

3. Going along with bug 3, changed 'Full speed (or root) hub' to:
Full speed or root hub, to make more clear that it's one or the other, or both.

4. For apply_filter(), added test if <superuser required> just return the
string.

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

1. Going with bug 1, and fix 1, for > 1 cpu systems, will now show for all
cache: items L1: 2x 1.5 MiB (3 MiB), same for L2 and L3. This is far less
confusing than showing the totals without explaining what they are.

2. Going along with 1, now root is not required to show L1 and L3 -Cxx on Linux
as long as the system is reasonably new, about after 2008, and has getconf -a
supported. That support is came in somewhere around 2.10, not sure exactly when.
Debian Etch had it, Sarge did not, Ubuntu 9.10 had it. Tinycore does not have
getconf at all. This will probably be replaced by a more robust full cpu /sys
data tool.

3. Added ht to default short -Cx flag list, that should show, and it's short.

4. Added --no-filter to activate -Z, --filter-override isn't consistent with
other --no-xxx options, even I forgot it. No changes, just another way to use
-Z.

5. For issue #260 added pch as a new sensor output type, it's kind of a builtin
southbridge / northbridge in the CPU die, but it's not a core, and has a
different temp. Will anyone even know what pch is? probably not, but who cares.

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

1. No longer showing for > 1 physical cpu systems the sum total of L1/2/3 cache
data. Now shows per cpu L1/L2/L3, and if > 1 cpu, shows for example:

cache: L1: 2x 512 KiB (1024 KiB) L2: 2x 2 MiB (4 MiB)  L3: 2x 20 MiB (40 MiB)

For single physical cpu output remains the same:

cache: L1: 576 KiB L2: 3 MiB L3: 16 MiB

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

1. Updated help/man for L1/L3 cache -Cxx changes.

2. Updated man and help to suggest -Z for --tty.

3. Forgot to note -v 7 adds -f, added to man/help.

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

* Added 'getconf -a' to debugger, that may be usable for cpu cache data, need to
gather data on that to confirm. that's regading issue #257 cache glitches.

2. Removed all * $physical_count for cache data in cpu_properties, that is now
handled by creating string with cpu count, per cpu caches, and total in parens.

3. Added in fallback failure case for the ZFS file system issue exposed by
accident in issue #258 - will now log in debugger the error, so we can try to
find what is going on there, impossible to reproduce until we find what zfs or
more likely, freebsd, changed there. Could be hyper specific, some weird thing
like a person making a zfs device name with space, impossible to guess. Note
that since the freebsd user declined to supply any data to help resolve this
issue, then closed it, we're back where we usually end up with FreeBSD issues,
either a Linux user (or worse, me) willing and able to find the issue and supply
the debugger data required shows up, OR the issue is ignored as valid but
impossible to resolve.

RANT: Note that this also confirmed to me that in order to preserve my own
sanity and not waste endless hours trying to get data, from now on, unless
utterly trivial, if a FreeBSD user refuses to promptly supply the required data,
the issue will be closed with a freebsd-closed-no-data-supplied label, which
means, valid but not possible to solve due to user refusing to help me help
them.

Come on FreeBSD users!! If you want help, and inxi to support your distro, help
me help you!! If not, then why are you even filing an issue in the first place?
Do you expect faeries to spread magic bug / issue fixing faerie dust over inxi
and then activate it with their little wands? This is growing tiresome to be
honest because it's so utterly predictable.

4. Shuffled order of sensor type detections, there was a slim chance that a non
gpu sensor type could have string intel in it, so put the gpu sensors second
to last, before 'main'.

5. Started refactor of cpu core/cache logic. Added feature to cpu_arch, and
changed it to cpu_info since now it gives by vendor/family/model/stepping both
micorarch and cache/core math array returns. Also started refactor to make more
predictable, with increased comments, about what is going on in cpu_properties
to avoid breaking existing correct results.

6. Added to --debug /sys cpu data globber tool, that will help debugging the new
/sys cpu data feature, will let me insert the file data directly into the logic.

7. Added CpuItem::cpu_data_sys() with debuggers, that will now start collecting
user cpu data whenever the debugger is run, though it's not active yet.

8. Set $Data::Dumper::SortKeys = 1; dugh, could have saved big headaches if had
found this before. Makes all keys sorted cleanly, gets rid of random hash sorts.
2021-11-22 12:47:54 -08:00
Harald Hope
385e91e602 Bug fix release. 2 bugs that can impact all users under the right circumstances
were detected and fixed. Thanks manjaro users there for finding and reporting
those. No other changes.

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

1. Manjaro user ben81 located a critical bug in hardware raid output, this bug
impacts ALL users of hwraid that run inxi with -xx option. Bug was a bad copy
paste, the classic, had updated all the pci type data blocks at once, and hw
raid unfortunately had a slightly different logic due to being part of the more
complex RAID block of logic. Was trying to use an array, not a hash, reference.

Thanks ben81, I would never have spotted this one, and it would impact 100% of
all inxi users with hwraid on their machine who ran inxi with -xx option.

2. Also, ps wwaux parser was spitting out an undefined index error. This is
caused by one of two things:

* ps has an issue, and is apparently at times failing to respect ww, unlimited
line length, and wrapping anyway. This is the likely cause.
* the user terminal for some inexpicable reason has decided to hard wrap long
lines. This is very unlikely, but has to be considered as a possible cause.
Since these commands run in a subshell, this is VERY unlikely.

Workaround this failure by double checking that line split item is defined, if
not, next row. Thanks Carpenter for finding that one.

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

1. Added workarounds for bug 2. Corrected silly copy/paste error for bug 1.
2021-10-21 12:26:48 -07:00
Harald Hope
a6c1c46db2 --------------------------------------------------------------------------------
RELEASE NOTES:
--------------------------------------------------------------------------------

Some very nice issue reports have helped correct various corner case issues.
Mint users helped find a big one with lspci.

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

1. Unsure how to handle Android case where inxi correctly does -r test, see bug
3 fixes 6, but android incorrectly claims it is readable when it is not
readable, then the reader tool can't read the file and fails with permissions
error. This is one of those weird android errors that are pretty much impossible
to fully work around, but we can get rid of the readline() errors when reader()
was trying to work on a file handle that did not exist, that part was an inxi
bug.

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

1. dm detection was not using case sensitive search for duplicates, leading to
cases where dm like slim / SLiM failed to get detected and then repeated in
output. Anonymous BSD debugger dataset exposed this issue, thanks.

2. In certain corner cases, like ARM Android, sub reader got passed a file that
had passed the is readable -r test, but it still failed with permissions error,
which then led reader to try to keep working with a null $fh. While in theory
nothing non readable should be passed to reader(), that fails when the OS fails
to actually follow correct readable rules, as in this case. Added protections in
reader() to handle this case, now will show error, but will not try to work with
$fh, that is how it should have been all along, but this is a very corner case.
Exposed by an anoymous ARM debugger dataset.

Thanks Termux user for creating the debugger dataset that exposed this issue.

3. lspci parser didn't null port value each iteration, resulting in all pci
items getting port values. Not a big deal, port is only used one place, but good
to find and correct that error.

4. Not an inxi bug, but would appear so to end users: lspsci -nnv implements a
truncating routine and breaks the first line for each bus id. See Fix 6 and Code
fix 3.

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

1. -S and -I would show Console: tty pts/3 even though pts device is a pty, not
a tty. The only time this happened was when connecting to a remote system using
ssh or something like that. Local console still shows Console: tty 2 since that
was correct, but Console: tty pts/2 was confusing since technically it's not a
tty, it's a pty, pseudo terminal.

Now shows, when relevant: Console: tty 2 OR Console: pty pts/2.

2. Issue #252 notes that Emacs (and possibly other code/text editors with native
embedded terminals) includes a native virtual terminal that also follows
configuration rules from the editor to highlight trailing spaces. This created
odd looking screen output in Emacs vt mode since inxi always sets key/value
pairs with a white space ending as separator for next key value pair for screen
output mode, resulting always in a trailing space on each vt screen line. Fix
was to remove the last trailing space just prior to the print line point to
avoid this issue.

As a general thing, I'm curious to learn if any editor other than Emacs actually
contains its own virtual terminal that also follows the editor rules for output.
Or if any virtual terminal has such a highlight trailing space rule, which would
be imo so annoying it's hard to understand why a vt would implement it. Easy to
understand why Emacs (or any editor) does it, but an editor also being a vt AND
applying certain editor display configurations to the vt is a very specific and
unique circumstance I'd say.

Odd, historical, but there it is, why not handle it?

3. ARM / Android case where certain files passed the read -r test, but failed
with permission denied error. This tripped a further glitch where reader() would
then try to work with the failed $fh, see bug 2. This was really more a fix
than a bug, since the bug in this case was in android permissions tests, not
inxi, but it appears to be a bug to end users, so it's handled now.

4. Another ARM/Android, there was a voltage regulator IP that contained the term
wlan so it tripped false positive for network match. Added a new type,
regulator, to filter out those, like codec and dummy do already.

5. For issue #254, fix for cygwin ERR-102 in partitions, add cygwin test, new
dev type, 'windows', dev base then becomes E: or whatever. To avoid confusing D:
for a key: with no value, added D:/ slash.

6. Mint people discovered lspci issue, lspci -nnv has a bug where it will
truncate the output of the first line per bus ID if it's over some arbitrary
amount, then tack on rev and other items to end of that string, which leads to
the block: [vendorID:productID] getting truncated or removed altogether. Clearly
an oversight, at least I hope it's an oversight on lspci's part, but have to
work around the issue anyway since it may never get fixed, and has been around a
long time. Bug is in lspci 3.7, 3.6.4, and probably earlier.

Also added in a fillin tool for this rare case, lspci -n data is used to replace
the missing values.

Note that while lspci recommends using -mmv, for machine parsing, apparently
nobody noticed that -mmv doesn't have the same data items as -nnv, sigh.

7. Issue #255 noted that the combination of:
GoogleDrive Hogne: fuse.rclone 15728640
which is two word remote fs AND a fs type with a '.' in it would fail to trip
the handler for that multi word remote mount name. Also failed to detect as
remote fs, added fs specific test since the actual mount name doesn't permit
reliable detection as remote type. Testing for trailing ':' isn't safe since
':' alone is not an invalid character in a file system name as far as I know.

Further, this exposed that the ^^ space replacements for $row[0] fs > 1 word
name were not being reset soon enough in the logic, that's also corrected.

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

1. Neglected to support standard package config file override
/etc/inxi.d/inxi.conf item. This is mainly useful for packaged inxi's who want
to override the distro maintainer /etc/inxi.conf file. Test priority is the same
except /etc/inxi.d/inxi.conf comes right after /etc/inxi.conf now in the test
sequence.

2. Added basic cygwin id, yes, inxi works in cygwin, apparently, with some
issues. Added cygwin os id to distro ids.

3. Added --version info for debugger, sometimes we want to know what verion of
a tool, like lspci, in case it has a bug or something.

4. Added exfat and apfs to unmounted fs types.

5. More disk vendors!! New vendor ID matches!! Yes, yes, you've heard it all
before, the list never ends!! The eternal chaos of existence manifested in just
how many IDs can be generated for new and old disk vendors alike!!!

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

1. No changes this release.

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

1. Pull request #253 corrected typos, urls, and other errors in man page,
inxi/pinxi comments, pinxi.1/inxi.1, README.txt, and updated LICENSE.txt to
current gnu wording.

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

1. Forgot to add lspci debugger fake data option, that's corrected. That's
--fake lspci, now works, didn't before, only the bsd pci tools had fake switches
previously, since lspci never needs debugging really, but did now to test an
issue report.

2. Added -CYGWIN to debugger file name. Added -ANDROID if ARM and if android.

3. With Fix 6, refactored entire lspci_data block, added lspci_n_data item,
which matches bus id of lspci -nnv when corruption occurs and replaces vendor,
product, and if also missing, rev version. I kind of knew I'd have to do this
fix one day, that was the same fix logic used on the BSD pci tools, which have
similar issues with consistency in output, or lack thereof.

This refactor is long term very good because it avoids an entire class of
possible errors, and makes pci detections far more robust.

4. Created new repo, for legacy code, inxi-legacy. Moved branch inxi-c to
inxi-legacy/xorg-c, moved branch xiin to /xiin, moved branch inxi-legacy (binxi)
to inxi-legacy/inxi-legacy. Those directories each contain all the files each
branch had in it.

This gets rid of some branches clutter, and nobody needs to see those anymore,
but if they care, they can look at them. Note that to do this, I had to merge
their histories, which was not that nice, but git is just really bad at this
type of stuff, so that's how it goes.

Times like this really make me miss svn's directory based branch approach...

5. Simplified sub fs_excludes, simplified regex constructors for all function
that use this data, made list more fault tolerate by adding global (fs)?(\d{0,2}
which means all file systems can have or not have 'fs' at end, and all can have
or not have a version number in string.

6. Exposed by issue #255, refactored slightly ordering of partition filter
logics and variable resets in the df output processing loop.

7. Added --fake partitions, to help debug odd corner cases like cygwin glitches.
2021-10-11 18:56:00 -07:00
Harald Hope
73d9643907 redid patches, I think 2021-08-24 20:39:33 -07:00
Harald Hope
b737838957 small fix 2021-08-24 20:32:53 -07:00
a1346054
06aba8cd5a fix whitespace alignment in manpage 2021-08-25 02:14:11 +00:00
a1346054
e09ec42630 fix spelling 2021-08-25 02:13:54 +00:00
Harald Hope
f571b45973 New version! Fixes!! Bug fixes! More bug fixes!! Cleanups!
Most of these were exposed by issue #251 filed by LukasNickel, then further
revealed via his debugger data set, which showed two more bugs. Well, bugs,
changed syntaxes, same difference to end users.

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

1. Work is ongoing to add btrfs support to -R (similar to softraid or zfs),
basic stubs and debuggers added, but reporting tools are not as robust (and
often require sudo/root for reasons that escape me) as I would have hoped, so
it's slow. One of these days... Normally would not release with working stubs,
but there were enough real issues/bugs to warrant just getting 3.3.06 out the
door, then going on with the btrfs feature for -R. But so far I view the
reporting tools as inadequate, unfortunately.

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

1. As initially discovered in issue #251 there are alternate syntaxes which had
never been seen before for remote mounts, fuse mounts, etc. In this case, it was
fuse.sshfs that was not removed from the Disk total:... used: leading to silly
1000+% used percentage. Note that while technically inxi could try to be clever
about reporting impossible percentages, so far those have led to bugs getting
reported, then fixed, so I think it worth leaving it as is.

2. When --swap/-j is used with no other arguments, failed to show uuid or label.
Discovered this while testing fix 2.

3. Bug which is not a bug but will appear as such to users, nvme temps were
failing in -Dx due to a change in how those values are located in /sys. See fix
3.

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

1. Going along with Bug 1, and considering that only in 3.3.05 was the nfs4
remote fs failure to identify/exclude, the entire section involving remote/ fuse
etc file systems was refactored, and extended to add many more previously
non-handled remote and fuse type file systems. Significant extension of known
remote filesystem types, distributed file systems, overlay file systems, all to
try to avoid having more distributed/remote/fuse file system issues. Also added
test to support fuse. or fuseblk. type prefixes for any of these. Hopefully
there will be fewer issues related to distributed and remote and overlay type
file systems in the future.

2. Made all label/uuid triggers global, that is, -ol shows unmounted with
labels, -ju shows swap with uuid, and so on. This may require a bit more tweaks
to get exactly right, but in general, this is a purely cosmetic fix, that is,
try not to show label/uuid for partition/mounts that probably can't have those
values.

3. There was a change in the way nvme /sys temperature paths were handled, an
actually understandable, albeit as always annoying, one, because inxi actually
had to do a sort of convoluted hack to get the nvme block devices temperatore
paths before, now that hack is not required for newer kernels (5.12+), though
for kernels that had the old paths (5,8, 5.9 at least, don't know when paths
changed) left in the old method. Now tests are more granular, and inxi should
find temperatures regardless of which method is used for nvme and sd type
drives.

4. Another somewhat irksome random change, again, understandable since the new
syntax is more consistent in output than the previous one, but still breaks all
existing parsers that use the changed field names. Lsblk did NOT change the -o
input field names, but DID change the output field names, which broke the
internal inxi parser, and led to null lsblk data.

Changes were - or : separators in input values are output as _ always. that is,
MAJ:MIN becomes MAJ_MIN. Also corrected the debugger lsblk to use the same
output fields for -P -o as the actual lsblk parser uses internally so these
failures can be spotted more readily, as it was, it was literally only because
someone submitted the debugger dataset, and was running lsblk 2.37, where I
believe this behavior change happened. Solution was to just use regex patterns
instead, [:_-], in the parser. Big fear now is that they will randomly stop
supporting the -o input field names that contain - or : and change that too
without any real warning or deprecation notice.

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

1. Going with bug and fix 1, added avfs, afs, archivemount, avfs, ceph, gfs,
glusterfs, gmailfs, hdfs, ipfs, kosmos/kfs, lafs, mergerfs, mhddfs, moosefs,
ocfs, openafs, orangefs, overlayfs, pvfs, s3fs, sheepdog, vmfs, and several
others to the exclude list for disk used and show label/uuids for partitions.

2. A smattering of disk vendors added.

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

1. Going with fix 2, -l and -u no longer will trigger -P by default, now if -l
or -u are used without -j, -o, -p, -P, an  error will explain that you must use
one of those together with -l or -u. This was the only way to get the -l and -u
switches to turn off/on label/uuid reports in swap, unmounted, and partitions
consistently. Triggering -P was really a legacy behavior from when the only
options were -p or -P, and --swap and --unmounted did not exist. I found it
increasingly odd that unmounted would show label/uuid always but partitions only
with -l/-u.

2. This was a pet peeve, sometimes field names just bug me (like 'Topology: did
for CPU, now  corrected to Info:), the Drive: rotation: was one such annoyance.
I had recycled that to indicate SSD, which was a feature request, but that was
always a sloppy solution, and made no sense, since SSD isn't a rotation speed.

Now it reports a much more logical:

ID-1:...... type: HDD rpm: 7200
or
ID-1:...... type: SSD
or
ID-1:...... type: N/A

This also corresponds to the intended meaning much better. The HDD type was
always present internally if rotation speed is detected, but was not used. Now
will also show type: N/A if reliable type detection failed, which will also be
more consistent.

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

1. Brought most of inxi.changelog (this file) into a consistent state, re
whitespaces, readability, consistent use of various header / section names.
Ideally while I don't expect anyone to ever sit down and read this changelog, it
will be now much easier to scan to find whatever interests you. This change goes
along with ongoing changes in docs to in general try to be usually 80 columns
wide.

2. inxi-resources.txt, inxi-data.txt are updated with more raid, partition, file
system values and data to go along with bug, fix, enhancement 1.

3. Man and help updated to indicate -u and -l no longer trigger -P by default.

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

1. Ongoing refactors, bringing the codebase to the point that matches current
coding styles. Removed remainder of whitespaces in conditions and for/while
loops, for example:

if ( condition ) {
becomes:
if (condition){
and
if ( ( test set 1 ) && ( test set 2 ) ) {
becomes:
if ((test set 1) && (test set 2)){

and so on. That dropped over 2 KiB of whitespaces. This went along with fixes
that have been ongoing to change to this whitespace use style, but previously it
was only being  done when that situation was hit in a local block, now it's been
completed globally.

This continues the style refactor that has been ongoing for a while now, to
bring inxi into a consistent state, since when it started, it was more pressing
to get the bash/gawk mess translated to Perl than it was to get the Perl itself
to be as good/consistent as possible, so now those issues are being slowly
unravelled, and hopefully will set inxi on course for its next 10 years.

It was starting to get annoying, because some parts of inxi used those spaces,
and all newer ones didn't in general. Now it's one behavior throughout the whole
program file.

2. Refactored the entire fs exclude for disk used data, and integrated those
values into a global tool that is used either to exclude file systems from disk
used totals, or to not show uuid/labels for the excluded
remote/distributed/overlay type file systems, which in general don't have uuid
or labels.
2021-07-21 20:30:58 -07:00
Harald Hope
55ca175e5a Many small updates, enhancements, bug fixes!!! We've been saving them up!! Here
they are!! Don't wait!!

Thanks mr. mazda for many issue finds, and suggestions.

--------------------------------------------------------------------------------
KNOWN ISSUES BUT CAN'T OR WON'T BE FIXED:

1. Due to unfixable rpm slowdowns, removed package counts for default output for
rpm based systems. We were seeing delays of up to 30+ seconds just to list the
rpm package count, which is absurd, even after the rpm optimizations inxi
already runs. To allow rpm users to get excluded by default for rpm package list
counts, added --pkg flag plus a  short message telling them to use that flag to
get the installed package count if they want it.

Changes like this are very unfortunate, but in 2021 for a package manager at
times to require over 30 seconds to generate a trivial installed package list is
just not acceptable. One of the reasons this release was delayed was this was
not an easy decision to make, it's very rare support for a feature is removed
for specific tools due to how badly the tools may perform. Note that whatever
higher level tool is used, like dnf, zypp, it's still the same speed, they all
appear to use the same core engine.

Basically this decision was forced since either inxi looks really bad and slow,
when it's not, or the actual cause was removed from default outputs.

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

1. Small bug in nfs blacklist for disk used led to nfs used being added, which
leads to silly used percents. This is corrected.

2. If ram vendor ID failed, inxi would delete the part number. Oops. This was
related to the Mushkin failures.

3. Close to a bug, though not one internally, but to users would appear as one:
ZFS does not act as expected, zpool list did not in fact return the pool size,
which I had always assumed to be the case, but in a very strange decision, does
return something very close to the pool size for mirrors, but NOT for z1 or z2
pools, then it returns the total size of the drives that make up the pool. To
call this strange behavior would be an understatement. The fix was to modify the
logic to use zfs list instead to get the size data. This also makes the drive
total report far more accurate, since it lists usable space now for ZFS as was
always intended. The cause of this was simply that I'd always had access to zfs
mirrors, not z1 or z2 arrays.

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

1. OpenSuse and maybe others use kdm3 for Trinity, not kdm, so dm was failing.

2. Going along with fix 1, made kde version detection more robust so may catch
more fringe / corner cases for kde desktops. These were mainly added to correct
Trinity desktop version detections.

3. Mushkin ram vendor ID was failing, that is or should be corrected.

4. Added in /dev/disk/by-id handlers for zpool components, there are several
variants, wwn-, pci-, scsi-, ata-, but they all map to the real /dev drive IDs.
Failure to unmap these led to failing to match components and get size info
etc for zfs.

5. See DOCUMENTATION: 2, language changes for weather feature abuse.

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

1. Going along with the rpm issues, added dnf.conf support to yum/dnf repo
types. Not sure how that one was missed, but there it is. This should tighten
repo reports for dnf/yum/zypp types.

2. Added LeftWM. LeftWM confirmed working. Added unverifed detections for:
penrose, 2bwm, 5dwm, catwm, mcwm, monsterwm, snapwm, uwm, wingo, wmfs, wmfs2.

3. Added xfwm as a compositor type, that had bee left out, somewhat on purpose,
since xfwm can run in compositing or non compositing mode. But should show
since many users use compositing mode now.

4. Added OpenMediaVault distro ID and systembase handlers.

5. Going along with zfs bug fix 3, using zfs list data for free, size,
allocated. Trying to understand how zfs developers actually thought about this
is nearly impossible so just used what seems to correspond to reality most.
Also shows raw values for zfs data in RAID along with regular ones to make
clear which is which value.

6. Added more CPU architecture ID matches for AMD Zen and a variety of Intel.
Both vendors finally released some new CPUs and the data became available,
which doesn't always happen quickly.

7. A bunch of new disk vendors and vendor IDs added. Never stops, like the
sands of time, like the ocean waves, like the scuttling crabs scrounding around
in the seaweed in the foam where the outgoing wave left its mark...

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

1. Added leftwm keybindinigs to inxi-data.txt desktop/wm section. Updated more
wm in that section as well, and list more info on wms for future reference etc.
Also reorganized and more more readable wm section.

2. Help/Man now make more clear that automated requests or excessive use of the
inxi weather feature are not under any circumstance permitted. There had been
some ambiguity and lack of clarity about what abuse is, now it should be more
clear.

--------------------------------------------------------------------------------
CODE CHANGES:

1. Refactored uptime parser logic, the code and regex was just getting too
messy and difficult to work with and debug, now it works similar to how the
revised BSD parsers run, the regex are pulled apart and made more granular so
a small syntax change ideally won't break the detections as easily.

2. Cleaned up sub cpu_arch() and made all the arch values line up nicely, over
time I notice that almost invariably stuff done to save lines of code makes
code harder to read as the feature expands, so it's generally worth just
unravelling it so it all stacks and is easy to scan/read. Also removed extra
white space in parens, which is something I'm leaning more towards but it's
not worth fixing all at once so it's just done where it's noticed.

That's using:
if ( /test/ ){
rather than:
if (/test){

I believe using more white space helped with Perl comprehension in the
intermediate stages, but is not required anymore and just looks like extra
whitespace now.
2021-07-11 19:32:13 -07:00
Harald Hope
991a35d665 Enhanced features!! Huge BSD upgrades! Bug Fixes!! Elbrus Fixes!! More bluetooth
fixes!! What are you waiting for?!!?

A special thanks for significant help, ongoing, leading to a huge boost to BSD
support, Stan Vandiver, who did a lot of BSD testing, and setup many remote
access systems for testing and development of the latest BSD upgrades. If you're
a BSD user, you can thank him for helping to expand BSD support!

Take special note of the code folding fixes in Fix 1, those open up possible
free software code editors that can be used to work with inxi to more than just
Kwrite/Kate, to include scite and geany, nice lightweight code editors. You
can't do real work in inxi without code folding, so getting this finally
resolved was I think worth it.

Also, for the first time ever!! inxi is now using Pledge, well, if
OpenBSD::Pledge module is available, which is currently only in OpenBSD, since
that's the only system that supports Pledge security, except for Serenity, but
inxi doesn't support Serenity. Note that OpenBSD was smart and added
OpenBSD::Pledge and OpenBSD::Unveil to Perl Core modules, thus removing any hoop
that might stop a Perl program from implementing it. Nice going OpenBSD guys!

The addition of OpenBSD softraid support for RAID and CRYPTO types highlights
the problem with --raid and --logical, where --raid is really just a subset of
Logical volume management. Note that while the hardware RAID feature only lists
the actual PCI RAID device, OpenBSD bioctl supports hardware RAID out of the
box, something I'd thought of doing in inxi for a few years, but it's too much
work, but bioctl has done the work, which is impressive. Can't do much without a
lot of debugger data there though, but it's worth being aware of. In this case,
since softraid is the primary device, I opted to call Crypto and RAID types all
RAID, same as with linear zfs.

--------------------------------------------------------------------------------
KNOWN ISSUES BUT CAN'T OR  WON'T BE FIXED:

1. FreeBSD: USB drivers. I really gave this a try, but could not get any logic
to be stable across systems and varying syntaxes used. Will wait for FreeBSD to
add drivers to usbconfig -vl. Note that this makes it not possible to correctly
match USB networking devices to their respective IF data, so USB networking IF
will fall back to the undetected IF-ID, which means it was found but not
connected to a specific hardware device.

2. FreeBSD Battery Report: there are non-objective values for Battery state data
in sysctl output, as in minutes remaining, which has no meaning, and percent
charge (percent of what? original design capacity? current actual capacity?). If
data with voltages, design/current capacity in Ah or Wh, is made available,
support will be added. Note that there are 3rd party tools that do supply this
data in a usable format, but they are not in core so no point.

3. BSDs All: have found no way to get physical CPU counts. this will lead to odd
outputs in some cases, like a 2 cpu system reporting itself as a 2x the actual
core counts single CPU, but the data just isn't there as far as I know.
Dragonfly in some cases appears to have that data.

4. BSDs All: so far no way to get live per core cpu speeds using a file or fast
command query. Thought I'd found a way in FreeBSD but that was not the correct
clockrate values, or inconsistently right/wrong, so not using it. Also saw the
same issue with max/min frequencies in FreeBSD so removed that item, it's
better to show nothing than data that is not reliable or actually not even
referring to what it seems to be.

5. BSD SOC Support: An issue poster asked why FreeBSD (but really BSD in
general) SOC ARM device, like RaPi, support, was so weak in inxi. The reason is
simple: to do SOC ARM device data in a meaningful way requires a complete path
based data structure, which the BSDs do not appear to have, at least from what
I've seen so far. See Linux's /sys data structures for examples of what is
required to add or expand inxi SOC device support in inxi. It's hard even with
that type of rich path based data, and without it I won't try.

The bright side is inxi runs perfectly on such devices, no errors, which was
amazing to see, and spoke volumes of the recent work done to extend support for
the BSDs.

6. Perl / inxi, when run as root, shows read error when trying to open a 200 /
--w------- permission /sys uevent file for reading. The test works as expected
as user, but not as root. Perl will try to read it when run as root even though
it has no read permissions, only write. This in reality only manifests on very
old /sys, from Debian Etch kernel 2.26 days.

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

1. tput + urxvt / FreeBSD: There appears to be a bug in Arch Linux urxvt that
leads to failed terminal/console size from tput. Also while trying to resolve
this bug, discovered that if you use "tput cols 2>/dev/null" in FreeBSD, for
some inexplicable reason tput puts out defaults 80 cols x 24 rows. Why? Who
knows. Added in non numeric tests of output to handle errors from tput instead.

The bug appears to be what rxvt reports itself as vs what it is actually running
as. This issue isn't present in any other distro I tried, but could just be a
new bug in urxvt, don't know.

2. Elbrus CPU: Ongoing issue #197 Elbrus poster gave sample of new 2C3 cpuinfo,
that exposed some bugs internally in inxi Elbrus handling, I was using integer
values instead of hex for model IDs in the Elbrus logic, which would fail after
model 9.

3. BSD dmesg.boot: The logic used for dmesg.boot data processing had errors, and
had to be fully redone because of the need to detect in a reliable way the
current state of USB drives. This logic now is much more robust and reliable,
and no longer relies on using 'uniq' values per line, which would fail in all
kinds of situations.

4. OpenBSD USB Speeds: bugs fixed for OpenBSD speeds, these were found during
the USB data refactor testing process.

5. BSDs: in some cases, wrong memory used values were being generated, this
should be largely corrected now. Also pulled the weird NetBSD use of
/proc/meminfo which had wrong data in it, and now use vmstat for all BSDs, which
after the used bug fixes, is more reliable for BSDs.

6. All systems: CPU stepping would report as N/A if stepping 0, luckily I came
across some systems with an actual stepping: 0, which are not common.

7. FreeBSD: dmidecode sourced L2 cache data failed to show correct totals in
some cases. Due to no MT detection possible for FreeBSD currently, these totals
will still be wrong, but now it says note; check to let users know.

8. dmidecode: some cases were getting the wrong failure error message, this bug
became exposed due to OpenBSD locking /dev/mem even to root, which then failed
to show the expected message. This was a bug, and is now corrected.

9. FreeBSD: partition swap size didn't show in at least some cases, that's
corrected.

10. Linux Partitions: partitions would let doubled swap items through in several
cases, and also failed to create in rare cases matches for hidden partition
mapped id's. Finally tracked down the actual cause, when moving the partition
filters I'd forgotten to add swap into the filter list, oops. But now it will
catch duplicates in several different ways, so that's fine.

11. Unmounted: Failed to properly handle detecting RAID components in the case
of lvm, mdraid, it was only working for zfs. This was an accident, and should
now be corrected.

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

1. Code Folding: Note that this was NOT a bug or failure in inxi, it was a bug
in scintilla/scite geany code editors with folding, basically if you commented
out logic, without using a space or other marker after the comment #, folding
would break in weird ways. Obviously the core scintilla engine should IGNORE the
darned # commented out lines, but it doesn't, which is a real bug. But not in
inxi.

This was however worth working around, because without folding, you can't work
on or learn how inxi works, and the only editor I know of in the free software
eco-system that can handle folding reasonably accurately was until now
Kwrite/Kate code editors, and those have some real, long standing, weaknesses,
and bugs around folding that have never been resolved, and yes, did notify them
about them, and no, they remain unfixed after years, or they were fixed briefly,
then broke again.

So it was important to expand the base of possible code editors to more than
just the KDE stuff. Fixing this was tedious, but I think worth it. On the bright
side, geany/scite folding / unfolding is FAST, and once the code issues that
triggered folding failures were resolved, very accurate, much better than Kate's
to be honest, though Kate isn't as picky, but Kate's unfold top nodes has been
broken more often than it's worked.

To avoid this issue, it's also important to configure geany/scite to use a space
after the comment when using keyboard shortcuts to comment out lines/blocks.
Same goes for Kate/Kwrite, by the way.

2. Battery: Forgot to add battery-force to -v7, which means you would never see
the battery line in full output if there was no battery present, this is similar
to how raid-forced worked, it was just an oversight which I hadn't noticed until
testing the new BSD battery logic.

3. Indentation: small indentation fixes on Sound Server data. Those are visible
with -y1, that is.

4. OpenBSD PCI: enabled Device matching to PCI networking device, this required
an odd little hack, but seems to be pretty reliable, and allowed me to add
driver to PCI device reports as well. Not sure why driver isn't in pcidump -v
but it probably will be in the future. Note to self: add in support for that so
if they include it in a future release, it will suddenly 'just work', assume
they use the same basic syntax as usbdevs -vv output.

5. BSDs: Added in some null data protections for BSDs, which do not always have
all the data types found in Linux, those would trigger Perl undefined value
errors, which are warnings that inxi failed internally to test for null data in
that, but it's hard to know when to do that when the data is basically always
there in Linux.

6. Debugger: Added test for required Net::FTP module in debugger, had forgotten
to make that test explicit, which led to odd failures.

7. BSDs: nvme detections should be better now. But I have seen no live test
system to confirm the fixes work as expected, plus, at least, OpenBSD swaps
nvme0 to sd0 internally, so I'm not actually sure how that data will even work,
we'll see how that goes.

8. BSDs: oddly, despite using 0x hex numbers almost everywhere, for CPU
stepping, the stepping is in decimal, which is even odder because CPU makers
list their steppings as hex in many if not most cases. In case this is corrected
in the future, if 0x appears before stepping number, will not then try to
convert to hex since it already is.

9a. CPU L3: Subtle, probably won't change behaviors, but L3 cache is per physical
CPU in every case I've found, so never multiply value by cores for L3. Like
everything, this may lead to corner cases being wrong, but that's life, it will
also lead to the data being right for most users.

9b. CPU L1: Different L1 syntaxes found so inxi now uses more loose detections,
should cover most OpenBSD L1 variants at least.

10. BSDs: inxi was using internal 'sleep' right before reading /proc/cpuinfo,
but that was silly for BSDs since cpu speeds there come from sysctl, so the BSD
sleeps are now running before sysctl if CPU data feature is required.

11. Too many to remember, but lots of subtle message output changes to make more
clear, more accurate, shorter, whatever.

12. USB: a very subtle fix, some devices can be both audio and video, like
cameras, but inxi would default to the first detected. Now it checks for both
before going to the list of checks, and correctly assigns a type that is both
audio and video to the audio and video hashes so both features will show the USB
device, not just Audio.

13: BSD: fixes for BSD ifconfig IF status, it was slicing off the full status
string, like 'no network' to 'no', which is silly. Now shows full string.

14. OpenBSD: restored USB Hub ports: xx item, I hadn't realized that the data
was still there with usbdevs but it required an extra -v, like: usbdevs -vv to
trigger, so now the OpenBSD USB ports works fine again.

15. Fedora Xorg: updated --recommends to use the newer split apart xorg utils
package names, only xrandr I think needed updating. Thanks Mr. Mazda for keeping
up with that stuff!

16. OpenBSD SMART: the actual device being queried turns out to the 'c'
partition, the one that represents the entire disk, NOT the main device ID, like
sd0, so now inxi tacks on 'c', sd0c, when smartctl runs, and it works fine. So
previously SMART report would never have worked in OpenBSD.

17. Partion labels/uuids: in Partitions and Unmounted, does not show label/uuid
if fs type is ffs or if fs is a logical type one, like zfs, hammer, and remote
fs mounts etc. This cleans up output, since these file system types will never
have labels or uuids.

18. Mr Mazda inxi was missing data and showing errors if run in Debian Etch with
Perl 5.008, and I realized I'd slipped up and had used the -k option without
testing lspci version, but -k was only available in 3.0 in Lenny. But -v turns
on -k automatically, so the easy solution was just to remove the -k and leave
the -nnv, which is the same thing, but does not cause errors in early lspci.

There are also errors with reading as root some /sys uevent files, but upon
examination, those had only root write permission, so the perl -r test isn't
right. Don't think that can be fixed. See Can't/Won't fix for more.

Another issue I noticed was that in some cases Perl seemed to lose track of some
hash values in local %trigger in OptionsHandler, and just lose them, thus
leading to things like --help --version --recommends not working. Moving
%trigger to globals %show and %use fixed that one, but that's weird, no idea
what happened, but it works now.

Tested in Sarge 3.1, where core modules have to be explicitly installed, they
were not included in base Perl install. Kernel 2.4 had some key differences,
different lspci syntax, different /proc/partitions, so the block device output
and device output is flawed, but otherwise inxi worked fine in Sarge, from 2005!
But these issues will not be corrected, kernel 2.24 is just too old, lol.

inxi should always run ok in very old systems, like Etch, back to when Perl 5.8
was standard, so bugs like this are always welcome, it's easy to slip up and use
something that didn't work in those old systems, then forget to test.

19. Corner case SMART errors, sometimes occur much later in output than inxi
expects, this is now corrected and errors should show in smart data no matter
where the main error type occured.

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

1. Elbrus: Going along with Bug 2, Updated Elbrus microarch to use family 6,
assuming models 10, 11, are the same, which they should be since 12 is the same
as in family 4.

2. IPMI Sensors: More sensor syntax detections, sensors will never be stable...

3. OpenBSD: Rolled out live battery state feature, they have very good data,
simple, but solid, that allows for a quality battery state report. Handles both
Wh/Ah, though I am slightly suspicious of the reality of the arithmetic for Ah >
Wh conversion, it seems to be too high. That's Ah * Design Voltage. But Linux
battery data has the same issue, though I think in most cases, the data is in
Wh, so this issue isn't BSD specific. My suspicion is that the voltages used to
determine Ah may actually be slightly lower than the listed design voltage,
which inxi calls min: but it's actually the design voltage.

Unknown if NetBSD data is the same as OpenBSD for battery, was unable to locate
any samples, so can't say, if you have a NetBSD laptop that correctly reports
battery state in sysctl -a, please file an issue with some sample battery
charge/voltage syntax and values, ideally from > 1 system. If the data is
complete, it's easy to add support.

4a. BSD USB rev: inxi now emulates USB rev versions for BSD USB speed/rev
version data. Note that this is not guaranteed to be right, because USB devices
can be different rev versions than the speed they run at, but as far as I could
find, the USB revision data is not available in any practical sense, unless I
create a complicated recursive tool to build up a snapshot of the usb system and
devices from dmesg data, but I already blew a day on that attempt, so will wait
for more complete data in the usb tools in future. The rev version is based on
the device/hub speed, using a standard USB rev speed mapping. But a 12 Mbps
device can be rev 2, not rev 1.1, for example, that is, it's actually a USB 2.0
device, but a slow speed one.

4b. USB Type: Expanded fallback USB device type tests, these are useful for
cases where it's either a vendor defined type, or for Open/NetBSD, which do not
yet show USB class/subclass data. But it's a good fallback tool, added Mass
Storage, expanded detections.

5. BSD Sensors: Going along with Enhancement 3, rolled out live sensors data.
Confirmed working in OpenBSD and FreeBSD, not sure about NetBSD, no data,
problem with vm testing is no sensors, but don't have any NetBSD hardware
installs to verify. Stan gave it a good try, but could not get NetBSD running so
far, maybe later.

This basically means the -B and -s features are largely feature complete for the
BSDs as far as practical, though due to difficulties in getting the data in a
consistent clear way, some more advanced features, like gpu temps, which are now
available in Linux kernel values and lm-sensors, do not yet appear to be present
in the BSDs, though if this changes, the structures are in  place to make
updates to these logics very easy to implement now.

Note that the --sensors-include and --sensors-exclude items, or config items,
work fine with this BSD logic, though you have to figure out what exact syntax
to use, but that's the same in Linux.

6. OpenBSD Pledge: Yes, that's right, inxi is now Pledged!!! In OpenBSD, anyway,
they did a really good job, and the OpenBSD Perl packager made a very nice Perl
modules, OpenBSD::Pledge, which was very easy to implement. Now I know what inxi
needs to run its features!!

So far OpenBSD only, but Pledge seems like a really good idea, so I figured,
let's give it a spin, even if it will only currently work on OpenBSD, but that's
fine, inxi is pledged as tightly as I could make it, including unpledging
features not required post options processing, once inxi knows what it's
actually going to be doing.

Note that I'm aware of OpenBSD::Unveil, but that's a lot harder to implement due
to never really being sure about what files inxi will need to be looking at
until well into the logic. I may look at that in the future.

7. Bluetooth Rfkill: Due to ongoing failures in current inxi to show consistent
Bluetooth hci report on Linux, added in one last fallback, rfkill state, which
allows inxi to always fallback to at least that basic data. Also added in which
tool is providing the report mostly, like: Report: bt-adapter ID: hci0 and so
on.

Also integrated into -xxx data, or for down state, the full rfkill report, since
that can be quite useful.

Note that bluetooth is a real pain for users to debug because you can have:

 * Bluetooth Service: enabled/disabled * Bluetooth Service: started/stopped *
bluetoothctl: start/stop * bt-adapter: start/stop * hciconfig: start/stop *
rfkill: software: block/unblock; hardware: block/unblock - however, for
hardware, that means a physical button has been pressed to disable it, on the
laptop that is.

To make matters worse, one tool does not always even know when another tool has
changed something, for example, if I rfkill blocked hci0, then unblocked it,
hciconfig would keep seeing it as down until it was switched to on with
hciconfig explicitly. This is I suspect one reason hciconfig is being dropped,
it doesn't know how to listen to the newer tools like bluetoothctl, bt-adapter,
or rfkill.

8. OpenBSD: Going along with Code Change 1, now has disk serial (doas/root),
more consistent physical block size data, more reliable disk data, and for
-Dxxx, duid, if available. Also added disk partition table scheme, aka MBR /
GPT. Some of these new items may also work with NetBSD. See also Fix 17, SMART
fix for OpenBSD.

9. OpenBSD/NetBSD/FreeBSD: the DiskDataBSD refactor now allows Unmounted
partitions report.

10. OpenBSD: added in CPU MT detections using siblings data, I think only
OpenBSD and Dragonfly support proper MT cpu core counts. Still no way to get
physical cpu counts in OpenBSD or FreeBSD or NetBSD that I am aware of.

11. OpenBSD: added in cpu speed min/max data, that was available in most cases,
didn't realize that.

12. BSDs: expanded and made more robust cpu L1/L2/L3 cache detections, now for
example, OpenBSD will report its L1/L2/L3 cache without root. FreeBSD requires
root since that data is coming from dmidecode.

This logic update made BSD L-cache data much more reliable and consistent, and,
important, easy to work with. This was directly connected to Code Changes 2 and
3, which made dealing with those data sources a lot easier.

Note that L1/L2 cache data if not from OpenBSD will show note: check because
it's not possible to determine if it's a multithreaded MT cpu or not, and thus
if L1/L2 * core count would so often be totally wrong that inxi won't try to
guess, it will just list the single value found, and tell the user to check it
themselves.

13. OpenBSD: Added rcctl tool to init tools, I hadn't known about that one, that
replaces the fallback default used before, /etc/rc.d.

14. RAM Vendor: Issue #245 raised the point that it would be good to try to show
RAM vendor data when the manufactorer field is empty, and since that logic is
already present in disk_vendor, it was just matter of researching the product
IDs to find the matching patterns for the RAM vendors, the initial list is
pretty good, but will need updates now and then to correct errors. Also will
override only vendor ID 4 character hex value and see if it can find a better
value.

15. OpenBSD RAM: data quality is decent (no vendor/product no, unfortunately).
The data is often, but sadly not always, available. I'm not clear why sometimes
it isn't, but since OpenBSD also defaults to blocking /dev/mem to even root
user, which then blocks dmidecode, this is the only practical way to give basic
RAM data for OpenBSD, so that's running fine now, when the data is available,
with the added bonus of not needing doas/root.

Note that due to the way that this data is present, I can have inxi deduce some
things like how many arrays there are, and then guess at overall capacity, max
stick size, and so on, but all Array-x: values are followed by note: est because
they are never based on hard data, just extrapolations. I debated if inxi should
even show the guesses, but I think by saying note: est after each Array-x: item,
it's pretty clear that it's not hard data, and it does give an idea roughly. I
made an initial guess at > 1 ram array but found no data samples to let me see
if my guess was right or not, so > 1 array remains roughly theoretical until
shown to work or not work empirically.

While NetBSD sometimes has the system ram data in a similar way that OpenBSD
does in dmesg.boot, it varies too much, and is too inconsistent. There are not
enough data samples with good consistent data, and the samples I did see
suggested that it would take too much code and convoluted logic to handle the
variations, so I'm leaving this one alone. Also, NetBSD probably doesn't block
/dev/mem so dmidecode should work fine.

16. Using system clang version info for OpenBSD kernel compiler, the assumption
being that a BSD is an OS, so the Clang version it shipped with would be the
clang version that compiled the kernel. Please correct if this is wrong.

17. OpenBSD RAID: support added for softraid, including for drive storage
totals, unmounted raid component detections. Plugged in pretty smoothly, able to
generate a partial report for non root, and shows message if not root.

18. VM detections upgraded, particularly for BSDs, now includes vmm, hvm,
hyper-v, kvm. Not all of these would have been detected before. Also cleaned up
vm logic, moved all vm detections into $dboot{'machine-vm'}, and only use the
first found item.

19. Disk Vendors!!: Yes, last, but not least!! More disk vendors, vendor ID
matches!! Yep. What else can I say? Eternity? Man's quest for something that
cannot be found, yet these strivings never cease, here manifested by always new
vendors and ID matches!

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

1. Very significant ongoing upgrades to the docs in inxi-perl/docs/,
particularly in inxi-values.txt, inxi-resources.txt, and inxi-data.txt. These
are now increasingly useful, and I am trying to keep in particular
inxi-values.txt up to date as a primary reference for various features, though
it will always lag, because that's how it is, lol.

2. Cleaned up changelog, made 80 cols wide for text, bars, etc, made numbered
lists and headers consistent, but otherwise did not change any of the actual
content.

--------------------------------------------------------------------------------
CODE CHANGES:

1. Complete rewrite of BSD disk/partition data tools, now  there is one core
tool that generates a mega-disk/partition hash, which is then used for all
features that need partition/disk data. This worked out super well, and allowed
new features like BSD Unmounted disk data to be generated for the first time
ever, along with filling in various block device fields that were missing
before.

2. Change 1 also went along with a refactor of dmesg data tool for BSDs, which
allowed for much more granular data generation, along with a complex %dboot hash
which stores all sub types as well as the main full dataset. This allowed inxi
to stop looping through all of dmesg data each time a feature needed it. Now all
the data types are assigned if required by a feature, and only then. This, along
with change 1, worked really well.

See also Bug 3, which mandated completely changing how dmesg.boot and dmesg live
data were / are merged, the result is far more robust now, and far less prone to
error.

3. Similar to dmesg changes, used same methods for sysctl data, now all the data
is assigned to %sysctl data structure based on if needed or not, so it only does
the assignments one time, in one location. Much cleaner code this way, and
allows for testing set/unset substructures, like $sysctl{'cpu'}.

4. The %dboot and %sysctl refactors went so well that I switched the core USB
and Devices to also use %usb and %devices structures. These updates let me dump
a lot of global hashes and arrays, and leaned everything down a lot, and also
removed basically all the testing loops for these data types, now the Item
features just test to see if a reference to the specific type exists, if it
does, it has data, if not, it doesn't, this is a lot easier to manage.

5. Ongoing: moving related subroutines to Packages, the goal is to have pretty
much all related subroutines (functions) contained in parent classes/packages,
makes it easier to maintain.

6. Ongoing: making all internal package tools have similar sub names, getting
rid of the specific names for output and data generator functions. This makes
each Item Generator increasingly like all the others, as much as practical.

7. A big one, renamed all the feature generators to be XxxxxItem, instead of
XxxxData, which was colliding as a package name with actual data generator
tools, now all the Feature generators are [Feature]Item, and all the Data
generators have Data type names where relevant. This avoided in particular the
silly case where I was relying on case to differentiate UsbData and USBData,
feature vs data generator.

8. As part of the move to data hash global structures, also moved as many of the
top global scalars and hashes and arrays to these now much more heavily utilized
global hashes, like %alerts, %use, %fake, %force, and so on. There are now far
fewer globals running than before, and where it makes sense, I keep moving them
into global hashes, and giving the global hashes more work to do.

9. Significantly expanded list of debuggers for specific data types always
available, see docs/inxi-values.txt for list of options there. Decided for rapid
development, it was too much of a pain to always be uncommenting the debuggers,
so now am uncommenting, adding to @dbg supported items, then documenting. I
guess this means the @dbg items are more or less stable and consistent now, give
or take.

10. Refactored UsbData and DeviceData, for in particular the BSDs, to be much
more robust and to rely less on very fragile regex parsing patterns, takes more
lines of code, but better than having the detections break every other BSD
release. This was part of the %device and %usb refactors as well.

11. Fixed system_files()  too, which was really silly logic, it used a global
packed hash of system files, then would do a function call for the paths when
required, which was redundant since the values were already in a hash which
could be used directly. This was a throwback to inxi gawk/bash, where hashes
were not really used in this way, and the logic had been translated to Perl
without thinking about it, but once I thought about it, I realized how silly
that was. This must have knocked off a good 50 or more unnecessary, and always
expensive, function calls.
2021-04-16 20:41:58 -07:00
Harald Hope
3d4d1f533c Bugs!! Fixes! Spring cleaning!
Because these are either newly created, or newly discovered, bugs,
this release was pushed as early as possible to get them fixed asap.

BUGS:
1. Desktop: Lumina detection had a syntax error which made it not work.
This has been broken for a while.

2. Logical: if not root, and if LUKS / bcache detected, failed to load
proc_partitions, which generates error on --logical --admin since the
required components data was not loaded. This was an oversight.

3. The 3.3.02 ShellData refactor created a bug for console IRC, showed
shell, not irc client, name, and set default shell data which also
showed.

4. Console IRC tty: there was also an older bug that made -S, -G
not work consistently, and there were errors that had been missed
for many years in that logic. These should all be corrected, console
irc out of display, or in display as root, should now show tty info,
tty size in -G.

FIXES:
1. Memory: restored $bsd_type block on /proc/meminfo and force NetBSD
to use a corrected vmstat. This leaves that block of logic to correct
the NetBSD oddities in meminfo, but it may fix future isses that popup.

2. -Sxxx man page item incorrectly said XDG_VTNR was systemd/linux, it's
not, it's various things, GhostBSD has it, for example. See what you get
for believing what people say!

3. Logical: added in N/A for null maj-min in --logical report. While
bug 2 triggered those errors, there could be future cases where maj-min
are null, like BSD lvm data etc.

ENHANCEMENTS:
1. Going along with Fix 1, added '--force meminfo' in case you really want that.

2. Distro: System Base: Added TrueNAS detection.

3. Package Data: Added mport [MidnightBSD] type. That requires root to run
for some odd reason, so won't see the best output if not root.

CHANGES:
1. Moved logical to -v7 from -v8, it's stable enough now.

CODE CHANGES:
1. Moved get_tty_number and get_tty_console_irc to ShellData:tty_number
and ShellData::tty_console_irc.

ShellData::tty_number was being loaded several times, added
$loaded{'tty-number'} test, and made client{'tty-number'} to store value.

tty_console_irc changed to console_irc_tty, which is what it gets, removed
hacks and made it load once and store result in client hash.

2. Optimization: retested sub vs package::method and they run at exactly
the same time, give or take, so moving more stuff into packages to make
it easier to maintain.
2021-03-17 19:39:02 -07:00
Harald Hope
75433a383a Huge upgrade!! Bug Fixes!! Refactors!!! BSDs!!! More BSDs!!!
raspberry pi!! New Features!!! Enhanced old features!!! Did I
mention bluetooth?! USB? Audio? No? well, all hugely upgraded!

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

1. Sadly, 3.3.01 went out with a bug, forgot to remove a debugger,
resulted in hardcoded kernel compiler version always showing.

Note that there is a new inxi-perl/docs/inxi-bugs.txt file to
track such bugs, and matched to specific tagged releases so you
know the line number and items to update to fix it.

2. Typo in manjaro system base match resulted in failing to report
system base as expected.

------------------------------------------------------------------------
KNOWN ISSUES BUT CAN'T OR WON'T BE FIXED:

1. OpenBSD made fvwm -version output an error along with the
version, and not in the normal format for standard fvwm, this
is just too complicated to work around for now, though it could
be in theory by creating a dedicated fvwm-oBSD item in
program_values. But that kind of granularity gets too hard to track,
and they are likely to change or fix this in the future anyway.
Best is they just restore default -version output to what it is
elsewhere, not nested in error outputs.

2. Discovered an oddity, don't know how widespread this
is, but Intel SSDs take about 200 milliseconds to get the sys
hwmon based drive temps, when it should take under a
millisecond, this may be a similar cause as those drives having
a noticeable SMART report delay, not sure. This is quite
noticeable since 200 ms is about 15% of the total execution
time on my test system.

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

1. For --recommends, added different rpm SUSE xdpyinfo package name.

2. Distro Data: added double term filter for lsb-release due to sometimes
generating repeated names in distro.

3. Packages: fix for appimage package counts.

4. Desktop: fixed ID for some wm when no xprop installed, fallback to
using @ps_cmd detections, which usually work fine.

5a. When swap used was 0, showed N/A, fixed to correctly show 0 KiB.

5b. If no swap devices found, BSDs were not correctly showing
no swap data found message. Corrected.

6a. Bluetooth: Removed hcidump from debugger, in some cases, that will
just hang endlessly. Also wrapped bluetoothctl and bt-adapter debugger
data collection with @ps_cmd bluetooth running test. Only run if
bluetooth service is running.

6b. Bluetooth: running detections have to be very strict, only
bluetoothd, not bluetooth, the latter can show true when bluetoothd
is not running, and did in my tests.

7. USB: with Code Change 1, found a few places where fallback usb type
detections were creating false matches, which resulted in say,
bluetooth devices showing up as network devices due to the presence
of the word 'wireless' in the device description. These matches are
all updated and revised to be more accurate and less error prone.

8. Battery: an oversight, had forgotten to have percent used of
available capacity, which made Battery data hard to decipher, now
it shows the percent of available total, as well as the condition
percent, so it's easier to understand the data now, and hopefully
more clear.

9a. OpenBSD changed usbdevs output format sometime in the latest
releases, which made the delicate matching patterns fail. Updated
to handle both variants. They also changed pcidump -v formatting
at some point, now inxi will try to handle either. Note that
usbdevs updates also work fine on NetBSD.

9b. FreeBSD also changed their pciconf output in beta 13.0, which
also broke the detections completely, now checks for old and new
formats. Sigh. It should not take this much work to parse tools
whose output should be consistent and reliable. Luckily I ran
the beta prior to this release, or all pci device detections
would simply have failed, without fallback.

9c. Dragonfly BSD also changed an output format, in vmstat, that
made the RAM used report fail. Since it's clearly not predictable
which BSD will change support for which vmstat options, now just
running vmstat without options, and then using processing logic
to determine what to do with the results.

10. It turns out NetBSD is using /proc/meminfo, who would have
thought? for memory data, but they use it in a weird way that
could result in either negative or near 0 ram used. Added in
some filters to not allow such values to print, now it tries
to make an educated guess about how much ram the system is
really using based on some tests.

11. Something you'd only notice if testing a lot, uptime failed
when the uptime was < 1 minute, it had failed to handle the seconds
only option, now it does, seconds, minutes, hours:minutes,
days hours:minutes, all work.

12. Missed linsysfs type to exclude in partitons, that was a partner
to linprocfs type, both are BSD types.

13. Added -ww to ps arguments, that stops the cutting width to terminal
size default behavior in BSDs, an easy fix, wish I'd known about
that a long time ago.

15. gpart seems to show sizes in bytes, not the expected KiB, so
that's now handled internally. Hopefully that odd behavior won't
randomly change in the future, sigh.

16. Fixed slim dm detection, saw instance where it's got slim.pid
like normal dms, not the slim.lock which inxi was looking for, so
now inxi looks for both, and we're all happy!

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

1. Added in something that should have been there all along, now inxi
validates the man page download as well as the self, this avoids
corrupted downloads breaking the man.

2. Init: added support for shepherd init system.

3. Distro Data: added support for guix distro ID; added support for
NomadBSD, GhostBSD, HardenedBSD system base. GhostBSD also shows the main
package version for the distro version ID, which isn't quite the
same as the version you download, but it's close. Also added os-release
support for BSDs, using similar tests as for linux distros, that
results in nicer outputs for example for Dragonfly BSD.

4. Package Data: added guix/scratch [venom]/kiss/nix package managers.
Update for slackware 15 package manager data directory relocation,
now handles either legacy current or future one.

5. Repos: added scratch/kiss/nix-channels; Added GhostBSD, HardenedBSD
pkg repos.

6. USB Data: added usbconfig. That's FreeBSD's, and related systems.

7. Device Data: Added pcictl support, that's NetBSD's, I thought
inxi had supported that, but then I remembered last time I tried to
run netBSD in a vm, I couldn't get it figured out. Now debugged and
working reasonably well.

8. Raspberry Pi 3, 4: ethernet nic now detected; wifi device,
which is on a special mmcnr type, now works, that stopped working in
pi 3, due to the change, now it's handled cleanly. Also added support
for pi bluetooth, which lives on a special serial bus, not usb.
For Raspberry Pi OS, added system base detections, which are tricky.
Also matched mmcnr devices to IF data, which was trickyy as well.
Note that as far as I could discover, only pi puts wifi on mmcnr.

9. Bluetooth: due to deprecated nature of the fine hciconfig
utility, added in support for bt-adapter, which also allows matching
of bluetooth data to device data, but is very sparse in info
supplied compared to hciconfig. bluetoothctl does not have enough
data to show the hci device, so it's not used, since inxi can't
match the bluetooth data to the device (no hci[x]). This should help
the distros that are moving away from hciconfig, in particular,
AUR is only way arch users can get hciconfig, which isn't ideal.

10. New tool and feature, ServiceData, this does two things,
as cross platform as practical, show status of bluetooth service,
this should help a lot in support people debugging bluetooth problems,
since you have bluetooth enabled but down, or up, disabled, and you
can also have the device itself down or up, so now it shows all that
data together for when it's down, but when the device is up, it just
shows the device status since the other stuff is redundant then.

In -Sa, it now shows the OS service manager that inxi detected
using a bunch of fallback tests, that's useful to admins who
are on a machine they don't know, then you can see the service
manager to use, like rc-service, systemctl, service, sv, etc.

11. Big update for -A: Sound Servers: had always been really
just only ALSA, now it shows all detected sound servers, and whether
they are running or not. Includes: ALSA, OSS, PipeWire, PulseAudio,
sndio, JACK. Note that OSS version is a guess, might be wrong source
for the version info.

12. Added USB device 'power:' item, that's in mA, not a terrible
thing to have listed, -xxx. This new feature was launched cross
platform, which is nice. Whether the BSD detections will break
in the future of course depends on whether they change the output
formats again or not. Also added in USB more chip IDs, which can
be useful. For BSDs, also added in a synthetic USB rev, taken
from the device/hub speeds. Yes, I know, USB 2 can have low speed,
full speed, or high speed, and 1.1 can have low and full speeds,
so you actually can't tell the USB revision version from the speeds,
but it's close enough.

13. Made all USB/Device data the same syntax and order, more
predictable, bus, chip, class IDs all the same now.

14. Added in support for hammer and null/nullfs file system types,
which trigger 'logical:' type device in partitions, that's also
more correct than the source: Err-102 that used to show, which
was really just a flag to alert me visibly that the partition
type detection had simply failed internally. Now for detected
types, like zfs tank/name or null/nullfs, it knows they are
logical structures.

15. Expanded BSD CPU data, where available, now can show L1/L2/
L3 cache, cpu arch, stepping, family/model ids, etc, which is
kind of nifty, although, again, delicate fragile rules that
will probably break in the future, but easier to fix now.

16. By an old request, added full native BSD doas support.
That's a nice little tool, and it plugged in fairly seamlessly
to existing sudo support. Both the internal doas/sudo stuff
should work the same, and the detection of sudo/doas start
should work the same too.

17a. Shell/Parent Data: Big refactor of the shell start/parent logic,
into ShellData which helped resolve some issues with running-in
showing shell name, not vt terminal or program name. Cause of that
is lots of levels of parents before inxi could reach the actual
program that was running inxi. Solution was to change to a longer
loop, and let it iterate 8 times, until it finds something that is
not a shell or sudo/doas/su type parent, this seems to work quite
well, you can only make it fail now if you actually try to do it on
purpose, which is fine.

This was very old logic, and carried some mistakes and
redundancies that made it very hard to understand, that's cleaned
up now. Also restored the old (login) value, which shows
when you use your normal login account on console, some system
will also now show (sudo,login) if the login user sudos inxi,
but that varies system to system.

17b. BSD running-in: Some of the BSDs now support the -f flag
for ps, which made the parent logic for running-in possible for
BSDs, which was nice. Some still don't support it, like OpenBSD
and NetBSD, but that's fine, inxi tests, and if no support detected,
just shows tty number. Adding in more robust support here cleaned
up some redundant logic internally as well.

17c. Updated terminal and shell ID detections, there's quite a few
new terminals this year, and a new shell or two. Those are needed
for more reliable detections of when the parent is NOT a shell,
which is how we find what it is.

18. Added ctwm wm support, that's the new default for NetBSD,
based on twm, has version numbers.

19. Upgraded BSD support for gpart and glabel data, now should
catch more more often.

20. For things like zfs raid, added component size, that doesn't
always work due to how zfs refers to its components, but it often
does, which is better than never before.

21. To make BSD support smoother, got rid of some OpenBSD only
rules, which in fact often apply to NetBSD as well. That may
lead to some glitches, but overall it's better to totally stay
away from OpenBSD only tests, and all BSD variant tests, and
just do dynamic testing that will work when it applies, and
not when it doesn't. In this case, added ftp downloader support
for netBSD by removing the openBSD only flag for that item.

There's a bit of a risk there in a sense since if different ftp
programs with different options were to be the fallback for something
else, it might get used, but that's fine, it's a corner case, better
to have them all work now than to worry about weird future things.
But limiting it to only BSDs should get rid of most of the problem.

vmstat and optical drive still use net/openbsd specifics because
it is too tricky to figure out it out in any more dynamic way.

22. For -Sxxx, added if systemd, display, virtual terminal number.
Could be useful to debug subtle issues, if the user is for example
not running their desktop in vt 7, the default for most systems.

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

1. Moved battery voltage to -Bx output, the voltage is quite
important to know since that is the key indicator of battery state.
If voltage is within .5 volts of specified minimum, shows voltage
for -B since that's a prefail condition, it's getting close to
death.

2. In partitions and raid, when the device was linear raid logical
type layout, it said, no-raid, when it should be 'linear', that's
now cleaner and more correct.

3. When running-in is a tty value, it will now show the entire
tty ID, minus the '/dev/tty', this will be more precise, and also
may resolve cases where tty was fully alpha, no numbers, previously
inxi filtered out everything that was not a number, but that can
in some tty types remove critical tty data, so now it will show:

running-in:
tty 2 [not changed]; tty pts/2 [adds pts/]; tty E2 [adds the E];
tty rx [would have not shown at ll before]

------------------------------------------------------------------------
CODE CHANGES:

NOTE: unlike the previous refactors, a lot of these changes were
done to make inxi more maintainable, which means, slightly less
optimized, which has been my preference in the past, but if the
stuff can't be maintained, it doesn't matter how fast it runs!

These changes have really enhanced the quality of the code and
made it a lot easier to work with. It's also now a lot easier to
add debuggers, force/fake data switches, etc, so it gets done,
unlike before, when it was a pain, so it got skipped, and then
caused bugs because of stray debuggers left in place, and so on.

The bright side is while reading up on this, I learned that using
very large subs is much more efficient than many small ones,
which I've always felt was the case, and it is, so the style
used internally in inxi proves to be the best one for optimizations.

These refactors, ongoing, have now touched at least 1/3, almost
1/2, of the entire inxi codebase, so the stuff is getting more
and more consistent and up to date, but given how old the logic
is in places, there will be more refactors in the future, and
maybe once the code is easier to maintain, some renewed
optimizations!, if we can find anything that makes sense, like
passing array/hash references back to the caller, already the
first half is done, passing references to the sub/method always.

The second part is started, using the Benchmark Perl module,
which really speeds up testing and helps avoid pointless tweaks
that do little re speed improvements.

I could see with some care some areas where working on data
directly via references could really speed things up, but it's
hard to write and read that type of code, but it's already being
done in the recursive data and output logics, and a few other
places.

1. Large refactor of USBData, that was done in part to help make
it work for BSDs better, but also to get it better organized.

This refactor also made all the device items, like -A,-G,-N,-E
use the same methods for creating USB output, previously they
had used a hodgepodge of methods, some super old, it was not
possible to add USB support more extensively for BSDs without
this change.

Also added in some fallback usb type detection tools using
several large online collections of that info to see what possible
matching patterns could catch more devices and correctly match
them to their type, which is the primary way now that usb output
per type is created. This really helps with BSDs, though BSD
usb utilities suffer from less data than lsusb so they don't always
get device name strings in a form where they can be readily ID'ed,
but it's way better than it was before, so that's fine!

Moved all previous methods of detecting if a card/device was USB
into USBData itself so it would all be in one place, and easier
to maintain.

All USB tools now use bus_id_alpha for sorting, and all now
sort as well, that was an oversight, previously the BSD usb
tools were not sorted, but those have been enhanced a lot, so
sorting on alpha synthetic bus ids became possible.

Removed lsusb as a BSD option, it's really unreliable, and the data
is different, and also varies a lot, it didn't really work at all
in Dragonfly, or had strange output, so lsusb is now a linux only
item.

2. Moved various booleans that were global to %force, %loaded, and
some to the already present, but lightly used, %use hashes. It was
getting too hard to add tests etc, which was causing bugs to happen.
Yes, using hashes is slower than hardcoding in the boolean scalars,
but this change was done to improve maintainability, which is starting
to matter more.

3. Moved several sets of subs to new packages, again, to help with
debugging and maintainability. MemoryData, redone in part to
handle the oddities with NetBSD reporting of free, cached, and
buffers, but really just to make it easier to work with overall.
Also moved kernel parameter logic to KernelParameters, gpart logic
to GpartData, glabel logic to GlabelData, ip data IpData, check_tools
to CheckTools, which was also enhanced largely, and simplified,
making it much easier to work with.

4. Wrapped more debugger logic in $fake{data} logic, that makes
it harder to leave a debugger uncommented, now to run it, you have
to trigger it with $fake{item} so the test runs, that way even if
I forget to comment it out, it won't run for regular user.

5. Big update to docs in branch inxi-perl/docs, those are now
much more usable for development. Updated in particular
inxi-values.txt to be primary reference doc for $fake, $dbg,
%force, %use, etc types and values. Also updated inxi-optimization.txt
and inxi-resources.txt to bring them closer to the present.

Created inxi-bugs.txt as well, which will help to know which known
bugs belonged to which frozen pools. These bugs will only refer
to bugs known to exist in tagged releases in frozen pool distros.

6. For sizes, moved most of the sizing to use main::translate_size,
this is more predictable, though as noted, these types of
changes make inxi a bit slower since it moved stuff out of inline
to using quick expensive sub calls, but it's a lot easier to
maintain, and that's getting to be more important to me now.

7. In order to catch live events, added in dmesg to dmesg.boot data
in BSDs, that's the only way I could find to readily detect
usb flash drives that were plugged in after boot. Another hack,
these will all come back to bite me, but that's fine, the base
is easier to work on and debug now, so if I want to spend time
revisiting the next major version BSD releases, it will be easier
to resolve the next sets of failures.

8. A big change, I learned about the non greedy operator for
regex patterns, ?, as in, .*?(next match rule), it will now
go up only to the next match rule. Not knowing this simple
little thing made inxi use some really convoluted regex to
avoid such greedy patterns. Still some gotchas with ?, like
it ignores following rules that are zero or 1, ? type, and
just treats it as zero instances. But that's easy to work with.

9. Not totally done, but now moved more to having set data
tools set their $loaded{item} value in get data, not externally,
that makes it easier to track the stuff. Only where it makes
sense, but there's a lot of those set/get items, they should
probably all become package/classes, with set/get I think.

10. Optimized reader() and grabber() and set_ps_aux_data(), all
switched from using grep/map to using for loops, that means
inxi doesn't have to go through each array 2x anymore, actually
4x in  the case of set_ps_aux_data(). This saved a visible
amount of execution time, I noticed this lag when running
pinxi through NYTProf optimizer, there was a quite visible
time difference between grabber/reader and  the subshell
time, these optimizations almost removed that difference,
meaning only the subshell now really takes any time to run.

Optimized url_cleaner and data_cleaner in RepoData, those
now just work directy on the array references, no returns.

Ran some more optimization tests, but will probably hold off
on some of them, for example, using cleaner() by reference is
about 50% faster than by copy, but redoing that requires
adding in many copies from read only things like $1, so
the change would lead to slightly less clean code, but may
revisit this in the future, we'll see.

But in theory, basically all the core internal tools that
take a value and modify it should do that by reference
purely since it's way faster, up to 10x.
2021-03-15 18:44:00 -07:00
Harald Hope
d11f2a7a89 small man fix 2021-02-08 17:15:46 -08:00
Harald Hope
2b49b32223 Bug fixes!! Fixes!!! Refactors!!! Edits!!!
Bugs:
1. Big bug, 3.2 appears to have introduced this bug, for disks, rotation and
partition scheme would never show, oops.

2. Tiny bug kept one specific smart value from ever showing, typo.

Fixes:
1. Accidentally followed Arch linux derived distro page, which claims KaOS as
arch derived, when of course it's not, it's its own distro, own toolchain, etc.
I kind of knew this but had forgotten, then I believed the Arch derived distro
page, oh well. Resulted in KaOS being listed with arch linux as system base
with -Sx. Arch should fix this, it's not like it's hard, just remove the distro
from the page.

2. Cleared up explanations for drivetemp vs hddtemp use, updated --recommends,
man, and help to hopefully make this clear. Debian will be dropping hddtemp,
which is not maintained, sometime in the coming years, sooner than later.
Note that users unfortunately have to manually enable drivetemp module unless
their distros enable it by default, but the man/recommands/help explain that.

3. Fixed smart indentation issues, that went along with code change 1, was
failing to indent one further level for failed/age values like it's supposed
to.

Enhancements:
1. Added /proc/device to debugger, that will help track block device main numbers

2. More disk vendors, more disk vendor IDs!!! As noted, the enternal flow flows
eternally, thanks linux-lite hardware database users!! and other inxi users,
whose outputs sometimes reveal a failure or two.

3. Added loaded kernel module tests to --recommends, this was mostly to let users
know that drivetemp is needed if you want non superuser fast drive temps, and
that this came along with kernels 5.6 or newer. Hopefully word will start drifting
out. Note that if inxi is using drivetemp values, drive temps will appear as
regular user with -Dx, and will be to 1 decimal place. hddtemp temps are
integers, and requires sudo to display the temps.

4. To handle issue #239  which I'd thought of trying off and on, but never did,
added option to -Dxxx to show SSD if a positive SSD ID was made to rotation:
So rotation will show either nothing, if no rotation or ssd data is detected,
the disk speed in rpm, or SSD if an SSD device. There may be corner cases where
this is wrong, but I don't have data for that, for example, if a disk is parked
and has zero rotation but is a HDD, not as SSD. I don't know what the data
looksl ike in that case. Note that if sudo inxi -Da is used, and smartctl is
installed, it should be right almost all the time, and with regular -Dxxx, it's
going to be right almost always, with a few corner cases. That slight
uncertainty is why I never implemented this before. Legacy drives also sometimes
did not report rotation speeds even when HDD, so those may create issues,
but inxi will only call it an SSD if it's an nvme, mmcblk device, both are
easy to ID as SSD, or if it meets certain conditions. It will not call a drive
an SSD if it was unable to meet those conditions.

INTERNAL CODE CHANGES:
1. Refactored the output logic for DiskData, that was messy, split it into a few
subs, and also refactored the way smartctl data was loaded and used, that's
much cleaner and easier to use now. Split the previous 1 big sub into:
totals_output(), drives_output(), and smart_output().
Also split out the smart field arrays into a separate sub, which loads
references to avoid creating new arrays and copying them all over when outputting
smart data. References are weird to work with directly but they are MUCH faster
to use, so I'm moving as much of the internal logic to use array raferences
instead of dereferenced arrays/hashes assigned to a new array, or hash.

2. Redid all the output modules and renamed them to be more consistent and
predictable, and redid the logic here and there to make the get() items be fairly
similar on all the data builder packages. Now as with the data subs, which
generally end in _data, now most of the output subs end with _output.

3. Roughly finished the process started in 3.2, got rid of redundant array loads,
changed:
@something = something_data();
push (@rows,@something);
to:
push (@rows,something_data());
which avoids creating an extra array, this also let me remove many arrays overall.

4. Missed a few hashes in machine data that were being passed directly, not as
references, to other subs, corrected that. I think I missed those because they
were %, so the search I did for @ in sub arg lists didn't catch the % hashes.
2021-02-08 17:07:34 -08:00
Harald Hope
a68b1e8358 Bug fixes!! New Feature!! Edits, cleanups!!
Bugs:
1. Small bug, wrong regex would make mdraid unused report never show.
Was looking for ^used, not ^unused. No idea how that happened, but it's fixed.

2. Big RAID bug. Due to never having seen an 'inactive' state mdraid dataset,
inxi had a bunch of bugs around that. I'd assumed active and inactive would have
roughly the same syntax, but they don't. This is now corrected. Thanks Solus user
for giving me the required data. This case when not corrected resulted in a
spray of errors as RAID ran, and a fairly incomplete RAID report for mdraid.

3. A bug that probably never impacted anyone, but in SMART the matching rules
failed to match field name Size[s]? in the logical/physical block sizes.
However, those were already coming in from I believe pre-existing /sys data
for the drives but now it's fixed anyway. I had not realized that smartctl
made it plural when logical/physical were different, and singular when
they were the same.

Fixes:
1. Going along with bug 2, fixed some other admin/non admin report glitches.
Made patterns more aggressively matching, whitelist based to avoid the types
of syntax issues that caused bug 2.

2. Added 'faulty' type to mdraid matches, that had not been handled.

3. Found even more of those pesky 'card' references in help and man page,
replaced all of them with 'device[s]'.

4. Subtle fix, for debugger data collectors, added -y1 support, which can
be useful at times.

Enhancements:
1. In USB data grabber, added fallback case for unspecified type cases, now
uses a simple name/driver string test to determine if it's graphics, audio,
or bluetooth. This was mainly to make sure bluetooth usb devices get caught.

2. New feature! -E/--bluetooth. Gives an -n like bluetooth Device-x/Report.
Requires for the 'Report:' part hciconfig, which most all distros still have
in their repos. With -a, shows an additional Info: line that has more obscure
bluetooth hci data: acl-mtu sco-mtu, link-policy, link-mode, service-classes.

This closes the ancient, venerable issue #79, filed by mikaela so many years
ago. Better late than never!! However, features like this were really difficult
in legacy bash/gawk inxi 2.x, and became fairly easy with inxi 3.x, so I guess
we'll slowly whittle away at these things when the mood, and global pandemic
lockdowns, make that seem like a good idea...

Includes a small lookup table to match LMP number to Bluetooth version (bt-v:),
hopefully that's a correct way to determine bluetooth version, there was some
ambiguity about that.

-x, -xx, and -xxx function pretty much the same way as with -A, -G, and -N
devices, adding Chip IDs, Bus IDs, version info, and so on.
Since this bluetooth report does not require root and is an upper case option,
it's been added to default -F, similar to -R, and -v 5, where raid/bluetooth
shows only if data is found. With -v7 or -R or -E, always shows, including
no data found message.

Includes a fallback report Report-ID: case where for some reason, inxi could
not match the HCI ID with the device. That's similar to IF-ID in -n, which
does the same when some of the IFs could not be matched to a specific device.

3. For -A, -G, -N, and -E, new item for -xxx, classID, I realized this is
actually useful for many cases of trying to figure out what devices are,
though most users would not know what to do with that information, but that's
why it's an -xxx option!

4. Yes! You've been paying attention!! More disk vendors, and new vendor IDs!!
The cornucopia flows its endless bounty over the grateful data collector, and,
hopefully, inxi users!! Thanks as always, linux-lite hardware database, and
linux-lite users who really seem set on the impossible project of obtaining
all the disks/vendors known to man.

Changes:
1. Small change in wording for mdraid report:
'System supported mdraid' becomes 'Supported mdraid levels' which is cleaner
and much more precise.
2021-01-28 20:02:42 -08:00
Harald Hope
1e2d470c69 That damned Kate editor bug where it randomly sprays out characters
that were in the desktop clipboard caused 3 random pastes of the
characters 'failed' into the man page. Kate needs to get their damned
crap in order!!! It's becoming unusable.
2021-01-13 17:32:13 -08:00
Harald Hope
6e4cd28791 New version, man page, bug fixes, changes, adjustments and cleanups!!!
Special thanks to mr. mazda for his ongoing suggestions, ideas, and observations.

Bugs:
1. In certain corner cases, it appears that lsusb has blank lines, which tripped
errors in inxi output when the usb parser was trying to access split keys that did
not exist. Added in check to make sure split actually resulted in expected data.

2. A red face bug, I'd left the output debugger switched on with json output, so
it was printing out the json data structure with Dumper, that's now switched off.
Hope this doesn't mess anyone up, but it would have mattered only if the person
was using:
--output json --output-type print
It did not effect xml output.

Fixes:
1. Got rid of extra level of -L data structure and output handler. Not visible
to users, but still irksome, so nice to get that fixed. Recursive structures are
confusing, lol, but this extra level was pointless, but to fix it required redoing
the logic a bit for both data generator and output feature.

2. Added in support for --display :0.0, previously it did not support the
.0 addition, but why not, if it works for people, good, if not, makes no difference.

3. There were some missing cases for LVM missing data messages, so the following
fixes were added:
 * In cases where lsblk is installed and user is non root, or lvs is not installed,
 but no lvm data is present, inxi now shows the expected 'Message: No LVM data found.'
 instead of the permissions or missing program error that showed before.
 If lsblk is not installed, and lvm is installed (or missing), with lvs not root
 readable, the permissiosn message (or missing program) will show since at that
 point, inxi has no way to know if there is lvm data or not.

 * Not an inxi, but rather an Arch Linux packaging bug, the maintainer of lvm
 has made lvs and vgs fail to return error number on non root start, which is
 a bug (pvs does return expected error return). Rather than wait for this bug
 to be fixed, inxi will just test if lvs and lsblk lvm data, it will show
 permissions message, otherwse the no lvm data message as expected.

I think these cover the last unhandled LVM cases I came across, so ideally, the
lvm data messages will be reasonably correct.

4. Some man page lintian fixes.

5. Changed usb data parser to use 'unless' instead of 'if' in tests since
it's easier to read unless positive tests are true than if negative or
negative etc.

Enhancements:
1. Since I see too often things like -F --no-host -z which is redundant, the
help and man now make it more clear that -z implies --no-host.

2. Even though it's not that pointful, I added in derived Arch Linux system
base like Ubuntu/Debian have. It's not that meaningful because unlike
Ubuntu/Debian, where you want to know what version the derived distro is
based on, Arch is rolling thus no versions, but I figured, why not, it's
easy to do, so might as well make the system base feature a bit more complete.

Note that the way I did this requires that the distro is ID'ed as its derived
distro nanme, not Arch Linux, that will vary depending on how they did their
os-release etc, or distro files, but that's not really an inxi issue, that's
up to them. From what I've been seeing, it looks like more of the derived
distros are being ID'ed in inxi as the derived name, so those should all work
fine. Note that seeing 'base:' requires -Sx.

3. More disk vendors!! More disk vendor IDs!!! I really dug into the stuff,
and refactored slightly the backend tools I use, so it's now a bit easier
to handle the data. Thanks linux-lite hardware database, as always, for
having users that really seemt to use every disk variant known to humanity.

Changes:
1. In -G, made FAILED: lower case, and also moved it to be after unloaded:
It was too easy to think that the loaded driver had failed. Also to make it
more explicit, made output like this, in other words, driver: is a container
for the possible children: loaded: unloaded: failed: alternate: which should be
easier to parse and read without mixing up what belongs to what.

driver: loaded: modesetting unloaded: nouvean,vesa alternate: nv
driver: loaded: amdgpu unloaded: vesa failed: ati

Note that if there is no unloaded: driver, failed: would still appear to come after
loaded:, but hopefully it's more clear now.

Basically what we found was that the presence of the uppercase FAILED: drew
the eye so much that it was sometimes not noted that it was a key: following
the driver: item, which itself because it did not list explicitly loaded:
was not as clear as it could have been. By making failed: the same as the
other key names visually, hopefully it will be less easy to think that the
loaded: driver failed:

In a sense, this is a legacy issue, because the original use of FAILED: was for
non free video drivers, to see when xorg had failed to load them, but over
more recent years, the most frequent thing I have been seeing is odd things
like failed: ati, when xorg tries to load the legacy ati driver when amdgpu
is being used.

2. Likewise, for RAID mdraid and zfs changed FAILED: to Failed:, again, to make it
more consistent with the other types.

3. In help menu and man page, removed legacy 'card(s)' in -A, -G, -N, and replaced
that with 'device(s)', which is the more accurate term, since the days when these
things were only addon cards are long behind us. I had not noticed that, but it
caught me eye and I realized it was a very deprecated and obsolete syntax, which
did not match the way inxi describes devices today.

4. It was pointed out how incoherent the naming of the item for setting wrap width,
--indent-min and config item INDENT_MIN were super confusing, since it was neither
indent or minimum, it was in fact wrap maximum, so the new options and config items
are --wrap-max and WRAP_MAX. Note that the legacy values will keep working, but
it was almost impossible in words to explain this option because the option text
was almost the exact opposite of what the option actually does. Redid the man
and help explanations to make the function of this option/config item more clear.

5. Made -J/--usb Hub-xx: to fit with other repeating device types in inxi output,
before Hub: was not numbered, but it struck me, it should be, like all the other
auto-incremented counter line starters, like ID-xx:, Device-x:, and so on.

6. Reorganized the main help menu to hopefully be more logical, now it shows the
primary output triggers, then after, the extra data items, -a, -x, -xx, -xxx,
separated by white space per type to make it easier to read. This also moved
the stuff that had been under the -x items back to where they should be, together
with the main output control options. For readability and usability, I think this
will help, the help menu is really long, so the more visual cues it has to make it
clear what each section is, the better I think. Previously -a was the first items,
then way further down was -x, -xx, and -xxx, then under those was -z, -Z, -y.
2021-01-10 19:20:21 -08:00
Harald Hope
df45e6d4ae Bug Fixes!!! Continuing internal refactor!!
This bug report came in right after 3.2.00 went out live, but I would never have
found it myself in testing so better found than not found!

Bugs:

1. A bug was introduced to dmidecode data handlers in 3.2.00 resulted in the
dmidecode data array basically eating itself up until errors appear. Quite difficult
to trigger, but babydr from Slackware forums figured it out, using -F --dmidecode
to force dmidecode use for all features that support it triggered thee bug always.
This was a result of the refactor, previously inxi had worked on copies of referenced
arrays, but in this case, it was working on the original array of arrays, subtle,
but obvious. This method was only used on dmidecode arrays.

2. A second bug was exposed almost by accident, for -M --dmidecode data, there was
a missing field and also a missing is set test on that field that led to an error
of using undefined value in string comparison. This was strictly speaking 2 bugs,
both very old, from 2.9 first rewrite, one failing to set/get the value, and the
other failing to test if the value was set before using it.

Fixes:

1. There were a few glitches in help menu and man page related to -L option, those
are corrected.

INTERNAL CODE CHANGES:
1. removed bug inducing splice use in some cases, and added parens to splice to make
it fit the new way of with perl builtins, when taking 2 or more arguments, use parens.

2. Found many more instances to add -> dereferencing operator. I have to say, not
doing that consistently made the code much harder to read, and created situations
where it's somewhat ambiguous what item belongs to what, with everything consistently
-> operator run, the code is more clear and obvious, and some of the hacks I'd added
because of the lack of clarity were also removed.

3. Removed explicit setting of hash references with null value, that was done out
of failure to use -> operators which clearly indicate to Perl and coder what is
happening, so those crutches were removed. Also got rid of unnecessary array
priming like: my @array = (); Some of these habits came from other languages,
but in Perl, declaring my @array means it's an array that is null, and you don't
need to do a further (). @array = () is obviously fine for resetting arrays in
loops or whatever, but not in the initial declaration.
2020-12-17 14:51:11 -08:00