Same issue here on pop_os and spent the last couple hours going down the iio-sensor-proxy rabbit hole… the solution I found was to add local systemd sensor lookup rules as follows:
In the directory /sys/lib/udev/hwdb.d create a file named 61-sensor-local.hwdb with the following contents:
# Framework 12
sensor:modalias:platform:cros-ec-accel:dmi:*svnFramework:pnLaptop12*
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, -1, 0; 0, 0, -1
After that run the following commands:
sudo systemd-hwdb update
sudo udevadm trigger -v -p DEVNAME=/dev/iio:device1
sudo service iio-sensor-proxy restart
And it worked. You can run monitor-sensor –accel to see which orientation it thinks its in.
Edit: For those who have different new hardware and a similar issue, the file 60-sensor.hwdb in /sys/lib/udev/hwdb.d has direction on how to do this for any hardware at the top of the file as well as all the current lookup values for known hardware. This along with this 5 y/o reddit post and the Arch Wiki page on tablet PCs is about how I came to this solution.