fusioninventory / fusioninventory-agent

FusionInventory Agent
http://fusioninventory.org/
GNU General Public License v2.0
252 stars 125 forks source link

Displays was not inventoried #613

Open mariaczi opened 5 years ago

mariaczi commented 5 years ago

Setup: GLPI v9.3.3 with FusionInventory 9.3+1.2

FusionInventory Agent has been run as root. Connection and inventory (fusion agent <-> GLPI) work OK - my desktop was added in GLPI but without displays connected to this (I have connected two the same models of Monitors). Which informations are important to diagnose this issue? FusionInventory Agent installed on my desktop Ubuntu 18.04 from source.

From agent log file run in debug mode:

[Mon Dec 10 12:20:35 2018][debug] Running FusionInventory::Agent::Task::Inventory::Generic::Screen
[Mon Dec 10 12:20:35 2018][debug] retrieving EDID data:
[Mon Dec 10 12:20:35 2018][debug] - reading /sys/devices content: no result
[Mon Dec 10 12:20:35 2018][debug] - running monitor-get-edid-using-vbe command: command not available
[Mon Dec 10 12:20:35 2018][debug] - running monitor-get-edid command: command not available
[Mon Dec 10 12:20:37 2018][debug] - running get-edid command: no result

but get-edid exist and is installed in my OS:

user@mydesk:~$ get[tab][tab]
getcap             get-edid           getent             getkeycodes        getopts            get-quirk-options  gettextize         getty              
getconf            geteltorito        getfacl            getopt             getpcaps           gettext            gettext.sh         getweb

user@mydesk:~$ which get-edid 
/usr/bin/get-edid
user@mydesk:~$ ls -la /usr/bin/get-edid 
-rwxr-xr-x 1 root root 22632 Apr  3  2018 /usr/bin/get-edid

Used graphic card: nVidia Quadro 2000 with nvidia driver.

Read EDID is possible by

xrandr --prop -d :0 | perl -ne '
if ((/EDID(_DATA)?:/.../:/) && !/:/) {
  s/^\s+//;
  chomp;
  ;$hex .= $_;
  print $_ . "\n";
}'

Using this tool https://github.com/rpavlik/edid-decode it is possible to decode EDID data with display serial number.

g-bougard commented 5 years ago

Hi @mariaczi which agent version are you using ? can you report the output of get-edid command run as root ?

mariaczi commented 5 years ago

@g-bougard, sure. Outputs bellow. Agent version:

fusioninventory-agent --version
FusionInventory Agent (2.4.2)
Platform  : linux localhost 4.9.0 1 smp debian 4.9.0 x86_64 gnulinux 
Build date: Wed Dec  5 10:54:04 2018 GMT

get-edid output:

$ sudo get-edid 
This is read-edid version 3.0.2. Prepare for some fun.
Attempting to use i2c interface
No EDID on bus 0
No EDID on bus 1
No EDID on bus 2
No EDID on bus 3
No EDID on bus 4
No EDID on bus 5
No byte reading on this bus...
Problem requesting slave address: Bad file descriptor
No byte reading on this bus...
Problem requesting slave address: Bad file descriptor
Looks like no busses have an EDID. Sorry!
Attempting to use the classical VBE interface

    Performing real mode VBE call
    Interrupt 0x10 ax=0x4f00 bx=0x0 cx=0x0
    Function supported
    Call successful

    VBE version 300
    VBE string at 0x11100 "NVIDIA"

VBE/DDC service about to be called
    Report DDC capabilities

    Performing real mode VBE call
    Interrupt 0x10 ax=0x4f15 bx=0x0 cx=0x0
    Function supported
    Call successful

    Monitor and video card combination does not support DDC1 transfers
    Monitor and video card combination does not support DDC2 transfers
    0 seconds per 128 byte EDID block transfer
    Screen is not blanked during DDC transfer

Reading next EDID block

VBE/DDC service about to be called
    Read EDID

    Performing real mode VBE call
    Interrupt 0x10 ax=0x4f15 bx=0x1 cx=0x0
    Function supported
    Call failed

The EDID data should not be trusted as the VBE call failed
Error: output block unchanged
I'm sorry nothing was successful. Maybe try some other arguments
if you played with them, or send an email to Matthew Kern <pyrophobicman@gmail.com>.
g-bougard commented 5 years ago

Can you report the output of your xrandr --prop -d :0 | perl -ne ... command ? Using xrandr is maybe the only way to obtain the EDID informations in your context (nVidia Quadro 2000 with nvidia driver). But maybe another command can do the job. The problem I see with xrandr is we have to first know which display to look at (option -d). And we need a solution to find all connected monitors even if X is not started. I see in your log output looking for edid files under /sys/devices is not useful too.

mariaczi commented 5 years ago

Output for xrandr:

00ffffffffffff0010ac6fd04c454430
341a0104a5371f783e4455a9554d9d26
0f5054a54b00b300d100714fa9408180
778001010101565e00a0a0a029503020
350029372100001a000000ff00395832
56593643513044454c0a000000fc0044
454c4c205532353135480a20000000fd
0038561e711e010a2020202020200143
02031cf14f1005040302071601141f12
132021222309070783010000023a8018
71382d40582c450029372100001e011d
8018711c1620582c250029372100009e
011d007251d01e206e28550029372100
001e8c0ad08a20e02d10103e96002937
21000018483f00ca808030401a501300
29372100001e00000000000000000057
00ffffffffffff0010ac6fd04c4c5930
341a0104a5371f783e4455a9554d9d26
0f5054a54b00b300d100714fa9408180
778001010101565e00a0a0a029503020
350029372100001a000000ff00395832
565936435130594c4c0a000000fc0044
454c4c205532353135480a20000000fd
0038561e711e010a202020202020010b
02031cf14f1005040302071601141f12
132021222309070783010000023a8018
71382d40582c450029372100001e011d
8018711c1620582c250029372100009e
011d007251d01e206e28550029372100
001e8c0ad08a20e02d10103e96002937
21000018483f00ca808030401a501300
29372100001e00000000000000000057

I use two monitors - the same model. I think, that it is possible to use ":0" for "-d" option to xrandr. It is default generally :)

mariaczi commented 5 years ago

Maybe the better version for grabbing displays data with xrandr:

xrandr --prop -d :0 | perl -ne '
if (/ connected /) { print $_; }
if ((/EDID(_DATA)?:/.../:/) && !/:/) {
  s/^\s+//;
  chomp;
  ;$hex .= $_;
  print $_ . "\n";
}'

And teh output:

DP-2 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 553mm x 311mm
00ffffffffffff0010ac6fd04c454430
341a0104a5371f783e4455a9554d9d26
0f5054a54b00b300d100714fa9408180
778001010101565e00a0a0a029503020
350029372100001a000000ff00395832
56593643513044454c0a000000fc0044
454c4c205532353135480a20000000fd
0038561e711e010a2020202020200143
02031cf14f1005040302071601141f12
132021222309070783010000023a8018
71382d40582c450029372100001e011d
8018711c1620582c250029372100009e
011d007251d01e206e28550029372100
001e8c0ad08a20e02d10103e96002937
21000018483f00ca808030401a501300
29372100001e00000000000000000057
DP-3 connected 2560x1440+2560+0 (normal left inverted right x axis y axis) 553mm x 311mm
00ffffffffffff0010ac6fd04c4c5930
341a0104a5371f783e4455a9554d9d26
0f5054a54b00b300d100714fa9408180
778001010101565e00a0a0a029503020
350029372100001a000000ff00395832
565936435130594c4c0a000000fc0044
454c4c205532353135480a20000000fd
0038561e711e010a202020202020010b
02031cf14f1005040302071601141f12
132021222309070783010000023a8018
71382d40582c450029372100001e011d
8018711c1620582c250029372100009e
011d007251d01e206e28550029372100
001e8c0ad08a20e02d10103e96002937
21000018483f00ca808030401a501300
29372100001e00000000000000000057
g-bougard commented 5 years ago

I think, that it is possible to use ":0" for "-d" option to xrandr. It is default generally :)

I know that, but this is not a generic solution and this will probably not report connected monitors if you're not logged in. It would be nice if Nvidia tools can be useful. I quickly find nvidia-settings or nvidia-smi could help but I didn't find any output with edid and I don't have any one to test.

mariaczi commented 5 years ago

I'm searching too and trying nvidia-settings and nvidia-smi but I can't find the useful output from this commands :(

not report connected monitors if you're not logged in.

I try to check this tomorrow and back with the result of test.

mariaczi commented 5 years ago

It's true. We can't get info about displays using xrandr. I logged on remotely on desktop with nvidia card and using proprietary driver, X are started but no one is logged in to the X session.

$ xrandr --verbose
Can't open display 
$ xrandr --prop -d :0
Invalid MIT-MAGIC-COOKIE-1 keyCan't open display :0