Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphics.displays - missleading return object array #940

Open
valentin-ducaru-cognizant opened this issue Oct 30, 2024 · 1 comment
Open

Comments

@valentin-ducaru-cognizant

Describe the bug

Graphics.displays return :
Case 1: Two monitors are attached ( one laptop + 1 external monitor ) - in system settings they are set on 'EXTEND' -> systeminformation.graphics.diplays returns an array with 2 elements matching the number of physical screens - Correct
Case 2: Two monitors are attached ( one laptop + 1 external monitor ) - in system settings they are set on 'DUPLICATE' -> systeminformation.graphics.diplays returns an array with 1 element, NOT matching the number of physical screens - Wrong

To Reproduce
Steps to reproduce the behavior:

  1. Having the package installed open the terminal/cmd
  2. Add a second monitor
  3. Set the second moitor as Duplicate in system display settings
  4. Open cmd and run npx systeminformation
  5. See output: systeminformation.graphics.diplays - array with one element

Current Output
If 2 screens are in duplicate mode - systeminformation.graphics.diplays returns only element array with info for the main screen

Expected behavior
If 2 screens are available - systeminformation.graphics.diplays to return 2 element array, regardless of the mode the screens are in - duplicate or extend

Environment (please complete the following information):
Platform : Windows
Distro : Microsoft Windows 11 Pro
Release : 10.0.22631
Codename :
Kernel : 10.0.22631
Arch : x64
Hostname : SVROLP01888
Codepage : 437
Build : 22631
Hypervisor : true
RemoteSession :

System:
──────────────────────────────────────────────────────────────────────────────────────────
Manufacturer : Dell Inc.
Model : G5 5590
Version :
Virtual :

CPU:
──────────────────────────────────────────────────────────────────────────────────────────
Manufacturer : Intel
Brand : Core™ i7-9750H
Family : 6
Model : 158
Stepping : 10
Speed : 2.6
Cores : 12
PhysicalCores : 6
PerformanceCores : 12
EfficiencyCores :
Processors : 1
Socket : BGA1440

Additional context
The issue was reploducible as well on MacBook Pro 2021-Apple M1 Pro - macOs: Sonoma 14.7

@sebhildebrandt
Copy link
Owner

@valentin-ducaru-cognizant please can you post the results of the following in both situations (EXTEND & DUPLICATE):

Powershell:

Get-CimInstance win32_desktopmonitor | fl *

Get-CimInstance -Namespace root\wmi -ClassName WmiMonitorBasicDisplayParams | fl

Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.Screen]::AllScreens

Get-CimInstance -Namespace root\wmi -ClassName WmiMonitorConnectionParams | fl

gwmi WmiMonitorID -Namespace root\wmi | ForEach-Object {(($_.ManufacturerName -notmatch 0 | foreach {[char]$_}) -join "") + "|" + (($_.ProductCodeID -notmatch 0 | foreach {[char]$_}) -join "") + "|" + (($_.UserFriendlyName -notmatch 0 | foreach {[char]$_}) -join "") + "|" + (($_.SerialNumberID -notmatch 0 | foreach {[char]$_}) -join "") + "|" + $_.InstanceName}

Thank you in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants