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.
This commit is contained in:
Harald Hope 2022-04-07 22:49:36 -07:00
parent 29e241dc0f
commit 8e0b7b5ccf
3 changed files with 561 additions and 152 deletions

425
inxi
View file

@ -48,8 +48,8 @@ use POSIX qw(ceil uname strftime ttyname);
## INXI INFO ## ## INXI INFO ##
my $self_name='inxi'; my $self_name='inxi';
my $self_version='3.3.14'; my $self_version='3.3.15';
my $self_date='2022-03-25'; my $self_date='2022-04-08';
my $self_patch='00'; my $self_patch='00';
## END INXI INFO ## ## END INXI INFO ##
my ($b_pledge,@pledges); my ($b_pledge,@pledges);
@ -287,7 +287,7 @@ sub set_dmidecode {
} }
} }
else { else {
if (grep { $_ =~ /^\/dev\/mem: Permission/i } @$data){ if (grep {$_ =~ /(^\/dev\/mem: Permission|Permission denied)/i } @$data){
$action = 'permissions'; $action = 'permissions';
} }
else { else {
@ -444,6 +444,7 @@ sub set_basics {
$client{'name-print'} = ''; $client{'name-print'} = '';
$client{'su-start'} = ''; # shows sudo/su $client{'su-start'} = ''; # shows sudo/su
$client{'version'} = ''; $client{'version'} = '';
$client{'whoami'} = getpwuid($<) || '';
$colors{'default'} = 2; $colors{'default'} = 2;
$show{'partition-sort'} = 'id'; # sort order for partitions $show{'partition-sort'} = 'id'; # sort order for partitions
@raw_logical = (0,0,0); @raw_logical = (0,0,0);
@ -1852,6 +1853,7 @@ sub display_data {
print "Collecting X, xprop, glxinfo, xrandr, xdpyinfo data, Wayland info...\n"; print "Collecting X, xprop, glxinfo, xrandr, xdpyinfo data, Wayland info...\n";
%data = ( %data = (
'desktop-session' => $ENV{'DESKTOP_SESSION'}, 'desktop-session' => $ENV{'DESKTOP_SESSION'},
'display' => $ENV{'DISPLAY'},
'gdmsession' => $ENV{'GDMSESSION'}, 'gdmsession' => $ENV{'GDMSESSION'},
'gnome-desktop-session-id' => $ENV{'GNOME_DESKTOP_SESSION_ID'}, 'gnome-desktop-session-id' => $ENV{'GNOME_DESKTOP_SESSION_ID'},
'kde-full-session' => $ENV{'KDE_FULL_SESSION'}, 'kde-full-session' => $ENV{'KDE_FULL_SESSION'},
@ -1861,8 +1863,8 @@ sub display_data {
'xdg-session-desktop' => $ENV{'XDG_SESSION_DESKTOP'}, 'xdg-session-desktop' => $ENV{'XDG_SESSION_DESKTOP'},
'xdg-vtnr' => $ENV{'XDG_VTNR'}, 'xdg-vtnr' => $ENV{'XDG_VTNR'},
# wayland data collectors: # wayland data collectors:
'xdg-session-type' => $ENV{'XDG_SESSION_TYPE'},
'wayland-display' => $ENV{'WAYLAND_DISPLAY'}, 'wayland-display' => $ENV{'WAYLAND_DISPLAY'},
'xdg-session-type' => $ENV{'XDG_SESSION_TYPE'},
'gdk-backend' => $ENV{'GDK_BACKEND'}, 'gdk-backend' => $ENV{'GDK_BACKEND'},
'qt-qpa-platform' => $ENV{'QT_QPA_PLATFORM'}, 'qt-qpa-platform' => $ENV{'QT_QPA_PLATFORM'},
'clutter-backend' => $ENV{'CLUTTER_BACKEND'}, 'clutter-backend' => $ENV{'CLUTTER_BACKEND'},
@ -4084,7 +4086,10 @@ sub set_program_values {
'qmake' => ['^^Using Qt version',4,'--version','Qt',0,0,0,'',''], 'qmake' => ['^^Using Qt version',4,'--version','Qt',0,0,0,'',''],
'qtdiag' => ['^qt',2,'--version','Qt',0,1,0,'',''], 'qtdiag' => ['^qt',2,'--version','Qt',0,1,0,'',''],
## Display Managers (dm) ## ## Display Managers (dm) ##
'brzdm' => ['^brzdm',0,'-v','brzdm',0,1,0,'',''], # unverified, like slim
'cdm' => ['^cdm',0,'0','CDM',0,1,0,'',''], 'cdm' => ['^cdm',0,'0','CDM',0,1,0,'',''],
# might be xlogin, unknown output for -V
'clogin' => ['^clogin',0,'-V','clogin',0,1,0,'',''], # unverified, maybe xlogin
'emptty' => ['^emptty',0,'0','EMPTTY',0,1,0,'',''], # unverified 'emptty' => ['^emptty',0,'0','EMPTTY',0,1,0,'',''], # unverified
'entrance' => ['^entrance',0,'0','Entrance',0,1,0,'',''], 'entrance' => ['^entrance',0,'0','Entrance',0,1,0,'',''],
'gdm' => ['^gdm',2,'--version','GDM',0,1,0,'',''], 'gdm' => ['^gdm',2,'--version','GDM',0,1,0,'',''],
@ -4097,6 +4102,7 @@ sub set_program_values {
'lxdm' => ['^lxdm',0,'0','LXDM',0,1,0,'',''], 'lxdm' => ['^lxdm',0,'0','LXDM',0,1,0,'',''],
'ly' => ['^ly',3,'--version','Ly',0,1,0,'',''], 'ly' => ['^ly',3,'--version','Ly',0,1,0,'',''],
'mdm' => ['^mdm',0,'0','MDM',0,1,0,'',''], 'mdm' => ['^mdm',0,'0','MDM',0,1,0,'',''],
'mlogin' => ['^mlogin',0,'0','mlogin',0,1,0,'',''], # unverified
'nodm' => ['^nodm',0,'0','nodm',0,1,0,'',''], 'nodm' => ['^nodm',0,'0','nodm',0,1,0,'',''],
'pcdm' => ['^pcdm',0,'0','PCDM',0,1,0,'',''], 'pcdm' => ['^pcdm',0,'0','PCDM',0,1,0,'',''],
'qingy' => ['^qingy',0,'0','qingy',0,1,0,'',''], # unverified 'qingy' => ['^qingy',0,'0','qingy',0,1,0,'',''], # unverified
@ -4108,6 +4114,7 @@ sub set_program_values {
'wdm' => ['^wdm',0,'0','WINGs DM',0,1,0,'',''], 'wdm' => ['^wdm',0,'0','WINGs DM',0,1,0,'',''],
'xdm' => ['^xdm',0,'0','XDM',0,1,0,'',''], 'xdm' => ['^xdm',0,'0','XDM',0,1,0,'',''],
'xenodm' => ['^xenodm',0,'0','xenodm',0,1,0,'',''], 'xenodm' => ['^xenodm',0,'0','xenodm',0,1,0,'',''],
'xlogin' => ['^xlogin',0,'-V','xlogin',0,1,0,'',''], # unverified, probably clogin
## Shells - not checked: ion, eshell ## ## Shells - not checked: ion, eshell ##
## See ShellData::shell_test() for unhandled but known shells ## See ShellData::shell_test() for unhandled but known shells
'ash' => ['',3,'pkg','ash',1,0,0,'',''], # special; dash precursor 'ash' => ['',3,'pkg','ash',1,0,0,'',''], # special; dash precursor
@ -5507,7 +5514,7 @@ sub show_options {
['0', '', '', ''], ['0', '', '', ''],
['0', '', '', "You can use these options alone or together, ['0', '', '', "You can use these options alone or together,
to show or add the item(s) you want to see: A, B, C, D, E, G, I, J, L, M, N, to show or add the item(s) you want to see: A, B, C, D, E, G, I, J, L, M, N,
P, R, S, W, d, f, i, j, l, m, n, o, p, r, s, t, u, w, --slots. P, R, S, W, d, f, i, j, l, m, n, o, p, r, s, t, u, w, --edid, --slots.
If you use them with -v [level], -b or -F, $self_name will add the requested If you use them with -v [level], -b or -F, $self_name will add the requested
lines to the output."], lines to the output."],
['0', '', '', '' ], ['0', '', '', '' ],
@ -5557,8 +5564,8 @@ sub show_options {
LUKS, Crypto, bcache, etc. Shows components/devices, sizes, etc."], LUKS, Crypto, bcache, etc. Shows components/devices, sizes, etc."],
['1', '-m', '--memory', "Memory (RAM) data. Requires root. Numbers of ['1', '-m', '--memory', "Memory (RAM) data. Requires root. Numbers of
devices (slots) supported and individual memory devices (sticks of memory etc). devices (slots) supported and individual memory devices (sticks of memory etc).
For devices, shows device locator, size, speed, type (e.g. DDR3). For devices, shows device locator, type (e.g. DDR3), size, speed. If neither
If neither -I nor -tm are selected, also shows RAM used/total."], -I nor -tm are selected, also shows RAM used/total."],
['1', '', '--memory-modules', "Memory (RAM) data. Exclude empty module slots."], ['1', '', '--memory-modules', "Memory (RAM) data. Exclude empty module slots."],
['1', '', '--memory-short', "Memory (RAM) data. Show only short Memory RAM ['1', '', '--memory-short', "Memory (RAM) data. Show only short Memory RAM
report, number of arrays, slots, modules, and RAM type."], report, number of arrays, slots, modules, and RAM type."],
@ -5718,6 +5725,8 @@ sub show_options {
pressure, and if values are default or not."], pressure, and if values are default or not."],
['2', '-L', '', "LV, Crypto, devices, components: add maj:min; show ['2', '-L', '', "LV, Crypto, devices, components: add maj:min; show
full device/components report (speed, mapped names)."], full device/components report (speed, mapped names)."],
['2', '-m', '', "Show full volts report, current, min, max, even if
identical."],
['2', '-n,-N', '', "If available: list of alternate kernel modules/drivers ['2', '-n,-N', '', "If available: list of alternate kernel modules/drivers
for device(s); PCIe lanes-max: gen, speed, lanes (if relevant)."], for device(s); PCIe lanes-max: gen, speed, lanes (if relevant)."],
['2', '-o', '', "If available: maj:min of device."], ['2', '-o', '', "If available: maj:min of device."],
@ -5726,6 +5735,7 @@ sub show_options {
['2', '-r', '', "Packages, see -Ia."], ['2', '-r', '', "Packages, see -Ia."],
['2', '-R', '', "mdraid: device maj:min; per component: size, maj:min, state."], ['2', '-R', '', "mdraid: device maj:min; per component: size, maj:min, state."],
['2', '-S', '', "If available: kernel boot parameters."], ['2', '-S', '', "If available: kernel boot parameters."],
['2', '', '--slots', "If available: slot bus ID children."],
['0', '', '', ''], ['0', '', '', ''],
['1', '-x', '--extra', "Adds the following extra data (only works with ['1', '-x', '--extra', "Adds the following extra data (only works with
verbose or line output, not short form):"], verbose or line output, not short form):"],
@ -5760,8 +5770,7 @@ sub show_options {
['2', '-j', '', "Add mapped: name if partition mapped."], ['2', '-j', '', "Add mapped: name if partition mapped."],
['2', '-J', '', "For Device: driver."], ['2', '-J', '', "For Device: driver."],
['2', '-L', '', "For VG > LV, and other Devices, dm:"], ['2', '-L', '', "For VG > LV, and other Devices, dm:"],
['2', '-m,--memory-modules', '', "Max memory module size (if available), ['2', '-m,--memory-modules', '', "Max memory module size (if available)."],
device type."],
['2', '-N', '', "Specific vendor/product information (if relevant); ['2', '-N', '', "Specific vendor/product information (if relevant);
PCI/USB ID of device; Version/port(s)/driver version (if available)."], PCI/USB ID of device; Version/port(s)/driver version (if available)."],
['2', '-o,-p,-P', '', "Add mapped: name if partition mapped."], ['2', '-o,-p,-P', '', "Add mapped: name if partition mapped."],
@ -5773,6 +5782,7 @@ sub show_options {
vbat."], vbat."],
['2', '-S', '', "Kernel gcc version; system base of distro (if relevant ['2', '-S', '', "Kernel gcc version; system base of distro (if relevant
and detected)"], and detected)"],
['2', '', '--slots', "Adds BusID for slot."],
['2', '-t', '', "Adds memory use output to CPU (-xt c), and CPU use to ['2', '-t', '', "Adds memory use output to CPU (-xt c), and CPU use to
memory (-xt m)."], memory (-xt m)."],
); );
@ -5809,7 +5819,8 @@ sub show_options {
for LVM RAID, adds RAID report line (if not -R); show all components > for LVM RAID, adds RAID report line (if not -R); show all components >
devices, number of 'c' or 'p' indicate depth of device."], devices, number of 'c' or 'p' indicate depth of device."],
['2', '-m,--memory-modules', '', "Manufacturer, part number; single/double ['2', '-m,--memory-modules', '', "Manufacturer, part number; single/double
bank (if found)."], bank (if found); memory array voltage (legacy, rare); module voltage (if
available)."],
['2', '-M', '', "Chassis info, BIOS ROM size (dmidecode only), if available."], ['2', '-M', '', "Chassis info, BIOS ROM size (dmidecode only), if available."],
['2', '-N', '', "Chip vendor:product ID; PCIe speed, lanes (if found)."], ['2', '-N', '', "Chip vendor:product ID; PCIe speed, lanes (if found)."],
['2', '-r', '', "Packages, see -Ixx."], ['2', '-r', '', "Packages, see -Ixx."],
@ -5819,7 +5830,7 @@ sub show_options {
['2', '-S', '', "Display manager (dm) in desktop output (e.g. kdm, ['2', '-S', '', "Display manager (dm) in desktop output (e.g. kdm,
gdm3, lightdm); active window manager if detected; desktop toolkit, gdm3, lightdm); active window manager if detected; desktop toolkit,
if available (Xfce/KDE/Trinity only)."], if available (Xfce/KDE/Trinity only)."],
['2', '--slots', '', "Slot length."], ['2', '--slots', '', "Slot length; slot voltage, if available."],
); );
if ($use{'weather'}){ if ($use{'weather'}){
push(@data, push(@data,
@ -5846,8 +5857,8 @@ sub show_options {
['2', '-J', '', "If present: Devices: serial number, interface count; USB ['2', '-J', '', "If present: Devices: serial number, interface count; USB
speed; max power."], speed; max power."],
['2', '-m,--memory-modules', '', "Width of memory bus, data and total (if ['2', '-m,--memory-modules', '', "Width of memory bus, data and total (if
present and greater than data); Detail for Type, if present; module voltage, present and greater than data); Detail for Type, if present; module current,
if available; serial number."], min, max voltages (if present and different from each other); serial number."],
['2', '-N', '', "Serial number, class ID."], ['2', '-N', '', "Serial number, class ID."],
['2', '-R', '', "zfs-raid: portion allocated (used) by RAID devices/arrays. ['2', '-R', '', "zfs-raid: portion allocated (used) by RAID devices/arrays.
md-raid: system md-raid support types (kernel support, read ahead, RAID md-raid: system md-raid support types (kernel support, read ahead, RAID
@ -13685,11 +13696,8 @@ sub display_output(){
} }
# no xdpyinfo installed # no xdpyinfo installed
# undef $graphics{'x-server'}; # undef $graphics{'x-server'};
if (!$graphics{'x-server'} || !$graphics{'x-server'}->[0][1] || # Completes X server data if no previous detections, tests/adds xwayland
!$b_display || $graphics{'protocol'} eq 'wayland'){ display_server_data();
# fallback, will complete x-server/x-version, set flags, if found
display_server_data();
}
if (!defined $graphics{'display-id'} && defined $ENV{'DISPLAY'}){ if (!defined $graphics{'display-id'} && defined $ENV{'DISPLAY'}){
$graphics{'display-id'} = $ENV{'DISPLAY'}; $graphics{'display-id'} = $ENV{'DISPLAY'};
} }
@ -13771,36 +13779,43 @@ sub display_output(){
} }
# if xvesa, will always have display-driver set # if xvesa, will always have display-driver set
if ($graphics{'xvesa'} && $graphics{'display-driver'}){ if ($graphics{'xvesa'} && $graphics{'display-driver'}){
$row[0]->{main::key($num++,1,2,'driver')} = join(',',@{$graphics{'display-driver'}});; $row[0]->{main::key($num++,0,2,'driver')} = join(',',@{$graphics{'display-driver'}});
} }
else { else {
$row[0]->{main::key($num++,1,2,'driver')} = '';
# The only wayland setups with x drivers have xorg, transitional that is.
if ($x_drivers){
$row[0]->{main::key($num++,1,3,'X')} = '';
my $driver = ($x_drivers->[0]) ? $x_drivers->[0] : 'N/A';
$row[0]->{main::key($num++,1,4,'loaded')} = $driver;
if ($x_drivers->[1]){
$row[0]->{main::key($num++,0,4,'unloaded')} = $x_drivers->[1];
}
if ($x_drivers->[2]){
$row[0]->{main::key($num++,0,4,'failed')} = $x_drivers->[2];
}
if ($extra > 1 && $x_drivers->[3]){
$row[0]->{main::key($num++,0,4,'alternate')} = $x_drivers->[3];
}
}
my $gpu_drivers = gpu_drivers_sys('all'); my $gpu_drivers = gpu_drivers_sys('all');
my $drivers; my $note_indent = 4;
if ($gpu_drivers){ if ($gpu_drivers || $x_drivers){
$drivers = join(',',@{$gpu_drivers}); $row[0]->{main::key($num++,1,2,'driver')} = '';
# The only wayland setups with x drivers have xorg, transitional that is.
if ($x_drivers){
$row[0]->{main::key($num++,1,3,'X')} = '';
my $driver = ($x_drivers->[0]) ? $x_drivers->[0] : 'N/A';
$row[0]->{main::key($num++,1,4,'loaded')} = $driver;
if ($x_drivers->[1]){
$row[0]->{main::key($num++,0,4,'unloaded')} = $x_drivers->[1];
}
if ($x_drivers->[2]){
$row[0]->{main::key($num++,0,4,'failed')} = $x_drivers->[2];
}
if ($extra > 1 && $x_drivers->[3]){
$row[0]->{main::key($num++,0,4,'alternate')} = $x_drivers->[3];
}
}
my $drivers;
if ($gpu_drivers){
$drivers = join(',',@{$gpu_drivers});
}
else {
$drivers = ($graphics{'gpu-drivers'}) ? join(',',@{$graphics{'gpu-drivers'}}): 'N/A';
}
$row[0]->{main::key($num++,1,3,'gpu')} = $drivers;
} }
else { else {
$drivers = ($graphics{'gpu-drivers'}) ? join(',',@{$graphics{'gpu-drivers'}}): 'N/A'; $note_indent = 3;
$row[0]->{main::key($num++,1,2,'driver')} = 'N/A';
} }
$row[0]->{main::key($num++,1,3,'gpu')} = $drivers;
if ($driver_note){ if ($driver_note){
$row[0]->{main::key($num++,0,4,'note')} = $driver_note; $row[0]->{main::key($num++,0,$note_indent,'note')} = $driver_note;
} }
} }
} }
@ -14046,14 +14061,24 @@ sub monitors_output_full {
$$row[$j]->{main::key($$num++,0,$m3,'min')} = ${$monitors->{$key}{'modes'}}[-1]; $$row[$j]->{main::key($$num++,0,$m3,'min')} = ${$monitors->{$key}{'modes'}}[-1];
} }
} }
if ($show{'edid'} && ($monitors->{$key}{'errors'} || $monitors->{$key}{'warnings'})){ if ($show{'edid'}){
$j++; if ($monitors->{$key}{'edid-errors'}){
$$row[$j]->{main::key($$num++,1,$m2,'EDID')} = ''; $j++;
if ($monitors->{$key}{'errors'}){ my $cnt = 1;
$$row[$j]->{main::key($$num++,0,$m3,'errors')} = join('; ', @{$monitors->{$key}{'errors'}}); $$row[$j]->{main::key($$num++,1,$m2,'EDID-Errors')} = '';
foreach my $err (@{$monitors->{$key}{'edid-errors'}}){
$$row[$j]->{main::key($$num++,0,$m3,$cnt)} = $err;
$cnt++;
}
} }
if ($monitors->{$key}{'warnings'}){ if ($monitors->{$key}{'edid-warnings'}){
$$row[$j]->{main::key($$num++,0,$m3,'warnings')} = join('; ', @{$monitors->{$key}{'warnings'}}); $j++;
my $cnt = 1;
$$row[$j]->{main::key($$num++,1,$m2,'EDID-Warnings')} = '';
foreach my $warn (@{$monitors->{$key}{'edid-warnings'}}){
$$row[$j]->{main::key($$num++,0,$m3,$cnt)} = $warn;
$cnt++;
}
} }
} }
} }
@ -15041,8 +15066,7 @@ sub display_server_data {
} }
$graphics{'x-server'} = [[$server,$version]] if $server; $graphics{'x-server'} = [[$server,$version]] if $server;
} }
if ((!$b_display || $graphics{'protocol'} eq 'wayland') && if ($program = main::check_program('Xwayland')){
($program = main::check_program('Xwayland'))){
undef $version; undef $version;
@data = main::grabber("$program -version 2>&1",'','strip'); @data = main::grabber("$program -version 2>&1",'','strip');
# Slackware Linux Project Xwayland Version 21.1.4 (12101004) # Slackware Linux Project Xwayland Version 21.1.4 (12101004)
@ -15201,17 +15225,22 @@ sub display_protocol {
elsif ($graphics{'protocol'} eq 'tty'){ elsif ($graphics{'protocol'} eq 'tty'){
$graphics{'protocol'} = ''; $graphics{'protocol'} = '';
} }
# need to confirm that there's a point to this test, I believe no, fails out of x # If no other source, get user session id, then grab session type.
# loginctl also results in the session id # loginctl also results in the session id
if (!$graphics{'protocol'} && $b_display && $force{'display'}){ # undef $graphics{'protocol'};
if (!$graphics{'protocol'}){
if (my $program = main::check_program('loginctl')){ if (my $program = main::check_program('loginctl')){
my $id = ''; my $id = '';
# $id = $ENV{'XDG_SESSION_ID'}; # returns tty session in console # $id = $ENV{'XDG_SESSION_ID'}; # returns tty session in console
my @data = main::grabber("$program --no-pager --no-legend 2>/dev/null",'','strip'); my @data = main::grabber("$program --no-pager --no-legend 2>/dev/null",'','strip');
foreach (@data){ foreach (@data){
next if /tty[v]?[0-6]$/; # freebsd: ttyv3 # some systems show empty or ??? for TTY field, but whoami should do ok
next if /(ttyv?\d|pts\/)/; # freebsd: ttyv3
# in display, root doesn't show in the logins
next if $client{'whoami'} && $client{'whoami'} ne 'root' && !/\b$client{'whoami'}\b/;
$id = (split(/\s+/, $_))[0]; $id = (split(/\s+/, $_))[0];
last; # multiuser? too bad, we'll go for the first one # multiuser? too bad, we'll go for the first one that isn't a tty/pts
last;
} }
if ($id){ if ($id){
my $temp = (main::grabber("$program show-session $id -p Type --no-pager --no-legend 2>/dev/null"))[0]; my $temp = (main::grabber("$program show-session $id -p Type --no-pager --no-legend 2>/dev/null"))[0];
@ -18018,7 +18047,7 @@ sub set_partitions {
$fs = ($b_fs) ? $row[1]: get_mounts_fs($row[0],\@mount); $fs = ($b_fs) ? $row[1]: get_mounts_fs($row[0],\@mount);
} }
# assuming that all null/nullfs are parts of a logical fs # assuming that all null/nullfs are parts of a logical fs
$b_logical = 1 if $fs && $fs =~ /^(btrfs|hammer|null|zfs)/; $b_logical = 1 if $fs && $fs =~ /^(btrfs|hammer|null|wekafs|zfs)/;
$id = join(' ', @row[$cols .. $#row]); $id = join(' ', @row[$cols .. $#row]);
$size = $row[$cols - $back_size]; $size = $row[$cols - $back_size];
if ($b_admin && -e "/sys/block/"){ if ($b_admin && -e "/sys/block/"){
@ -19950,7 +19979,7 @@ sub ram_output {
$rows[$j]->{main::key($num++,0,3,'note')} = $item->{'mod-qualifier'}; $rows[$j]->{main::key($num++,0,3,'note')} = $item->{'mod-qualifier'};
} }
} }
if ($extra > 2 && $item->{'voltage'}){ if ($extra > 1 && $item->{'voltage'}){
$rows[$j]->{main::key($num++,0,2,'voltage')} = $item->{'voltage'}; $rows[$j]->{main::key($num++,0,2,'voltage')} = $item->{'voltage'};
} }
} }
@ -19975,12 +20004,22 @@ sub ram_output {
$mod->{'locator'} ||= 'N/A'; $mod->{'locator'} ||= 'N/A';
push(@rows, { push(@rows, {
main::key($num++,1,2,'Device') => $mod->{'locator'}, main::key($num++,1,2,'Device') => $mod->{'locator'},
main::key($num++,0,3,'size') => process_size($mod->{'size'}),
}); });
next if ($mod->{'size'} =~ /\D/); # this will contain the no module string
if ($mod->{'size'} =~ /\D/){
$rows[$j]->{main::key($num++,0,3,'type')} = lc($mod->{'size'});
next;
}
if ($extra > 1 && $mod->{'type'}){ if ($extra > 1 && $mod->{'type'}){
$rows[$j]->{main::key($num++,0,3,'info')} = $mod->{'type'}; $rows[$j]->{main::key($num++,0,3,'info')} = $mod->{'type'};
} }
$mod->{'device-type'} ||= 'N/A';
$rows[$j]->{main::key($num++,1,3,'type')} = $mod->{'device-type'};
if ($extra > 2 && $mod->{'device-type'} ne 'N/A'){
$mod->{'device-type-detail'} ||= 'N/A';
$rows[$j]->{main::key($num++,0,4,'detail')} = $mod->{'device-type-detail'};
}
$rows[$j]->{main::key($num++,0,3,'size')} = process_size($mod->{'size'});
if ($mod->{'speed'} && $mod->{'configured-clock-speed'} && if ($mod->{'speed'} && $mod->{'configured-clock-speed'} &&
$mod->{'speed'} ne $mod->{'configured-clock-speed'}){ $mod->{'speed'} ne $mod->{'configured-clock-speed'}){
$rows[$j]->{main::key($num++,1,3,'speed')} = ''; $rows[$j]->{main::key($num++,1,3,'speed')} = '';
@ -20001,19 +20040,45 @@ sub ram_output {
$rows[$j]->{main::key($num++,1,3,'speed')} = $mod->{'speed'}; $rows[$j]->{main::key($num++,1,3,'speed')} = $mod->{'speed'};
$rows[$j]->{main::key($num++,0,4,'note')} = $mod->{'speed-note'} if $mod->{'speed-note'}; $rows[$j]->{main::key($num++,0,4,'note')} = $mod->{'speed-note'} if $mod->{'speed-note'};
} }
if ($extra > 0){ # handle cases where -xx or -xxx and no voltage data (common) or voltages
$mod->{'device-type'} ||= 'N/A'; # are all the same.
$rows[$j]->{main::key($num++,0,3,'type')} = $mod->{'device-type'}; if ($extra > 1){
if ($extra > 2 && $mod->{'device-type'} ne 'N/A'){ if (($mod->{'voltage-config'} || $mod->{'voltage-max'} || $mod->{'voltage-min'}) &&
$mod->{'device-type-detail'} ||= 'N/A'; ($b_admin || (
$rows[$j]->{main::key($num++,0,3,'detail')} = $mod->{'device-type-detail'}; ($mod->{'voltage-config'} && $mod->{'voltage-max'} &&
$mod->{'voltage-config'} ne $mod->{'voltage-max'}) ||
($mod->{'voltage-config'} && $mod->{'voltage-min'} &&
$mod->{'voltage-config'} ne $mod->{'voltage-min'}) ||
($mod->{'voltage-min'} && $mod->{'voltage-max'} &&
$mod->{'voltage-max'} ne $mod->{'voltage-min'})
))){
$rows[$j]->{main::key($num++,1,3,'volts')} = '';
if ($mod->{'voltage-config'}){
$rows[$j]->{main::key($num++,0,4,'curr')} = $mod->{'voltage-config'};
}
if ($mod->{'voltage-min'}){
$rows[$j]->{main::key($num++,0,4,'min')} = $mod->{'voltage-min'};
}
if ($mod->{'voltage-max'}){
$rows[$j]->{main::key($num++,0,4,'max')} = $mod->{'voltage-max'};
}
}
else {
$mod->{'voltage-config'} ||= 'N/A';
$rows[$j]->{main::key($num++,0,3,'volts')} = $mod->{'voltage-config'};
} }
} }
if ($source ne 'dboot' && $extra > 2){ if ($source ne 'dboot' && $extra > 2){
$mod->{'data-width'} ||= 'N/A'; if (!$mod->{'data-width'} && !$mod->{'total-width'}){
$rows[$j]->{main::key($num++,0,3,'bus-width')} = $mod->{'data-width'}; $rows[$j]->{main::key($num++,0,3,'width')} = 'N/A';
$mod->{'total-width'} ||= 'N/A'; }
$rows[$j]->{main::key($num++,0,3,'total')} = $mod->{'total-width'}; else {
$rows[$j]->{main::key($num++,1,3,'width (bits)')} = '';
$mod->{'data-width'} ||= 'N/A';
$rows[$j]->{main::key($num++,0,4,'data')} = $mod->{'data-width'};
$mod->{'total-width'} ||= 'N/A';
$rows[$j]->{main::key($num++,0,4,'total')} = $mod->{'total-width'};
}
} }
if ($source ne 'dboot' && $extra > 1){ if ($source ne 'dboot' && $extra > 1){
$mod->{'manufacturer'} ||= 'N/A'; $mod->{'manufacturer'} ||= 'N/A';
@ -20066,7 +20131,7 @@ sub dmidecode_data {
$ram[$k]->{'max-capacity-5'} = $max_cap_5; $ram[$k]->{'max-capacity-5'} = $max_cap_5;
} }
elsif ($temp[0] eq 'Memory Module Voltage'){ elsif ($temp[0] eq 'Memory Module Voltage'){
$temp[1] =~ s/\s*V.*$//; $temp[1] =~ s/\s*V.*$//; # seen: 5.0 V 3.3 V
$ram[$k]->{'voltage'} = $temp[1]; $ram[$k]->{'voltage'} = $temp[1];
} }
elsif ($temp[0] eq 'Associated Memory Slots'){ elsif ($temp[0] eq 'Associated Memory Slots'){
@ -20111,7 +20176,7 @@ sub dmidecode_data {
$bank_locator = $temp[1]; $bank_locator = $temp[1];
} }
elsif ($temp[0] eq 'Type'){ elsif ($temp[0] eq 'Type'){
$device_type = $temp[1]; $device_type = main::clean_dmi($temp[1]);
} }
} }
# because of the wide range of bank/slot type data, we will just use # because of the wide range of bank/slot type data, we will just use
@ -20176,6 +20241,7 @@ sub dmidecode_data {
$main_locator) = ('','','','',''); $main_locator) = ('','','','','');
my ($manufacturer,$vendor_id,$part_number,$serial,$speed,$speed_note, my ($manufacturer,$vendor_id,$part_number,$serial,$speed,$speed_note,
$total_width) = ('','','','','','',''); $total_width) = ('','','','','','','');
my ($voltage_config,$voltage_max,$voltage_min);
my ($device_size,$i_data,$i_total,$working_size) = (0,0,0,0); my ($device_size,$i_data,$i_total,$working_size) = (0,0,0,0);
foreach my $item (@$entry){ foreach my $item (@$entry){
@temp = split(/:\s*/, $item, 2); @temp = split(/:\s*/, $item, 2);
@ -20183,11 +20249,14 @@ sub dmidecode_data {
if ($temp[0] eq 'Array Handle'){ if ($temp[0] eq 'Array Handle'){
$handle = hex($temp[1]); $handle = hex($temp[1]);
} }
# these two can have 'none' or 'unknown' value
elsif ($temp[0] eq 'Data Width'){ elsif ($temp[0] eq 'Data Width'){
$data_width = $temp[1]; $data_width = main::clean_dmi($temp[1]);
$data_width =~ s/[\s_-]?bits// if $data_width;
} }
elsif ($temp[0] eq 'Total Width'){ elsif ($temp[0] eq 'Total Width'){
$total_width = $temp[1]; $total_width = main::clean_dmi($temp[1]);
$total_width =~ s/[\s_-]?bits// if $total_width;
} }
# do not try to guess from installed modules, only use this to correct type 5 data # do not try to guess from installed modules, only use this to correct type 5 data
elsif ($temp[0] eq 'Size'){ elsif ($temp[0] eq 'Size'){
@ -20211,11 +20280,12 @@ sub dmidecode_data {
elsif ($temp[0] eq 'Form Factor'){ elsif ($temp[0] eq 'Form Factor'){
$form_factor = $temp[1]; $form_factor = $temp[1];
} }
# these two can have 'none' or 'unknown' value
elsif ($temp[0] eq 'Type'){ elsif ($temp[0] eq 'Type'){
$device_type = $temp[1]; $device_type = main::clean_dmi($temp[1]);
} }
elsif ($temp[0] eq 'Type Detail'){ elsif ($temp[0] eq 'Type Detail'){
$device_type_detail = $temp[1]; $device_type_detail = main::clean_dmi($temp[1]);
} }
elsif ($temp[0] eq 'Speed'){ elsif ($temp[0] eq 'Speed'){
($speed,$speed_note) = process_speed($temp[1],$device_type,$check); ($speed,$speed_note) = process_speed($temp[1],$device_type,$check);
@ -20235,6 +20305,21 @@ sub dmidecode_data {
elsif ($temp[0] eq 'Serial Number'){ elsif ($temp[0] eq 'Serial Number'){
$serial = main::clean_unset($temp[1],'^[0]+$|SerNum.*'); $serial = main::clean_unset($temp[1],'^[0]+$|SerNum.*');
} }
elsif ($temp[0] eq 'Configured Voltage'){
if ($temp[1] =~ /^([\d\.]+)/){
$voltage_config = $1;
}
}
elsif ($temp[0] eq 'Maximum Voltage'){
if ($temp[1] =~ /^([\d\.]+)/){
$voltage_max = $1;
}
}
elsif ($temp[0] eq 'Minimum Voltage'){
if ($temp[1] =~ /^([\d\.]+)/){
$voltage_min = $1;
}
}
} }
# because of the wide range of bank/slot type data, we will just use # because of the wide range of bank/slot type data, we will just use
# the one that seems most likely to be right. Some have: Bank: SO DIMM 0 slot: J6A # the one that seems most likely to be right. Some have: Bank: SO DIMM 0 slot: J6A
@ -20293,6 +20378,9 @@ sub dmidecode_data {
$ram[$handle]->{'modules'}[$i]{'speed'} = $speed; $ram[$handle]->{'modules'}[$i]{'speed'} = $speed;
$ram[$handle]->{'modules'}[$i]{'speed-note'} = $speed_note if $speed_note; $ram[$handle]->{'modules'}[$i]{'speed-note'} = $speed_note if $speed_note;
$ram[$handle]->{'modules'}[$i]{'total-width'} = $total_width; $ram[$handle]->{'modules'}[$i]{'total-width'} = $total_width;
$ram[$handle]->{'modules'}[$i]{'voltage-config'} = $voltage_config;
$ram[$handle]->{'modules'}[$i]{'voltage-max'} = $voltage_max;
$ram[$handle]->{'modules'}[$i]{'voltage-min'} = $voltage_min;
$i++ $i++
} }
elsif ($entry->[0] < 17){ elsif ($entry->[0] < 17){
@ -20563,7 +20651,9 @@ sub process_data {
'slots' => $item->{'slots-16'}, 'slots' => $item->{'slots-16'},
'slots-qualifier' => $est_slots, 'slots-qualifier' => $est_slots,
'use' => $item->{'use'}, 'use' => $item->{'use'},
'voltage' => $item->{'voltage'}, 'voltage-config' => $item->{'voltage-config'},
'voltage-max' => $item->{'voltage-max'},
'voltage-min' => $item->{'voltage-min'},
}); });
} }
eval $end if $b_log; eval $end if $b_log;
@ -22770,12 +22860,16 @@ sub gpu_data {
## SlotItem ## SlotItem
{ {
package SlotItem; package SlotItem;
my ($sys_slots);
sub get { sub get {
eval $start if $b_log; eval $start if $b_log;
my ($data,@rows,$key1,$val1); my ($data,@rows,$key1,$val1);
my $num = 0; my $num = 0;
if ($fake{'dmidecode'} || ($alerts{'dmidecode'}->{'action'} eq 'use' && if ($fake{'dmidecode'} || ($alerts{'dmidecode'}->{'action'} eq 'use' &&
(!%risc || $use{'slot-tool'}))){ (!%risc || $use{'slot-tool'}))){
if ($b_admin && -e '/sys/devices/pci0000:00'){
slot_data_sys();
}
$data = slot_data_dmi(); $data = slot_data_dmi();
@rows = slot_output($data) if $data; @rows = slot_output($data) if $data;
if (!@rows){ if (!@rows){
@ -22836,13 +22930,8 @@ sub slot_output {
$rows[$j]->{main::key($num++,0,2,'MHz')} = $slot_data->{'mhz'}; $rows[$j]->{main::key($num++,0,2,'MHz')} = $slot_data->{'mhz'};
} }
$rows[$j]->{main::key($num++,0,2,'status')} = $slot_data->{'usage'}; $rows[$j]->{main::key($num++,0,2,'status')} = $slot_data->{'usage'};
if ($slot_data->{'j'} || $slot_data->{'m2'}){ if ($slot_data->{'extra'}){
my $info = ($slot_data->{'m2'}) ? $slot_data->{'m2'} : ''; $rows[$j]->{main::key($num++,0,2,'info')} = join(', ', @{$slot_data->{'extra'}});
if ($slot_data->{'j'}){
$info .= ' ' if $info;
$info .= $slot_data->{'j'};
}
$rows[$j]->{main::key($num++,0,2,'info')} = $info;
} }
if ($extra > 1){ if ($extra > 1){
$slot_data->{'length'} ||= 'N/A'; $slot_data->{'length'} ||= 'N/A';
@ -22850,19 +22939,40 @@ sub slot_output {
if ($slot_data->{'cpu'}){ if ($slot_data->{'cpu'}){
$rows[$j]->{main::key($num++,0,2,'cpu')} = $slot_data->{'cpu'}; $rows[$j]->{main::key($num++,0,2,'cpu')} = $slot_data->{'cpu'};
} }
if ($slot_data->{'volts'}){
$rows[$j]->{main::key($num++,0,2,'volts')} = $slot_data->{'volts'};
}
} }
if ($extra > 0){ if ($extra > 0){
$slot_data->{'bus_address'} ||= 'N/A'; $slot_data->{'bus_address'} ||= 'N/A';
$rows[$j]->{main::key($num++,0,2,'bus-ID')} =$slot_data->{'bus_address'}; $rows[$j]->{main::key($num++,1,2,'bus-ID')} = $slot_data->{'bus_address'};
if ($b_admin && $slot_data->{'children'}){
children_output(\@rows,$j,\$num,$slot_data->{'children'},3);
}
} }
} }
eval $end if $b_log; eval $end if $b_log;
return @rows; return @rows;
} }
sub slot_children { sub children_output {
eval $start if $b_log; my ($rows,$j,$num,$children,$ind) = @_;
my $cnt = 0;
eval $end if $b_log; $rows->[$j]{main::key($$num++,1,$ind,'children')} = '';
$ind++;
foreach my $id (sort keys %{$children}){
$cnt++;
$rows->[$j]{main::key($$num++,1,$ind,$cnt)} = $id;
if ($children->{$id}{'class-id'} && $children->{$id}{'class-id-sub'}){
my $class = $children->{$id}{'class-id'} . $children->{$id}{'class-id-sub'};
$rows->[$j]{main::key($$num++,0,($ind + 1),'class-ID')} = $class;
if ($children->{$id}{'class'}){
$rows->[$j]{main::key($$num++,0,($ind + 1),'type')} = $children->{$id}{'class'};
}
}
if ($children->{$id}{'children'}){
children_output($rows,$j,$num,$children->{$id}{'children'},$ind + 1);
}
}
} }
sub slot_data_dmi { sub slot_data_dmi {
eval $start if $b_log; eval $start if $b_log;
@ -22870,7 +22980,7 @@ sub slot_data_dmi {
my @slots; my @slots;
foreach my $slot_data (@dmi){ foreach my $slot_data (@dmi){
next if $slot_data->[0] != 9; next if $slot_data->[0] != 9;
my %data; my (%data,@extra);
# skip first two row, we don't need that data # skip first two row, we don't need that data
foreach my $item (@$slot_data[2 .. $#$slot_data]){ foreach my $item (@$slot_data[2 .. $#$slot_data]){
if ($item !~ /^~/){ # skip the indented rows if ($item !~ /^~/){ # skip the indented rows
@ -22887,14 +22997,20 @@ sub slot_data_dmi {
if ($value[0] eq 'ID'){ if ($value[0] eq 'ID'){
$data{'id'} = $value[1]; $data{'id'} = $value[1];
} }
if ($extra > 1 && $value[0] eq 'Length'){ if ($value[0] eq 'Length'){
$data{'length'} = lc($value[1]); $data{'length'} = lc($value[1]);
} }
if ($extra > 1 && $value[0] eq 'Bus Address'){ if ($value[0] eq 'Bus Address'){
$value[1] =~ s/^0000://; $value[1] =~ s/^0000://;
$data{'bus_address'} = $value[1]; $data{'bus_address'} = $value[1];
if ($b_admin && $sys_slots){
$data{'children'} = slot_children($data{'bus_address'},$sys_slots);
}
} }
} }
elsif ($item =~ /^~([\d.]+)[\s-]?V is provided/){
$data{'volts'} = $1;
}
} }
if ($data{'type'} eq 'Other' && $data{'designation'}){ if ($data{'type'} eq 'Other' && $data{'designation'}){
$data{'type'} = $data{'designation'}; $data{'type'} = $data{'designation'};
@ -22906,6 +23022,9 @@ sub slot_data_dmi {
$string =~ s/(PCI[\s_-]?Express|Pci[_-]?e)/PCIe /ig; $string =~ s/(PCI[\s_-]?Express|Pci[_-]?e)/PCIe /ig;
$string =~ s/PCI[\s_-]?X/PCIX /ig; $string =~ s/PCI[\s_-]?X/PCIX /ig;
$string =~ s/Mini[\s_-]?PCI/MiniPCI /ig; $string =~ s/Mini[\s_-]?PCI/MiniPCI /ig;
$string =~ s/Media[\s_-]?Card/MediaCard/ig;
$string =~ s/Express[\s_-]?Card/ExpressCard/ig;
$string =~ s/Card[\s_-]?Bus/CardBus/ig;
$string =~ s/PCMCIA/PCMCIA /ig; $string =~ s/PCMCIA/PCMCIA /ig;
if (!$data{'pci'} && $string =~ /(AGP|ISA|MiniPCI|PCIe|PCIX|PCMCIA|PCI)/){ if (!$data{'pci'} && $string =~ /(AGP|ISA|MiniPCI|PCIe|PCIX|PCMCIA|PCI)/){
$data{'pci'} = $1; $data{'pci'} = $1;
@ -22922,18 +23041,21 @@ sub slot_data_dmi {
if (!$data{'lanes-active'} && $string =~ /^x\d+ .*? x(\d+)/){ if (!$data{'lanes-active'} && $string =~ /^x\d+ .*? x(\d+)/){
$data{'lanes-active'} = $1; $data{'lanes-active'} = $1;
} }
if (!defined $data{'slot'} && $string =~ s/SLOT-?(\d+)?\b//){
$data{'slot'} = $1 if defined $1;
}
# legacy format, seens with PCI-X/PCIe mobos: PCIX#2-100MHz, PCIE#3-x8 # legacy format, seens with PCI-X/PCIe mobos: PCIX#2-100MHz, PCIE#3-x8
if (!defined $data{'id'} && $string =~ /(#|PCI)(\d+)\b/){ if (!defined $data{'id'} && $string =~ /(#|PCI)(\d+)\b/){
$data{'id'} = $2; $data{'id'} = $2;
} }
if (!$data{'j'} && $string =~ s/\bJ-?(\S+)\b//){ if (!defined $data{'id'} && $string =~ /SLOT[\s-]?(\d+)\b/i){
$data{'j'} = 'J' . $1; $data{'id'} = $1;
} }
if (!$data{'m2'} && $string =~ s/\bM\.?2\b//){ if ($string =~ s/\bJ-?(\S+)\b//){
$data{'m2'} = 'M.2'; push(@extra,'J' . $1) if ! grep {$_ eq 'J' . $1} @extra;
}
if ($string =~ s/\bM\.?2\b//){
push(@extra,'M.2') if ! grep {$_ eq 'M.2'} @extra;
}
if ($string =~ /(ExpressCard|MediaCard|CardBus)/){
push(@extra,$1) if ! grep {$_ eq $1} @extra;
} }
if (!$data{'cpu'} && $string =~ s/CPU-?(\d+)\b//){ if (!$data{'cpu'} && $string =~ s/CPU-?(\d+)\b//){
$data{'cpu'} = $1; $data{'cpu'} = $1;
@ -22950,6 +23072,12 @@ sub slot_data_dmi {
} }
$i++; $i++;
} }
if (!$data{'pci'} && $data{'type'} &&
$data{'type'} =~ /(ExpressCard|MediaCard|CardBus)/){
$data{'pci'} = $1;
@extra = grep {$_ ne $data{'pci'}} @extra;
}
$data{'extra'} = [@extra] if @extra;
push(@slots,{%data}) if %data; push(@slots,{%data}) if %data;
} }
print '@slots: ', Data::Dumper::Dumper \@slots if $dbg[48]; print '@slots: ', Data::Dumper::Dumper \@slots if $dbg[48];
@ -22957,6 +23085,80 @@ sub slot_data_dmi {
eval $end if $b_log; eval $end if $b_log;
return \@slots if @slots; return \@slots if @slots;
} }
sub slot_data_sys {
eval $start if $b_log;
my $path = '/sys/devices/pci0000:*/00*';
my @data = main::globber($path);
my ($full,$id);
foreach $full (@data){
$id = $full;
$id =~ s/^.*\/\S+:([0-9a-f]{2}:[0-9a-f]{2}\.[0-9a-f]+)$/$1/;
$sys_slots->{$id} = slot_data_recursive($full);
}
print 'sys_slots: ', Data::Dumper::Dumper $sys_slots if $dbg[49];
main::log_data('dump','$sys_slots',$sys_slots) if $b_log;
eval $end if $b_log;
}
sub slot_data_recursive {
eval $start if $b_log;
my $path = shift @_;
my $info = {};
my $id = $path;
$id =~ s/^.*\/\S+:(\S{2}:\S{2}\.\S+)$/$1/;
my ($content,$id2,@files);
# @files = main::globber("$full/{class,current_link_speed,current_link_width,max_link_speed,max_link_width,00*}");
if (-e "$path/class" && ($content = main::reader("$path/class",'strip',0))){
if ($content =~ /^0x(\S{2})(\S{2})/){
$info->{'class-id'} = $1;
$info->{'class-id-sub'} = $2;
$info->{'class'} = DeviceData::pci_class($1);
if ($info->{'class-id'} eq '06'){
my @files = main::globber("$path/00*:[0-9a-f][0-9a-f]:[0-9a-f][0-9a-f].[0-9a-f]");
foreach my $item (@files){
$id = $item;
$id =~ s/^.*\/[0-9a-f]+:([0-9a-f]{2}:[0-9a-f]{2}\.[0-9a-f]+)$/$1/;
$info->{'children'}{$id} = slot_data_recursive($item);
}
}
}
}
if (-e "$path/current_link_speed" &&
($content = main::reader("$path/current_link_speed",'strip',0))){
$content =~ s/\sPCIe//i;
$info->{'current-link-speed'} = main::clean_dmi($content);
}
if (-e "$path/current_link_width" &&
($content = main::reader("$path/current_link_width",'strip',0))){
$info->{'current-link-width'} = $content;
}
eval $end if $b_log;
return $info;
}
sub slot_children {
eval $start if $b_log;
my ($bus_id,$slots) = @_;
my $children = slot_children_recursive($bus_id,$slots);
# $children->{'0a:00.0'}{'children'} = {'3423' => {
# 'class' => 'test','class-id' => '05','class-id-sub' => '10'}};
print $bus_id, ' children: ', Data::Dumper::Dumper $children if $dbg[49];
main::log_data('dump','$children',$children) if $b_log;
eval $end if $b_log;
return $children;
}
sub slot_children_recursive {
my ($bus_id,$slots) = @_;
my $children;
foreach my $key (keys %{$slots}){
if ($slots->{$bus_id}){
$children = $slots->{$bus_id}{'children'} if $slots->{$bus_id}{'children'};
last;
}
elsif ($slots->{$key}{'children'}){
slot_children_recursive($bus_id,$slots->{$key}{'children'});
}
}
return $children;
}
} }
## SwapItem ## SwapItem
@ -25084,7 +25286,6 @@ sub set_xprop {
} }
## DeviceData / PCI / SOC
# creates arrays: $devices{'audio'}; $devices{'graphics'}; $devices{'hwraid'}; # creates arrays: $devices{'audio'}; $devices{'graphics'}; $devices{'hwraid'};
# $devices{'network'}; $devices{'timer'} and local @devices for logging/debugging # $devices{'network'}; $devices{'timer'} and local @devices for logging/debugging
# 0 type # 0 type
@ -26158,9 +26359,12 @@ sub get_display_manager {
# Not verified: qingy emptty; greetd.run verified, but alternate: # Not verified: qingy emptty; greetd.run verified, but alternate:
# greetd-684.sock if no .run seen. Add Ly in case they add run file/directory. # greetd-684.sock if no .run seen. Add Ly in case they add run file/directory.
# greetd frontends: agreety dlm gtkgreet qtgreet tuigreet wlgreet # greetd frontends: agreety dlm gtkgreet qtgreet tuigreet wlgreet
my @dms = qw(cdm emptty entranced gdm gdm3 greetd kdm kdm3 ldm lightdm lxdm ly # mlogin may be mlogind, not verified
mdm nodm pcdm qingy sddm slim tbsm tdm udm wdm xdm xenodm); my @dms = qw(brzdm cdm clogin emptty entranced gdm gdm3 greetd kdm kdm3 ldm
# these are the only one I know of so far that have version info lightdm lxdm ly mdm mlogin nodm pcdm qingy sddm slim tbsm tdm udm wdm xdm
xenodm xlogin);
# these are the only one I know of so far that have version info. xlogin /
# clogin do, -V, brzdm -v, but syntax not verified.
my @dms_version = qw(gdm gdm3 lightdm ly slim); my @dms_version = qw(gdm gdm3 lightdm ly slim);
my $pattern = ''; my $pattern = '';
if (-d '/run'){ if (-d '/run'){
@ -26928,6 +27132,7 @@ sub generate_data {
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/ram/dmidecode-speed-configured-2.txt"; # $file = "$ENV{'HOME'}/bin/scripts/inxi/data/ram/dmidecode-speed-configured-2.txt";
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/ram/00srv-dmidecode-mushkin-1.txt"; # $file = "$ENV{'HOME'}/bin/scripts/inxi/data/ram/00srv-dmidecode-mushkin-1.txt";
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/dmidecode/dmidecode-slots-pcix-pcie-1.txt"; # $file = "$ENV{'HOME'}/bin/scripts/inxi/data/dmidecode/dmidecode-slots-pcix-pcie-1.txt";
# $file = "$ENV{'HOME'}/bin/scripts/inxi/data/dmidecode/dmidecode-Microknopix-pci-vga-types-5-6-16-17.txt";
# open(my $fh, '<', $file) or die "can't open $file: $!"; # open(my $fh, '<', $file) or die "can't open $file: $!";
# chomp(@data = <$fh>); # chomp(@data = <$fh>);
} }
@ -28586,37 +28791,37 @@ sub parse_edid {
sub _edid_errors { sub _edid_errors {
my $edid = shift @_; my $edid = shift @_;
if (!defined $edid->{edid_version}){ if (!defined $edid->{edid_version}){
_edid_error('edid-version','undefined'); _edid_error($edid,'edid-version','undefined');
} }
elsif ($edid->{edid_version} < 1 || $edid->{edid_version} > 2){ elsif ($edid->{edid_version} < 1 || $edid->{edid_version} > 2){
_edid_error('edid-version',$edid->{edid_version}); _edid_error($edid,'edid-version',$edid->{edid_version});
} }
if (!defined $edid->{edid_revision}){ if (!defined $edid->{edid_revision}){
_edid_error('edid-revision','undefined'); _edid_error($edid,'edid-revision','undefined');
} }
elsif ($edid->{edid_revision} == 0xff){ elsif ($edid->{edid_revision} == 0xff){
_edid_error('edid-revision',$edid->{edid_revision}); _edid_error($edid,'edid-revision',$edid->{edid_revision});
} }
if ($edid->{monitor_range}){ if ($edid->{monitor_range}){
if (!$edid->{monitor_range}{horizontal_min}){ if (!$edid->{monitor_range}{horizontal_min}){
_edid_error('edid-sync','no horizontal'); _edid_error($edid,'edid-sync','no horizontal');
} }
elsif ($edid->{monitor_range}{horizontal_min} > $edid->{monitor_range}{horizontal_max}){ elsif ($edid->{monitor_range}{horizontal_min} > $edid->{monitor_range}{horizontal_max}){
_edid_error('edid-sync', _edid_error($edid,'edid-sync',
"bad horizontal values: min: $edid->{monitor_range}{horizontal_min} max: $edid->{monitor_range}{horizontal_max}"); "bad horizontal values: min: $edid->{monitor_range}{horizontal_min} max: $edid->{monitor_range}{horizontal_max}");
} }
if (!$edid->{monitor_range}{vertical_min}){ if (!$edid->{monitor_range}{vertical_min}){
_edid_error('edid-sync','no vertical'); _edid_error($edid,'edid-sync','no vertical');
} }
elsif ($edid->{monitor_range}{vertical_min} > $edid->{monitor_range}{vertical_max}){ elsif ($edid->{monitor_range}{vertical_min} > $edid->{monitor_range}{vertical_max}){
_edid_error('edid-sync', _edid_error($edid,'edid-sync',
"bad vertical values: min: $edid->{monitor_range}{vertical_min} max: $edid->{monitor_range}{vertical_max}"); "bad vertical values: min: $edid->{monitor_range}{vertical_min} max: $edid->{monitor_range}{vertical_max}");
} }
} }
} }
sub _edid_error { sub _edid_error {
my ($edid,$error,$data) = @_; my ($edid,$error,$data) = @_;
$edid->{edid_errors} = [] if !$edid->{edid_error}; $edid->{edid_errors} = [] if !$edid->{edid_errors};
push(@{$edid->{edid_errors}},main::message($error,$data)); push(@{$edid->{edid_errors}},main::message($error,$data));
} }
sub _nearest_ratio { sub _nearest_ratio {

146
inxi.1
View file

@ -1,5 +1,5 @@
.\" inxi.1 - manpage for inxi system information tool .\" inxi.1 - manpage for inxi system information tool
.\" Copyright (C) 2021 Harald Hope .\" Copyright (C) 2022 Harald Hope
.\" .\"
.\" This program is free software; you can redistribute it and/or modify .\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by .\" it under the terms of the GNU General Public License as published by
@ -15,7 +15,7 @@
.\" with this program; if not, write to the Free Software Foundation, Inc., .\" with this program; if not, write to the Free Software Foundation, Inc.,
.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
.\" .\"
.TH INXI 1 "2022\-03\-24" "inxi" "inxi manual" .TH INXI 1 "2022\-04\-08" "inxi" "inxi manual"
.SH NAME .SH NAME
inxi \- Command line system information script for console and IRC inxi \- Command line system information script for console and IRC
@ -62,6 +62,51 @@ filtering with the \fB\-z\fR option (\fB\-Fz\fR, for example). To override
the IRC filter, you can use the \fB\-Z\fR option. This can be useful in the IRC filter, you can use the \fB\-Z\fR option. This can be useful in
debugging network connection issues online in a private chat, for example. debugging network connection issues online in a private chat, for example.
.SH TABLE OF CONTENTS
This man page is pretty long and information packed. It is divided into the
following sections:
* \fBUSING OPTIONS\fR How to use the command line options.
* \fBSTANDARD OPTIONS\fR Primary data types trigger items.
* \fBFILTER OPTIONS\fR Apply a variety of output filters.
* \fBOUTPUT CONTROL OPTIONS\fR Change default colors, widths, heights, output
types, etc.
* \fBEXTRA DATA OPTIONS\fR What \fB\-x\fR, \fB\-xx\fR, and \fB\-xxx\fR add to
the output per primary data type.
* \fBADMIN EXTRA DATA OPTIONS\fR What \fB\-a\fR adds to the output per primary
data type. These have a lot of information because this is advanced admin data,
which are not always intuitive or easy to understand.
* \fBADVANCED OPTIONS\fR Modify behavior or choice of data sources, and other
advanced switches.
* \fBDEBUGGING OPTIONS\fR For development use mainly, or contributing datasets
to the project.
* \fBDEBUGGING OPTIONS TO DEBUG DEBUGGER FAILURES\fR Only for advanced users,
sometimes something will hang the debuggers, this shows you various ways to get
around those failures.
* \fBSUPPORTED IRC CLIENTS\fR List of known good IRC clients. Not checked often,
let us know if something is not working.
* \fBRUNNING IN IRC CLIENT\fR How to run inxi in various IRC clients.
* \fBCONFIGURATION FILE\fR Configuration file locations and priority in using.
* \fBCONFIGURATION OPTIONS\fR Most of the commonly used configuration options,
along with sample values.
* \fBBUGS\fR How and where to report bugs.
* \fBHOMEPAGE\fR, \fBAUTHOR AND CONTRIBUTORS TO CODE\fR, \fBSPECIAL THANKS TO
THE FOLLOWING\fR These are self explanitory.
.SH USING OPTIONS .SH USING OPTIONS
Options can be combined if they do not conflict. You can either group the Options can be combined if they do not conflict. You can either group the
letters together or separate them. letters together or separate them.
@ -79,24 +124,6 @@ Note that all the short form options have long form equivalents, which are
listed below. However, usually the short form is used in examples in order to listed below. However, usually the short form is used in examples in order to
keep things simple. keep things simple.
These are available options sections:
* \fBSTANDARD OPTIONS\fR Primary data types trigger items.
* \fBFILTER OPTIONS\fR Apply a variety of output filters.
* \fBOUTPUT CONTROL OPTIONS\fR Change default colors, widths, heights, output
types, etc.
* \fBEXTRA DATA OPTIONS\fR What \fB\-x\fR, \fB\-xx\fR, \fB\-xxx\fR, and \fB\-a\fR
add to the output.
* \fBADVANCED OPTIONS\fR Modify behavior or choice of data sources, and other
advanced switches.
* \fBDEBUGGING OPTIONS\fR For development use mainly, or contributing datasets to
the project.
.SH STANDARD OPTIONS .SH STANDARD OPTIONS
.TP .TP
@ -444,13 +471,12 @@ Other types of logical block handling like LUKS, bcache show as:
.TP .TP
.B \-m \fR, \fB\-\-memory\fR .B \-m \fR, \fB\-\-memory\fR
Memory (RAM) data. Does not display with \fB\-b\fR or \fB\-F\fR unless you Memory (RAM) data. Does not display with \fB\-b\fR or \fB\-F\fR unless you use
use \fB\-m\fR explicitly. Ordered by system board physical system memory \fB\-m\fR explicitly. Ordered by system board physical system memory array(s)
array(s) (\fBArray\-[number]\fR), and individual memory devices (\fBArray\-[number]\fR), and individual memory devices (\fBDevice\-[number]\fR).
(\fBDevice\-[number]\fR). Physical memory array data shows array capacity, Physical memory array data shows array capacity, number of devices supported,
number of devices supported, and Error Correction information. Devices shows and Error Correction information. Devices shows locator data (highly variable in
locator data (highly variable in syntax), size, speed, type syntax), type (eg: \fBtype: DDR3\fR)size, speed.
(eg: \fBtype: DDR3\fR).
Note: \fB\-m\fR uses \fBdmidecode\fR, which must be run as root (or start Note: \fB\-m\fR uses \fBdmidecode\fR, which must be run as root (or start
\fBinxi\fR with \fBdoas/sudo\fR), unless you figure out how to set up doas/sudo \fBinxi\fR with \fBdoas/sudo\fR), unless you figure out how to set up doas/sudo
@ -488,11 +514,11 @@ If the detected speed is logically absurd, like 1 MT/s or 69910 MT/s, adds:
\fBMemory: \fBMemory:
RAM: total: 31.38 GiB used: 20.65 GiB (65.8%) RAM: total: 31.38 GiB used: 20.65 GiB (65.8%)
Array\-1: capacity: N/A slots: 4 note: check EC: N/A Array\-1: capacity: N/A slots: 4 note: check EC: N/A
Device\-1: DIMM_A1 size: 8 GiB speed: 1600 MT/s (800 MHz) Device\-1: DIMM_A1 type: DDR3 size: 8 GiB speed: 1600 MT/s (800 MHz)
Device\-2: DIMM_A2 size: 8 GiB speed: spec: 1600 MT/s (800 MHz) Device\-2: DIMM_A2 type: DDR3 size: 8 GiB speed: spec: 1600 MT/s (800 MHz)
actual: 61910 MT/s (30955 MHz) note: check actual: 61910 MT/s (30955 MHz) note: check
Device\-3: DIMM_B1 size: 8 GiB speed: 1600 MT/s (800 MHz) Device\-3: DIMM_B1 type: DDR3 size: 8 GiB speed: 1600 MT/s (800 MHz)
Device\-4: DIMM_B2 size: 8 GiB speed: spec: 1600 MT/s (800 MHz) Device\-4: DIMM_B2 type: DDR3 size: 8 GiB speed: spec: 1600 MT/s (800 MHz)
actual: 2 MT/s (1 MHz) note: check\fR actual: 2 MT/s (1 MHz) note: check\fR
.fi .fi
@ -1286,8 +1312,6 @@ tracking down which device belongs to what.
Only some systems will have this data available. Shows estimate if it can Only some systems will have this data available. Shows estimate if it can
generate one. generate one.
\- Adds device type in the Device line.
.TP .TP
.B \-x \-N\fR .B \-x \-N\fR
\- Adds (if available and/or relevant) \fBvendor:\fR item, which shows \- Adds (if available and/or relevant) \fBvendor:\fR item, which shows
@ -1333,8 +1357,7 @@ found for each distribution system base detection.
.TP .TP
.B \-x \-\-slots\fR .B \-x \-\-slots\fR
\- Adds \fBbus\-ID:\fR. Note that this bus ID does not unfortunately appear to \- Adds slot \fBbus\-ID:\fR, if found.
be readily detected as the source bus ID for any particular device bus ID.
.TP .TP
.B \-x \-t\fR (\fB\-\-processes\fR) .B \-x \-t\fR (\fB\-\-processes\fR)
@ -1531,6 +1554,11 @@ serial number.
100% right all of the time since it depends on the order that data is found 100% right all of the time since it depends on the order that data is found
in \fBdmidecode\fR output for \fBtype 6\fR and \fBtype 17\fR. in \fBdmidecode\fR output for \fBtype 6\fR and \fBtype 17\fR.
\- Adds, if present, memory array voltage. Only some legacy systems will have
this data available.
\- Adds memory module current configured operating voltage, if available.
.TP .TP
.B \-xx \-M\fR .B \-xx \-M\fR
\- Adds chassis information, if data is available. Also shows BIOS \- Adds chassis information, if data is available. Also shows BIOS
@ -1575,6 +1603,8 @@ running. If none found, shows nothing. Uses a less accurate fallback tool
.B \-xx \-\-slots\fR .B \-xx \-\-slots\fR
\- Adds slot length. \- Adds slot length.
\- Adds slot voltage, if available.
.TP .TP
.B \-xx \-w \fR, \fB\-W\fR .B \-xx \-w \fR, \fB\-W\fR
\- Adds wind chill, heat index, and dew point, if available. \- Adds wind chill, heat index, and dew point, if available.
@ -1686,18 +1716,24 @@ uses the \fBwhoami\fR test.
.TP .TP
.B \-xxx \-m\fR, \fB\-\-memory\-modules\fR .B \-xxx \-m\fR, \fB\-\-memory\-modules\fR
\- Adds memory bus width: primary bus width, and if present, total width. e.g. \- Adds memory bus width: primary bus width, and if present, total width. e.g.
\fBbus width: 64 bit (total: 72 bits)\fR. Note that total / data widths are
mixed up sometimes in dmidecode output, so inxi will take the larger value as
the total if present. If no total width data is found, then inxi will not show
that item.
\- Adds device Type Detail, e.g. \fBdetail: DDR3 (Synchronous)\fR. \fBwidth (bits): data: 64 total: 72\fR
\- Adds, if present, memory module voltage. Only some systems will have this Note that total / data widths are mixed up sometimes in dmidecode output, so
data available. inxi will take the larger value as the total if present. \fBData\fR width
usually corresponds to the CPU bits. \fBTotal\fR can reflect EEC or Dual Channel
widths. If no total width data is found, shows:
\fBwidth: N/A\fR
\- Adds device type detail, e.g. \fBtype: DDR3 detail: Synchronous\fR.
\- Adds device serial number. \- Adds device serial number.
\- Adds memory module current, max, and min voltages, if they are available and
different from each other. If they are the identical, displays same as
\fB\-xxm\fR voltage report. Use \fB\-ma\fR to always see them.
.TP .TP
.B \-xxx \-N\fR .B \-xxx \-N\fR
\- Adds, if present, serial number. \- Adds, if present, serial number.
@ -2021,6 +2057,10 @@ mapped name for logical components. Puts each component/device on its own line.
\- Adds maj-min to LV and other devices. \- Adds maj-min to LV and other devices.
.TP
.B \-a \-m\fR
\- Expands volts to include curr/min/max values even if they are all identical.
.TP .TP
.B \-a \-n\fR, \fB\-a \-N\fR, \fB\-a \-i\fR .B \-a \-n\fR, \fB\-a \-N\fR, \fB\-a \-i\fR
\- Adds, if present, possible \fBalternate:\fR kernel modules capable of driving \- Adds, if present, possible \fBalternate:\fR kernel modules capable of driving
@ -2071,6 +2111,28 @@ Component report to 1 component per line.
\- Adds kernel boot parameters to \fBKernel\fR section (if detected). Support \- Adds kernel boot parameters to \fBKernel\fR section (if detected). Support
varies by OS type. varies by OS type.
.TP
.B \-a \-\-slots\fR
\- Adds PCI children of the main slot bus ID, and their types and class IDs,
recursively. Linux only, and only if detected. Sample:
.nf
\fBSlot: 0
type: PCIe
lanes: 16
status: in use
length: long
volts: 3.3
bus\-ID: 00:03.1
children:
1: 07:00.0
class\-ID: 0300
type: display
2: 07:00.1
class\-ID: 0403
type: audio\fR
.fi
.SH ADVANCED OPTIONS .SH ADVANCED OPTIONS
.TP .TP

View file

@ -1,3 +1,145 @@
================================================================================
Version: 3.3.15
Patch: 00
Date: 2022-04-08
--------------------------------------------------------------------------------
RELEASE NOTES:
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
-- Harald Hope - Thu, 8 April 2022 22:46:26 -0700
================================================================================ ================================================================================
Version: 3.3.14 Version: 3.3.14
Patch: 00 Patch: 00