Re: [PATCH v2 2/5] acpi/x86: s2idle: handle Display On/Off calls outside of suspend sequence

Mario Limonciello
2024-09-23T16:30:53Z

On 9/23/2024 11:15, Antheas Kapenekakis wrote:
> Does DRM core handle virtual displays like VNC?
>

You can make use of virtual display connectors in amdgpu. This is how
drivers for new ASICs are first developed in emulation and also what's
used for early hardware bring up.

You can see virtual_display from
https://www.kernel.org/doc/html/v6.11/gpu/amdgpu/module-parameters.html
for more details.

> As mentioned in the cover letter, the _DSM specifies both virtual and
> actual displays.
>
> Also, Windows behavior is like a lockscreen. 5 seconds after screen
> turns off after inactivity, instantly when you press the power button.
>
> I tend towards making a sysfs entry. Not sure.
>

Who would call this sysfs file? Systemd? The compositor? When?

In Linux the compositor is in charge of doing the modesets that involve
turning on/off the screen. In most cases if you press the power button
in Linux systemd-logind picks up the event. It triggers a behavior
that's controlled by the logind configuration. Typically that's turning
on a lockscreen and/or starting the suspend sequence.

Important to note; it DOESN'T explicitly turn off displays. If you
configured it to suspend then displays get turned off as part of the
kernel suspend sequence (drm_atomic_helper_disable_all).

If it is configured to trigger a lockscreen then the compositor will
turn off displays after whatever the DPMS configuration is set to.