I am looking for a consistant way of getting the name of the built-in monitor in a laptop. To be exact, I am looking for the name of the monitor that will be turned off when the lid is closed. I was just wondering if there is a way without any hypothesis on the name (not listing every existing names...).
At first, it seems that the only difference is the way that the monitor is plugged to the motherboard, so names must be a relevent clue but I was wondering if it was possible without that.
For example, I was looking at how
logind was able to differenciate
HandleSwitchLidDocked, but I did not find anything very useful as sometimes sources are not very easy to understand