On Ubuntu 22.04.2 LTS I have two displays plugged into a Dell Inc. OptiPlex 9020. An HP 22ER display, the one which always comes up, is plugged into an HDMI port, the other LG display is connected to a Display Port socket using a Display Port to HDMI cable. When I wake the system from sleep by wiggling the USB wired mouse only the HP display plugged into the HDMI port is activated, and this is not the one with the top menu including the "power button" icon. I have to remember to always wake the system up using the keyboard. After the failed mouse-initiated wakeup I have to sit back and wait for the system to go back to sleep, and then hit a key on the keyboard to continue. How can I correct this behaviour? FYI I have included the monitors.xml file.
By the way it strikes me as unethical to have a configuration file whose interpretation is apparently not documented except apparently by users prepared to read the source code of the module that processes it.
https://wiki.gnome.org/Attic/RandR
<monitors version="2">
<configuration>
<logicalmonitor>
<x>1920</x>
<y>0</y>
<scale>1</scale>
<monitor>
<monitorspec>
<connector>HDMI-2</connector>
<vendor>HWP</vendor>
<product>HP 22er</product>
<serial>3CM7430GNZ </serial>
</monitorspec>
<mode>
<width>1920</width>
<height>1080</height>
<rate>60</rate>
</mode>
</monitor>
</logicalmonitor>
<logicalmonitor>
<x>0</x>
<y>0</y>
<scale>1</scale>
<primary>yes</primary>
<monitor>
<monitorspec>
<connector>VGA-1</connector>
<vendor>GSM</vendor>
<product>LG IPS FULLHD</product>
<serial>502NDFV1F227</serial>
</monitorspec>
<mode>
<width>1920</width>
<height>1080</height>
<rate>60</rate>
</mode>
</monitor>
</logicalmonitor>
</configuration>
</monitors>