Article 6ENXH inxi/pinxi with OpenGL enhanced, EGL, and Vulkan APIs now running

inxi/pinxi with OpenGL enhanced, EGL, and Vulkan APIs now running

by
h2-1
from LinuxQuestions.org on (#6ENXH)
This update proved to be a big headache, all from an initially somewhat innocent feature request.

pinxi (next inxi) -G now supports EGL and Vulkan APIs, and it's OpenGL support is much more granular.

this makes -G output way too long, but I keep getting feature requests for it, so it just is what it is.

Any testers welcome, it's taken me a lot longer to get this stabilized than I had hoped.

One note: for anyone who has installed pinxi on very old OS, updating with the -U option or the -U 3 will not work anymore if the OS only has SSL 1, the smxi.org server itself is now rejecting http requests that are SSL 1 only, which is correct.

To get around this, to get pinxi current installed, you can grab it like so:

Code:wget -O /usr/local/bin ftp://ftp.smxi.org/outgoing/pinxiTo install or update pinxi:
Code:# update:
pinxi -U
# install, adjust path to suite preference:
wget -O /usr/local/bin/pinxi smxi.org/pinxithen use -U 4 new update option after that to update to current, that will update from the smxi.org ftp server instead. I've tested this on Debian Etch and Lenny and it works as intended. Requires curl or wget.

For newer OS releases, -U will work fine.

I mention this because I am particularly interested in old slackware installs, with x11, to make sure everything still works as intended.

To test the vulkan support, you need vulkan-tools, which I believe is available in Slackware, and you need to install the Mesa Vulkan drivers as well. For EGL and GLX you need mesa package, for eglinfo and glxinfo.

This is one of the easier things to debug because all I need is the file output of vulkaninfo, eglinfo, or glxinfo to run that directly through pinxi, there's no other data sources, at least not yet.

Note that this has been somewhat and increasingly pressing because some distros are shipping with Wayland as default, that's going to keep expanding. inxi has been sort of faking it using glxinfo via Xwayland, but that was always a stopgap, but I wasn't aware of the eglinfo or vulkaninfo tools, nor was I aware of the Mesa group's' claims to be moving to EGL then eventually Vulkan as default display API, but this stuff is very confusing.

Samples:
Code:pinxi -G --vs
pinxi 3.3.29-22 (2023-09-11)
Graphics:
Device-1: AMD Cedar [Radeon HD 5000/6000/7350/8350 Series] driver: radeon
v: kernel
Display: x11 server: X.Org v: 1.21.1.7 with: Xwayland v: 22.1.9 driver: X:
loaded: modesetting dri: r600 gpu: radeon resolution: 1: 1280x1024~60Hz
2: 1280x1024~60Hz
API: EGL v: 1.4,1.5 drivers: kms_swrast,r600,swrast
platforms: gbm,x11,surfaceless,device
API: OpenGL v: 4.5 vendor: X.org mesa v: 22.3.6 renderer: AMD CEDAR (DRM
2.50.0 / 6.4.3-1-liquorix-amd64 LLVM 15.0.6)
API: Vulkan v: 1.3.250 drivers: llvmpipe surfaces: xcb,xlib

pinxi -Gx
Graphics:
Device-1: AMD Cedar [Radeon HD 5000/6000/7350/8350 Series] vendor: XFX Pine
driver: radeon v: kernel arch: TeraScale-2 bus-ID: 0a:00.0 temp: 59.0 C
Display: x11 server: X.Org v: 1.21.1.7 with: Xwayland v: 22.1.9 driver: X:
loaded: modesetting dri: r600 gpu: radeon resolution: 1: 1280x1024~60Hz
2: 1280x1024~60Hz
API: EGL v: 1.4,1.5 drivers: kms_swrast,r600,swrast platforms:
active: gbm,x11,surfaceless,device inactive: wayland
API: OpenGL v: 4.5 vendor: X.org mesa v: 22.3.6 glx-v: 1.4
direct-render: yes renderer: AMD CEDAR (DRM 2.50.0 / 6.4.3-1-liquorix-amd64
LLVM 15.0.6)
API: Vulkan v: 1.3.250 drivers: llvmpipe surfaces: xcb,xlib devices: 1

pinxi -Gxx
Graphics:
Device-1: AMD Cedar [Radeon HD 5000/6000/7350/8350 Series] vendor: XFX Pine
driver: radeon v: kernel arch: TeraScale-2 pcie: speed: 2.5 GT/s lanes: 16
ports: active: DVI-I-1,VGA-1 empty: HDMI-A-1 bus-ID: 0a:00.0
chip-ID: 1002:68f9 temp: 59.0 C
Display: x11 server: X.Org v: 1.21.1.7 with: Xwayland v: 22.1.9
compositor: xfwm v: 4.18.0 driver: X: loaded: modesetting dri: r600
gpu: radeon display-ID: :0.0 screens: 1
Screen-1: 0 s-res: 2560x1024 s-dpi: 96
Monitor-1: DVI-I-1 pos: primary,left model: Samsung SyncMaster
res: 1280x1024 dpi: 96 diag: 433mm (17")
Monitor-2: VGA-1 pos: right model: Dell 1908FP res: 1280x1024 dpi: 86
diag: 482mm (19")
API: EGL v: 1.5 platforms: device: 0 drv: r600 device: 1 drv: swrast gbm:
egl: 1.4 drv: kms_swrast surfaceless: drv: r600 x11: drv: r600
inactive: wayland
API: OpenGL v: 4.5 vendor: X.org mesa v: 22.3.6 glx-v: 1.4 es-v: 3.1
direct-render: yes renderer: AMD CEDAR (DRM 2.50.0 / 6.4.3-1-liquorix-amd64
LLVM 15.0.6) device-ID: 1002:68f9
API: Vulkan v: 1.3.250 surfaces: xcb,xlib device: 0 type: cpu
driver: mesa llvmpipe device-ID: 10005:0000

pinxi -Gxxx
Graphics:
Device-1: AMD Cedar [Radeon HD 5000/6000/7350/8350 Series] vendor: XFX Pine
driver: radeon v: kernel arch: TeraScale-2 pcie: speed: 2.5 GT/s lanes: 16
ports: active: DVI-I-1,VGA-1 empty: HDMI-A-1 bus-ID: 0a:00.0
chip-ID: 1002:68f9 class-ID: 0300 temp: 59.0 C
Display: x11 server: X.Org v: 1.21.1.7 with: Xwayland v: 22.1.9
compositor: xfwm v: 4.18.0 driver: X: loaded: modesetting dri: r600
gpu: radeon display-ID: :0.0 screens: 1
Screen-1: 0 s-res: 2560x1024 s-dpi: 96 s-size: 677x270mm (26.65x10.63")
s-diag: 729mm (28.7")
Monitor-1: DVI-I-1 pos: primary,left model: Samsung SyncMaster
serial: H9NX842662 res: 1280x1024 hz: 60 dpi: 96
size: 338x270mm (13.31x10.63") diag: 433mm (17") modes: max: 1280x1024
min: 720x400
Monitor-2: VGA-1 pos: right model: Dell 1908FP serial: G434H87HRA2D
res: 1280x1024 hz: 60 dpi: 86 size: 376x301mm (14.8x11.85")
diag: 482mm (19") modes: max: 1280x1024 min: 720x400
API: EGL v: 1.5 hw: drv: amd r600 platforms: device: 0 drv: r600 device: 1
drv: swrast gbm: egl: 1.4 drv: kms_swrast surfaceless: drv: r600 x11:
drv: r600 inactive: wayland
API: OpenGL v: 4.5 vendor: X.org mesa v: 22.3.6 glx-v: 1.4 es-v: 3.1
direct-render: yes renderer: AMD CEDAR (DRM 2.50.0 / 6.4.3-1-liquorix-amd64
LLVM 15.0.6) device-ID: 1002:68f9
API: Vulkan v: 1.3.250 layers: 3 surfaces: xcb,xlib device: 0 type: cpu
driver: mesa llvmpipe device-ID: 10005:0000

pinxi -Ga
Graphics:
Device-1: AMD Cedar [Radeon HD 5000/6000/7350/8350 Series] vendor: XFX Pine
driver: radeon v: kernel alternate: amdgpu arch: TeraScale-2 code: Evergreen
process: TSMC 32-40nm built: 2009-15 pcie: gen: 1 speed: 2.5 GT/s
lanes: 16 link-max: gen: 2 speed: 5 GT/s ports: active: DVI-I-1,VGA-1
empty: HDMI-A-1 bus-ID: 0a:00.0 chip-ID: 1002:68f9 class-ID: 0300
temp: 59.0 C
Display: x11 server: X.Org v: 1.21.1.7 with: Xwayland v: 22.1.9
compositor: xfwm v: 4.18.0 driver: X: loaded: modesetting dri: r600
gpu: radeon display-ID: :0.0 screens: 1
Screen-1: 0 s-res: 2560x1024 s-dpi: 96 s-size: 677x270mm (26.65x10.63")
s-diag: 729mm (28.7")
Monitor-1: DVI-I-1 pos: primary,left model: Samsung SyncMaster
serial: H9NX842662 built: 2004 res: 1280x1024 hz: 60 dpi: 96 gamma: 1.2
size: 338x270mm (13.31x10.63") diag: 433mm (17") ratio: 5:4 modes:
max: 1280x1024 min: 720x400
Monitor-2: VGA-1 pos: right model: Dell 1908FP serial: G434H87HRA2D
built: 2008 res: 1280x1024 hz: 60 dpi: 86 gamma: 1.4
size: 376x301mm (14.8x11.85") diag: 482mm (19") ratio: 5:4 modes:
max: 1280x1024 min: 720x400
API: EGL v: 1.5 hw: drv: amd r600 platforms: device: 0 drv: r600 device: 1
drv: swrast gbm: egl: 1.4 drv: kms_swrast surfaceless: drv: r600 x11:
drv: r600 inactive: wayland
API: OpenGL v: 4.5 vendor: X.org mesa v: 22.3.6 glx-v: 1.4 es-v: 3.1
direct-render: yes renderer: AMD CEDAR (DRM 2.50.0 / 6.4.3-1-liquorix-amd64
LLVM 15.0.6) device-ID: 1002:68f9 memory: 1000 MiB unified: no
API: Vulkan v: 1.3.250 layers: 3 device: 0 type: cpu name: llvmpipe (LLVM
15.0.6 256 bits) driver: mesa llvmpipe v: 22.3.6 (LLVM 15.0.6)
device-ID: 10005:0000 surfaces: xcb,xlib

## SSH into server with EGL data, console:
pinxi -Gay
Graphics:
Device-1: ASPEED Graphics Family vendor: Super Micro driver: ast v: kernel
ports: active: VGA-1 empty: none bus-ID: 12:00.0 chip-ID: 1a03:2000
class-ID: 0300
Display: server: X.org v: 1.21.1.8 with: Xwayland v: 23.1.1 driver: X:
loaded: modesetting,radeon unloaded: fbdev,vesa dri: radeonsi gpu: ast
tty: 106x40
Monitor-1: VGA-1 model: AOC Q27P1B serial: GNXL5HA147506 built: 2020
res: 1920x1080 dpi: 82 gamma: 1.2 size: 597x336mm (23.5x13.23")
diag: 685mm (27") ratio: 16:9 modes: max: 1920x1080 min: 640x480
API: EGL v: 1.5 platforms: device: 0 drv: swrast gbm: drv: kms_swrast
surfaceless: drv: swrast inactive: wayland,x11
API: OpenGL v: 4.5 vendor: mesa v: 23.0.3 note: console (EGL sourced)
renderer: llvmpipe (LLVM 15.0.7 256 bits)

## ssh into server with egl but no platforms:
pinxi -Gay
Graphics:
Device-1: ASPEED Graphics Family vendor: Super Micro driver: ast v: kernel
ports: active: VGA-1 empty: none bus-ID: 06:00.0 chip-ID: 1a03:2000
class-ID: 0300
Display: server: X.org v: 1.21.1.4 driver: gpu: ast tty: 106x40
Monitor-1: VGA-1 size-res: N/A in console modes: max: 1024x768 min: 640x480
API: EGL v: N/A platforms: active: N/A inactive: gbm,wayland,x11,device
API: OpenGL Message: GL data unavailable in console. Try -G --displayThis took a lot of really ugly code, very repetitive, but with just enough little differences to make trimming it down via more functions a no go, though I did try a few tricks, but nothing really worked, so I will have to sort of hold my nose about the code quality and try to pretend it doesn't exist, at least on an aesthetic code level, but it all seems to be working, I've been pounding testing on this stuff to catch corner case failures, and can't find any significant ones as of today.

Any eyes or testing appreciated.

Objectively, to me, inxi is now way too long re LOC, and its output is too long, but these things keep evolving, and things that were not practical or possible in the past are now both, or at least, possible. And people keep requesting features, so that's just how it is.

Note that EGL support is actually why I accepted the request to add Vulkan, which I didn't personally have much use for, but I had not read about it, and did not realize it was at least tentatively slated to replace both OpenGL and EGL, so best to handle them.

Note that these are designed to fall back somewhat gracefully, for example, ideally, in a pure Wayland session, you should see no OpenGL report, and no missing OpenGL, but that's fuzzy because very few wayland sessions are pure wayland at this point.

I don't know about Vulkan, I think that's significantly far in the future currently, it's apparently very hard to develop for because it's going to the hardware directly, so the programming is much harder, which is clearly going to slow it down a lot, but gaming is using it to take advantage of the much greater speed and performance available. My guess that will slowly drift into the desktop space over time. Given Wayland's glacial rate of adoption, emphasis on _slowly_.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments