TRIM on Samsung NVMe

Not sure if I properly unterstand they way TRIM on SSD is supposed to work. According to lspci I’ve got the following device: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981. It shows up as nvme0 in /dev. In Ubuntu 19.04 standard configuration, systemd regulary runs fstrim -Av by systemd fstrim.service. According to this commands output it only trims /boot/efi and /boot, but not my other filesystems and partitions.

According to documentation I found, fstrim is only possible if hdparm -I lists TRIM as a capability of the disk. This just fails with “Inappropriate ioctl for device” and doesn’t list any capabilities at all.

I guess something is broken here?

This happens on Ubuntu 19.04 with latest upgrades applied. The filesystems that are supposed to be trim’ed are on a partition in nvme0, which is setup as LUKS device, which in turn contains an LVM PV with various logical volumes.