Is there a way to, from the command line, on Wayland Linux, print the current displays, both their physical pixel size and their "logical" (display independent pixels / apple "points" / whatever wayland calls it) pixel size? There is a freeware app called wlinfo that purports to do this, but when I run it it prints inaccurate information (does not appear to support fractional DPI) and then crashes.
@mcc your compositor most likely has a command. niri has niri msg outputs but I know swaymsg (away) and riverctl (river) have similar subcommands

@chinmay @mcc
Yeah, on sway they have:

$ swaymsg -t get_outputs
Output eDP-1 'Sharp Corporation LQ156M1JW16 Unknown' (focused)
Current mode: 1920x1080 @ 240.000 Hz
Power: on
Position: 0,400
Scale factor: 1.000000
Scale filter: nearest
Subpixel hinting: unknown
Transform: normal
Workspace: 1 - One
Max render time: off
Adaptive sync: disabled
Allow tearing: no
Available modes:
1920x1080 @ 240.000 Hz
1920x1080 @ 60.000 Hz
...

@mcc Does "wayland-info -i wl_output" show what you're after?

@mcc For fractional scale information, there's basically two ways it is accessed.

"wayland-info -i zxdg_output_manager_v1" should show info about logical sizes/positions for outputs, and is widely supported.

That's not what apps are using to render at native resolution on fractionally scaled displays. Instead they would be using wp_fractional_scale (https://wayland.app/protocols/fractional-scale-v1), which has the compositor send events indicating the preferred scale factor for a surface. A new scale factor might get sent when a window is moved from one output to another.

Fractional scale protocol | Wayland Explorer

A better way to read Wayland documentation

@jamesh @mcc Never knew about those commands but they report expected values on Fedora/KWin on a framework laptop plus an external display. Good tip, TIL, thanks!
@mcc on GNOME gdctl might be able to show some things, but I'm on my phone ATM and cant check https://man.archlinux.org/man/gdctl.1.en
gdctl(1) — Arch manual pages

@mcc fastfetch -s Display --logo none is giving me something tantalizingly workable…except its actual pixels and a multiplier
@arrjay @mcc a multiplier should be enough to get you to logical / Display Independent Pixels, though: that's just the scaling factor. You can take Physical Pixels and divide by that multiplier to get Logical Pixels
@mcc i think it might depend on your DE. Gnome for example has a dedicated tool for this

@mcc If you're using GNOME:

# gdctl show

The reason you're getting all sorts of answers is that what you want to find out is more of a function of the compositor rather than 'Wayland', and there are a lot of different compositors.