It is actually possible to ask participants for the screen dimensions. The standard procedure is to ask them to resize a rectangle on the screen until it is the same size as an object we know the dimensions of (eg. credit card). jsPsych has a built-in plugin for this: https://www.jspsych.org/plugins/jspsych-resize/
Psychopy could implement a helper method that does the same