> Every computer can do this, its not a function of hardware.
I'm dying to know how a computer in ACPI S3† can execute my ACPI scripts. The only way for it to work is for some hardware to trigger an event that will kick it out of S3, and PCs old and new that do so on external display plug are (if any) apparently rare enough that I never encountered them, so currently I consider them devoid of this feature.
Even if it were so, this would require, as you say, and again as I did already for cases 2) 3) and 4), writing scripts, and such scripts are non-trivial. Calling xrandr (which of course needs DISPLAY and some X magic cookies) from an ACPI handler (which runs as root while the X session runs as you) requires interesting piles of trickery. Then timing issues come in, as drivers take time adjusting themselves and you have no way of knowing when they're ready (in the meantime e.g xrandr redurns/does crap). Also, interestingly enough, all sorts of fun stuff happens on VTs when the primary display vanishes to be thrown into an external one.
I long for the day when KMS supports multiple monitors and I can have VTs left and right, and I can run my favorite phrakture-like no-X setup on bare metal (and my web browser in a lightweight Wayland), but that day is far away so that setup stays in a VM.
† i.e CPU off == no power at all, only RAM and components registered for waking like USB controllers have reduced power.
I'm dying to know how a computer in ACPI S3† can execute my ACPI scripts. The only way for it to work is for some hardware to trigger an event that will kick it out of S3, and PCs old and new that do so on external display plug are (if any) apparently rare enough that I never encountered them, so currently I consider them devoid of this feature.
Even if it were so, this would require, as you say, and again as I did already for cases 2) 3) and 4), writing scripts, and such scripts are non-trivial. Calling xrandr (which of course needs DISPLAY and some X magic cookies) from an ACPI handler (which runs as root while the X session runs as you) requires interesting piles of trickery. Then timing issues come in, as drivers take time adjusting themselves and you have no way of knowing when they're ready (in the meantime e.g xrandr redurns/does crap). Also, interestingly enough, all sorts of fun stuff happens on VTs when the primary display vanishes to be thrown into an external one.
I long for the day when KMS supports multiple monitors and I can have VTs left and right, and I can run my favorite phrakture-like no-X setup on bare metal (and my web browser in a lightweight Wayland), but that day is far away so that setup stays in a VM.
† i.e CPU off == no power at all, only RAM and components registered for waking like USB controllers have reduced power.
edit: formatting