I have Linux installed on a laptop where everything seems to work fine except for waking from the suspended state - it seems that there are two different kinds of suspend happening: one that works perfectly and one that doesn't.
If I click on "suspend" and manually make the computer sleep, I can then wake it by touching the mouse after which everything including the screen turns back on. However ... if I leave the computer inactive for a time so that it puts itself to sleep and then wake it by touching the mouse, everything turns back on except for the screen which stays off. I have to touch the mouse again to make the screen come on (I am calling this "auto suspend" to distinguish it from the manual alternative).
So I have to touch the mouse twice to wake it up every time on auto suspend, but only once on manual suspend.
On a previous installation of Linux I put up with something not working perfectly on wake from sleep, but this time I have decided not to.
I have discovered that there are differences in the syslog between the manual and auto wake from sleep (suspend), so here they are:
In the manual version:
Jan 28 19:36:56 HP-350-G2 kernel: [10973.550590] Disabling non-boot CPUs ...
Jan 28 19:36:56 HP-350-G2 kernel: [10973.565052] smpboot: CPU 1 is now offline
Jan 28 19:36:56 HP-350-G2 kernel: [10973.589313] smpboot: CPU 2 is now offline
Jan 28 19:36:56 HP-350-G2 kernel: [10973.611876] IRQ 23: no longer affine to CPU3
Jan 28 19:36:56 HP-350-G2 kernel: [10973.611886] IRQ 45: no longer affine to CPU3
Jan 28 19:36:56 HP-350-G2 kernel: [10973.612897] smpboot: CPU 3 is now offline
Jan 28 19:36:56 HP-350-G2 kernel: [10973.614960] ACPI: Low-level resume complete
Jan 28 19:36:56 HP-350-G2 kernel: [10973.615032] ACPI: EC: EC started
Jan 28 19:36:56 HP-350-G2 kernel: [10973.615033] PM: Restoring platform NVS memory
Jan 28 19:36:56 HP-350-G2 kernel: [10973.617975] Enabling non-boot CPUs ...
In the auto version:
Jan 28 19:28:14 HP-350-G2 kernel: [10473.577161] Disabling non-boot CPUs ...
Jan 28 19:28:14 HP-350-G2 kernel: [10473.590939] IRQ 46: no longer affine to CPU1
Jan 28 19:28:14 HP-350-G2 kernel: [10473.591999] smpboot: CPU 1 is now offline
Jan 28 19:28:14 HP-350-G2 kernel: [10473.615242] IRQ 49: no longer affine to CPU2
Jan 28 19:28:14 HP-350-G2 kernel: [10473.616257] smpboot: CPU 2 is now offline
Jan 28 19:28:14 HP-350-G2 kernel: [10473.638769] IRQ 23: no longer affine to CPU3
Jan 28 19:28:14 HP-350-G2 kernel: [10473.638777] IRQ 43: no longer affine to CPU3
Jan 28 19:28:14 HP-350-G2 kernel: [10473.638782] IRQ 45: no longer affine to CPU3
Jan 28 19:28:14 HP-350-G2 kernel: [10473.639801] smpboot: CPU 3 is now offline
Jan 28 19:28:14 HP-350-G2 kernel: [10473.641950] ACPI: Low-level resume complete
Jan 28 19:28:14 HP-350-G2 kernel: [10473.642023] ACPI: EC: EC started
Jan 28 19:28:14 HP-350-G2 kernel: [10473.642023] PM: Restoring platform NVS memory
Jan 28 19:28:14 HP-350-G2 kernel: [10473.644878] Enabling non-boot CPUs ...
This is in the manual version but not in the auto:
Jan 28 19:36:56 HP-350-G2 kernel: [10974.513543] ACPI: EC: event unblocked
This is also in the manual version but not in the auto:
Jan 28 19:36:56 HP-350-G2 kernel: [10974.795143] Restarting tasks ... done.
Apart from this the only differences between manual and auto are that a few lines appear in a different order. I could post the full logs, but that would be 240 lines.
I have already tried to fix this by executing this shell script
xrandr -d :0 --output eDP-1 --auto
in a systemd service with After=suspend.target, but this gave strange error messages in the syslog and didn't work, although it works fine in a terminal.
Can anyone please suggest why suspend behaves differently in the two cases, and/or how I might fix it so that a single touch of the mouse always turns the screen back on?