Skip to content

Use libpci to retrieve some basic PCI data #440

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

Open
wants to merge 50 commits into
base: main
Choose a base branch
from
Open

Use libpci to retrieve some basic PCI data #440

wants to merge 50 commits into from

Conversation

stsdc
Copy link
Member

@stsdc stsdc commented Apr 14, 2025

This is an attempt at porting libpci to vapi and use it in Monitor to detect PCI devices.

Trying to make a basic example to work.

@stsdc stsdc mentioned this pull request Apr 14, 2025
@danirabbit

This comment was marked as outdated.

Copy link

@glm11-aoc glm11-aoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some notes on the code :-)

@stsdc
Copy link
Member Author

stsdc commented May 2, 2025

@wpkelso Intel fix just landed in the code. However, I don't see nvidia gpu in the logs 🤔
May I ask you to provide lspci output?

@wpkelso

This comment was marked as resolved.

@stsdc
Copy link
Member Author

stsdc commented May 2, 2025

Please, if possible, run again and paste the logs. Thank you.

@wpkelso
Copy link
Member

wpkelso commented May 2, 2025

@stsdc This is in an X session:

Logs

Monitor 0.17.2-693-ga53d166

LibPCI ver: 199168
(io.elementary.monitor:6453): GLib-GIO-DEBUG: 11:54:52.871: _g_io_module_get_default: Found default implementation dconf (DConfSettingsBackend) for ‘gsettings-backend’
(io.elementary.monitor:6453): dconf-DEBUG: 11:54:52.871: watch_fast: "/io/elementary/monitor/settings/" (establishing: 0, active: 0)
(io.elementary.monitor:6453): GLib-DEBUG: 11:54:52.872: unsetenv() is not thread-safe and should not be used after threads are created
(io.elementary.monitor:6453): GLib-GIO-DEBUG: 11:54:52.874: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
(io.elementary.monitor:6453): dconf-DEBUG: 11:54:52.878: watch_established: "/io/elementary/monitor/settings/" (establishing: 1)
(io.elementary.monitor:6453): GLib-GIO-DEBUG: 11:54:52.908: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
(io.elementary.monitor:6453): Gtk-DEBUG: 11:54:53.078: Using display (null) for GtkInspector
(io.elementary.monitor:6453): GLib-DEBUG: 11:54:53.836: unsetenv() is not thread-safe and should not be used after threads are created
(io.elementary.monitor:6453): Gtk-DEBUG: 11:54:53.836: Connecting to session manager
** (io.elementary.monitor:6453): DEBUG: 11:54:53.885: HwmonPathsParser.vala:59: Found HWMON iwlwifi Interface: iwlwifi_1
** (io.elementary.monitor:6453): DEBUG: 11:54:53.886: HwmonPathsParserIwlwifi.vala:25: Found HWMON iwlwifi temperature interface path: temp1_input
** (io.elementary.monitor:6453): DEBUG: 11:54:53.886: HwmonPathsParserIwlwifi.vala:51: 🌡️ Parsed HWMON iwlwifi temperature interface:
** (io.elementary.monitor:6453): DEBUG: 11:54:53.886: HwmonPathsParser.vala:63: Found unknown HWMON Interface: pch_cannonlake
** (io.elementary.monitor:6453): DEBUG: 11:54:53.886: HwmonPathsParser.vala:63: Found unknown HWMON Interface: ucsi_source_psy_USBC000:001
** (io.elementary.monitor:6453): DEBUG: 11:54:53.886: HwmonPathsParser.vala:63: Found unknown HWMON Interface: BAT0
** (io.elementary.monitor:6453): DEBUG: 11:54:53.886: HwmonPathsParser.vala:63: Found unknown HWMON Interface: AC
** (io.elementary.monitor:6453): DEBUG: 11:54:53.886: HwmonPathsParser.vala:47: Found HWMON CPU Interface: coretemp in: /sys/class/hwmon/hwmon9/name
** (io.elementary.monitor:6453): DEBUG: 11:54:53.886: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp4_label
** (io.elementary.monitor:6453): DEBUG: 11:54:53.886: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp5_crit_alarm
** (io.elementary.monitor:6453): DEBUG: 11:54:53.886: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp5_label
** (io.elementary.monitor:6453): DEBUG: 11:54:53.886: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp3_label
** (io.elementary.monitor:6453): DEBUG: 11:54:53.886: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp1_input
** (io.elementary.monitor:6453): DEBUG: 11:54:53.886: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp2_input
** (io.elementary.monitor:6453): DEBUG: 11:54:53.886: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp4_crit_alarm
** (io.elementary.monitor:6453): DEBUG: 11:54:53.886: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp2_max
** (io.elementary.monitor:6453): DEBUG: 11:54:53.886: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp1_label
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp3_max
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp3_crit_alarm
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp2_label
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp4_max
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp1_max
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp5_max
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp3_crit
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp2_crit
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp1_crit
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp5_crit
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp4_crit
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp2_crit_alarm
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp3_input
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp4_input
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp1_crit_alarm
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:25: Found HWMON CPU temperature interface path: temp5_input
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:51: 🌡️ Parsed HWMON CPU temperature interface: Package id 0
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:51: 🌡️ Parsed HWMON CPU temperature interface: Core 0
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:51: 🌡️ Parsed HWMON CPU temperature interface: Core 1
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:51: 🌡️ Parsed HWMON CPU temperature interface: Core 2
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserCPU.vala:51: 🌡️ Parsed HWMON CPU temperature interface: Core 3
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParser.vala:63: Found unknown HWMON Interface: thinkpad
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParser.vala:63: Found unknown HWMON Interface: ucsi_source_psy_USBC000:002
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParser.vala:55: Found HWMON NVMe Interface: nvme
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserNVMe.vala:25: Found HWMON NVMe temperature interface path: temp1_crit
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserNVMe.vala:25: Found HWMON NVMe temperature interface path: temp1_input
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserNVMe.vala:25: Found HWMON NVMe temperature interface path: temp2_input
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserNVMe.vala:25: Found HWMON NVMe temperature interface path: temp1_label
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserNVMe.vala:25: Found HWMON NVMe temperature interface path: temp2_label
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserNVMe.vala:25: Found HWMON NVMe temperature interface path: temp1_alarm
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserNVMe.vala:25: Found HWMON NVMe temperature interface path: temp2_max
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserNVMe.vala:25: Found HWMON NVMe temperature interface path: temp3_max
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserNVMe.vala:25: Found HWMON NVMe temperature interface path: temp1_max
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserNVMe.vala:25: Found HWMON NVMe temperature interface path: temp2_min
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserNVMe.vala:25: Found HWMON NVMe temperature interface path: temp3_input
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserNVMe.vala:25: Found HWMON NVMe temperature interface path: temp3_min
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserNVMe.vala:25: Found HWMON NVMe temperature interface path: temp1_min
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserNVMe.vala:25: Found HWMON NVMe temperature interface path: temp3_label
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserNVMe.vala:50: 🌡️ Parsed HWMON NVMe temperature interface: Composite
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserNVMe.vala:50: 🌡️ Parsed HWMON NVMe temperature interface: Sensor 1
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParserNVMe.vala:50: 🌡️ Parsed HWMON NVMe temperature interface: Sensor 2
** (io.elementary.monitor:6453): DEBUG: 11:54:53.887: HwmonPathsParser.vala:63: Found unknown HWMON Interface: acpitz
** (io.elementary.monitor:6453): DEBUG: 11:54:53.890: CPU.vala:219: Parsed file /usr/local/share/io.elementary.monitor/database/cpu_features.csv
** (io.elementary.monitor:6453): DEBUG: 11:54:53.890: CPU.vala:219: Parsed file /usr/local/share/io.elementary.monitor/database/cpu_bugs.csv
** (io.elementary.monitor:6453): DEBUG: 11:54:53.890: CPU.vala:75: Number of cores: 8
(io.elementary.monitor:6453): GLib-GIO-DEBUG: 11:54:53.898: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: Storage.vala:70: Found drive: SKHynix_HFS001TD9TNG-L5B0B 80750C10 SKHynix_HFS001TD9TNG-L5B0B-CD03N81511CB0440S /dev/nvme0n1
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: Storage.vala:97: path: /org/freedesktop/UDisks2/block_devices/nvme0n1p2
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: Storage.vala:100: device: /dev/nvme0n1p2
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: Storage.vala:124: Adding volume /dev/nvme0n1p2 to /dev/nvme0n1
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: Storage.vala:97: path: /org/freedesktop/UDisks2/block_devices/dm_2d0
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: Storage.vala:100: device: /dev/dm-0
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: Storage.vala:135: Found logical volume: /dev/dm-0
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: StorageParser.vala:18: Found slave: nvme0n1p3
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: Volume.vala:48: First slave: nvme0n1p3
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: Storage.vala:97: path: /org/freedesktop/UDisks2/block_devices/nvme0n1p4
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: Storage.vala:100: device: /dev/nvme0n1p4
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: Storage.vala:124: Adding volume /dev/nvme0n1p4 to /dev/nvme0n1
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: Storage.vala:97: path: /org/freedesktop/UDisks2/block_devices/nvme0n1p1
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: Storage.vala:100: device: /dev/nvme0n1p1
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: Storage.vala:124: Adding volume /dev/nvme0n1p1 to /dev/nvme0n1
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: Storage.vala:97: path: /org/freedesktop/UDisks2/block_devices/nvme0n1p3
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: Storage.vala:100: device: /dev/nvme0n1p3
** (io.elementary.monitor:6453): DEBUG: 11:54:53.913: Storage.vala:124: Adding volume /dev/nvme0n1p3 to /dev/nvme0n1
** (io.elementary.monitor:6453): DEBUG: 11:54:53.944: Resources.vala:94: PCI device: vendor: 0x8086 class:0xC05 Comet Lake PCH-LP SMBus Host Controller
** (io.elementary.monitor:6453): DEBUG: 11:54:53.944: Resources.vala:94: PCI device: vendor: 0x8086 class:0xC03 Comet Lake PCH-LP USB 3.1 xHCI Host Controller
** (io.elementary.monitor:6453): DEBUG: 11:54:53.944: Resources.vala:73: PCI device: GPU: 0x8086 : CometLake-U GT2 [UHD Graphics]
** (io.elementary.monitor:6453): DEBUG: 11:54:53.944: Resources.vala:94: PCI device: vendor: 0x8086 class:0x604 JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016]
** (io.elementary.monitor:6453): DEBUG: 11:54:53.944: Resources.vala:94: PCI device: vendor: 0x8086 class:0x604 Comet Lake PCI Express Root Port #5
** (io.elementary.monitor:6453): DEBUG: 11:54:53.944: Resources.vala:94: PCI device: vendor: 0x8086 class:0x200 Ethernet Connection (6) I219-V
** (io.elementary.monitor:6453): DEBUG: 11:54:53.945: Resources.vala:94: PCI device: vendor: 0x8086 class:0x500 Comet Lake PCH-LP Shared SRAM
** (io.elementary.monitor:6453): DEBUG: 11:54:53.945: Resources.vala:94: PCI device: vendor: 0x8086 class:0xC03 JHL6240 Thunderbolt 3 USB 3.1 Controller (Low Power) [Alpine Ridge LP 2016]
** (io.elementary.monitor:6453): DEBUG: 11:54:53.945: Resources.vala:94: PCI device: vendor: 0x8086 class:0x604 Comet Lake PCI Express Root Port #9
** (io.elementary.monitor:6453): DEBUG: 11:54:53.945: Resources.vala:94: PCI device: vendor: 0x8086 class:0x880 JHL6240 Thunderbolt 3 NHI (Low Power) [Alpine Ridge LP 2016]
** (io.elementary.monitor:6453): DEBUG: 11:54:53.945: Resources.vala:94: PCI device: vendor: 0x8086 class:0xC80 Serial IO I2C Host Controller
** (io.elementary.monitor:6453): DEBUG: 11:54:53.945: Resources.vala:94: PCI device: vendor: 0x8086 class:0x604 JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016]
** (io.elementary.monitor:6453): DEBUG: 11:54:53.945: Resources.vala:94: PCI device: vendor: 0x8086 class:0x604 Comet Lake PCI Express Root Port #13
** (io.elementary.monitor:6453): DEBUG: 11:54:53.945: Resources.vala:94: PCI device: vendor: 0x8086 class:0x1180 Comet Lake Thermal Subsytem
** (io.elementary.monitor:6453): DEBUG: 11:54:53.946: Resources.vala:94: PCI device: vendor: 0x8086 class:0x600 Comet Lake-U v1 4c Host Bridge/DRAM Controller
** (io.elementary.monitor:6453): DEBUG: 11:54:53.946: Resources.vala:94: PCI device: vendor: 0x8086 class:0x403 Comet Lake PCH-LP cAVS
** (io.elementary.monitor:6453): DEBUG: 11:54:53.946: Resources.vala:94: PCI device: vendor: 0x10DE class:0x302 GP108M [GeForce MX250]
** (io.elementary.monitor:6453): DEBUG: 11:54:53.946: Resources.vala:94: PCI device: vendor: 0x8086 class:0xC80 Comet Lake SPI (flash) Controller
** (io.elementary.monitor:6453): DEBUG: 11:54:53.946: Resources.vala:94: PCI device: vendor: 0x8086 class:0x780 Comet Lake Management Engine Interface
** (io.elementary.monitor:6453): DEBUG: 11:54:53.946: Resources.vala:94: PCI device: vendor: 0x8086 class:0x280 Comet Lake PCH-LP CNVi WiFi
** (io.elementary.monitor:6453): DEBUG: 11:54:53.946: Resources.vala:94: PCI device: vendor: 0x1C5C class:0x108 PC601 NVMe Solid State Drive
** (io.elementary.monitor:6453): DEBUG: 11:54:53.946: Resources.vala:94: PCI device: vendor: 0x8086 class:0x1180 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem
** (io.elementary.monitor:6453): DEBUG: 11:54:53.946: Resources.vala:94: PCI device: vendor: 0x8086 class:0x604 JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016]
** (io.elementary.monitor:6453): DEBUG: 11:54:53.947: Resources.vala:94: PCI device: vendor: 0x10EC class:0xFF00 RTS522A PCI Express Card Reader
** (io.elementary.monitor:6453): DEBUG: 11:54:53.947: Resources.vala:94: PCI device: vendor: 0x8086 class:0x601 Comet Lake PCH-LP LPC Premium Controller/eSPI Controller
** (io.elementary.monitor:6453): DEBUG: 11:54:53.947: Resources.vala:94: PCI device: vendor: 0x8086 class:0x880 Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model
** (io.elementary.monitor:6453): DEBUG: 11:54:53.947: Resources.vala:94: PCI device: vendor: 0x8086 class:0x604 Comet Lake PCI Express Root Port #1
** (io.elementary.monitor:6453): DEBUG: 11:54:53.947: Resources.vala:94: PCI device: vendor: 0x8086 class:0x604 JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016]
** (io.elementary.monitor:6453): DEBUG: 11:54:54.201: ProcessManager.vala:242: app name is sh
(io.elementary.monitor:6453): dconf-DEBUG: 11:54:54.218: watch_fast: "/io/elementary/monitor/settings/" (establishing: 0, active: 1)
** (io.elementary.monitor:6453): DEBUG: 11:54:54.440: DBusServer.vala:52: DBus registered!
** (io.elementary.monitor:6453): DEBUG: 11:54:54.508: TreeViewModel.vala:41: add_running_processes
** (io.elementary.monitor:6453): DEBUG: 11:54:54.509: TreeViewModel.vala:50: Add process 1 Parent PID: 0
** (io.elementary.monitor:6453): DEBUG: 11:54:54.512: TreeViewModel.vala:50: Add process 333 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.513: TreeViewModel.vala:50: Add process 367 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.513: TreeViewModel.vala:50: Add process 546 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.513: TreeViewModel.vala:50: Add process 565 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.513: TreeViewModel.vala:50: Add process 688 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.513: TreeViewModel.vala:50: Add process 689 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.513: TreeViewModel.vala:50: Add process 690 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.513: TreeViewModel.vala:50: Add process 691 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.513: TreeViewModel.vala:50: Add process 696 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.513: TreeViewModel.vala:50: Add process 698 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.514: TreeViewModel.vala:50: Add process 700 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.514: TreeViewModel.vala:50: Add process 702 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.514: TreeViewModel.vala:50: Add process 714 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.514: TreeViewModel.vala:50: Add process 716 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.514: TreeViewModel.vala:50: Add process 721 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.514: TreeViewModel.vala:50: Add process 722 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.514: TreeViewModel.vala:50: Add process 731 Parent PID: 689
** (io.elementary.monitor:6453): DEBUG: 11:54:54.514: TreeViewModel.vala:50: Add process 732 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.514: TreeViewModel.vala:50: Add process 737 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.514: TreeViewModel.vala:50: Add process 759 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.515: TreeViewModel.vala:50: Add process 773 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.515: TreeViewModel.vala:50: Add process 835 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.515: TreeViewModel.vala:50: Add process 842 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.515: TreeViewModel.vala:50: Add process 902 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.515: TreeViewModel.vala:50: Add process 959 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.515: TreeViewModel.vala:50: Add process 969 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.515: TreeViewModel.vala:50: Add process 999 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.515: TreeViewModel.vala:50: Add process 1013 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.515: TreeViewModel.vala:50: Add process 1155 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.515: TreeViewModel.vala:50: Add process 1311 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.515: TreeViewModel.vala:50: Add process 1316 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.515: TreeViewModel.vala:50: Add process 1385 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.515: TreeViewModel.vala:50: Add process 1388 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.515: TreeViewModel.vala:50: Add process 1391 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.515: TreeViewModel.vala:50: Add process 2134 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4391 Parent PID: 999
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4717 Parent PID: 999
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4748 Parent PID: 1
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4749 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4761 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4762 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4764 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4765 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4766 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4770 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4789 Parent PID: 4717
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4871 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4897 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4901 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4907 Parent PID: 4897
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4914 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4947 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.516: TreeViewModel.vala:50: Add process 4952 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.517: TreeViewModel.vala:50: Add process 4962 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.517: TreeViewModel.vala:50: Add process 4971 Parent PID: 4962
** (io.elementary.monitor:6453): DEBUG: 11:54:54.517: TreeViewModel.vala:50: Add process 4977 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.517: TreeViewModel.vala:50: Add process 4987 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.517: TreeViewModel.vala:50: Add process 4988 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.517: TreeViewModel.vala:50: Add process 5005 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.517: TreeViewModel.vala:50: Add process 5008 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.517: TreeViewModel.vala:50: Add process 5021 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.517: TreeViewModel.vala:50: Add process 5031 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.517: TreeViewModel.vala:50: Add process 5052 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.517: TreeViewModel.vala:50: Add process 5089 Parent PID: 5052
** (io.elementary.monitor:6453): DEBUG: 11:54:54.517: TreeViewModel.vala:50: Add process 5090 Parent PID: 5052
** (io.elementary.monitor:6453): DEBUG: 11:54:54.517: TreeViewModel.vala:50: Add process 5092 Parent PID: 5052
** (io.elementary.monitor:6453): DEBUG: 11:54:54.517: TreeViewModel.vala:50: Add process 5119 Parent PID: 5052
** (io.elementary.monitor:6453): DEBUG: 11:54:54.517: TreeViewModel.vala:50: Add process 5120 Parent PID: 5052
** (io.elementary.monitor:6453): DEBUG: 11:54:54.517: TreeViewModel.vala:50: Add process 5130 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.517: TreeViewModel.vala:50: Add process 5141 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.518: TreeViewModel.vala:50: Add process 5142 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.518: TreeViewModel.vala:50: Add process 5143 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.518: TreeViewModel.vala:50: Add process 5150 Parent PID: 5005
** (io.elementary.monitor:6453): DEBUG: 11:54:54.518: TreeViewModel.vala:50: Add process 5152 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.518: TreeViewModel.vala:50: Add process 5153 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.518: TreeViewModel.vala:50: Add process 5156 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.518: TreeViewModel.vala:50: Add process 5160 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.518: TreeViewModel.vala:50: Add process 5161 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.518: TreeViewModel.vala:50: Add process 5162 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.518: TreeViewModel.vala:50: Add process 5163 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.518: TreeViewModel.vala:50: Add process 5164 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.518: TreeViewModel.vala:50: Add process 5166 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.518: TreeViewModel.vala:50: Add process 5167 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.518: TreeViewModel.vala:50: Add process 5168 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.518: TreeViewModel.vala:50: Add process 5169 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.518: TreeViewModel.vala:50: Add process 5240 Parent PID: 5005
** (io.elementary.monitor:6453): DEBUG: 11:54:54.519: TreeViewModel.vala:50: Add process 5269 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.519: TreeViewModel.vala:50: Add process 5272 Parent PID: 5005
** (io.elementary.monitor:6453): DEBUG: 11:54:54.519: TreeViewModel.vala:50: Add process 5279 Parent PID: 5005
** (io.elementary.monitor:6453): DEBUG: 11:54:54.519: TreeViewModel.vala:50: Add process 5286 Parent PID: 5005
** (io.elementary.monitor:6453): DEBUG: 11:54:54.519: TreeViewModel.vala:50: Add process 5295 Parent PID: 5005
** (io.elementary.monitor:6453): DEBUG: 11:54:54.519: TreeViewModel.vala:50: Add process 5298 Parent PID: 5005
** (io.elementary.monitor:6453): DEBUG: 11:54:54.519: TreeViewModel.vala:50: Add process 5301 Parent PID: 5005
** (io.elementary.monitor:6453): DEBUG: 11:54:54.519: TreeViewModel.vala:50: Add process 5308 Parent PID: 5005
** (io.elementary.monitor:6453): DEBUG: 11:54:54.519: TreeViewModel.vala:50: Add process 5317 Parent PID: 5005
** (io.elementary.monitor:6453): DEBUG: 11:54:54.519: TreeViewModel.vala:50: Add process 5328 Parent PID: 5005
** (io.elementary.monitor:6453): DEBUG: 11:54:54.519: TreeViewModel.vala:50: Add process 5342 Parent PID: 5005
** (io.elementary.monitor:6453): DEBUG: 11:54:54.519: TreeViewModel.vala:50: Add process 5350 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.519: TreeViewModel.vala:50: Add process 5361 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.519: TreeViewModel.vala:50: Add process 5409 Parent PID: 5269
** (io.elementary.monitor:6453): DEBUG: 11:54:54.519: TreeViewModel.vala:50: Add process 5410 Parent PID: 5269
** (io.elementary.monitor:6453): DEBUG: 11:54:54.520: TreeViewModel.vala:50: Add process 5413 Parent PID: 5269
** (io.elementary.monitor:6453): DEBUG: 11:54:54.520: TreeViewModel.vala:50: Add process 5415 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.520: TreeViewModel.vala:50: Add process 5420 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.520: TreeViewModel.vala:50: Add process 5453 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.520: TreeViewModel.vala:50: Add process 5528 Parent PID: 5269
** (io.elementary.monitor:6453): DEBUG: 11:54:54.520: TreeViewModel.vala:50: Add process 5552 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.520: TreeViewModel.vala:50: Add process 5603 Parent PID: 5269
** (io.elementary.monitor:6453): DEBUG: 11:54:54.520: TreeViewModel.vala:50: Add process 5634 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.520: TreeViewModel.vala:50: Add process 5644 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.520: TreeViewModel.vala:50: Add process 5664 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.520: TreeViewModel.vala:50: Add process 5679 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.521: TreeViewModel.vala:50: Add process 6145 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.521: TreeViewModel.vala:50: Add process 6184 Parent PID: 6145
** (io.elementary.monitor:6453): DEBUG: 11:54:54.521: TreeViewModel.vala:50: Add process 6186 Parent PID: 6184
** (io.elementary.monitor:6453): DEBUG: 11:54:54.521: TreeViewModel.vala:50: Add process 6188 Parent PID: 4748
** (io.elementary.monitor:6453): DEBUG: 11:54:54.521: TreeViewModel.vala:50: Add process 6189 Parent PID: 6188
** (io.elementary.monitor:6453): DEBUG: 11:54:54.521: TreeViewModel.vala:50: Add process 6453 Parent PID: 6189
(io.elementary.monitor:6453): dconf-DEBUG: 11:55:53.299: change_fast
(io.elementary.monitor:6453): dconf-DEBUG: 11:55:53.299: change_fast
(io.elementary.monitor:6453): dconf-DEBUG: 11:55:53.299: change_fast
(io.elementary.monitor:6453): dconf-DEBUG: 11:55:53.299: change_fast
(io.elementary.monitor:6453): dconf-DEBUG: 11:55:53.300: sync


image

@wpkelso
Copy link
Member

wpkelso commented May 2, 2025

Looks like that got it working 🎉. Is it supposed to show graphs for the integrated GPU as well, or only the discrete ones?

image

@stsdc
Copy link
Member Author

stsdc commented May 2, 2025

Haha, why it shows AMD on GeForce.
edit: oh, that's on me.

Yeah, for Intel also no support so far.

@stsdc stsdc added this to the Version 1.0.0 milestone May 7, 2025
@stsdc stsdc linked an issue May 7, 2025 that may be closed by this pull request
Copy link
Member

@ryonakano ryonakano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not tested yet, but leaved some comments.

Comment on lines +27 to +28
set_pci_properties (pci_access, pci_device);
name = "AMD® " + name;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pesonaly I think this code would be a little bit difficult to read. It looks like as if name is not initialized and thus it results to be just AMD@ without reading into set_pci_properties ().

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what to do with it. I'm using this Interface a bit like an abstract class.
Feels like the set_pci_properties content should be in the class constructor. But how to make it according to DRY? 🤔

gpu_view = new SystemGPUView (resources.gpu);
wrapper.add (gpu_view);
foreach (var gpu in resources.gpu_list) {
if (gpu.name.contains ("Intel") || gpu.name.contains ("nVidia")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works though, what about using typeof?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would You do this?
I have tried if (gpu.get_type () is GPUIntel || gpu.get_type () is GPUNvidia), but got type check expressions not supported for compact classes, structs, and enums

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

Successfully merging this pull request may close these issues.

Introduce a proper GPU discovery mechanism
5 participants