@Vlad123x did you ever solve this problem? I'm trying the hammerspoon script that was shared but it doesn't seem to be totally working if in clamshell mode
it kinda works for me, I'm still looking for a pattern ... but it seems to wake up if I wait a little. I just did it / will need more data... I use WoL and when I see no signal I press a key / mouse again and wait few seconds (LG c2 / MacBook m1 clamshell)
fyi my Hammerspoon logs:
2023-10-24 03:15:23: Received event: 11 screensDidUnlock
2023-10-24 03:15:23: LG TV is connected
2023-10-24 03:15:23: Waking screen.
2023-10-24 03:15:23: Executing command: ~/opt/lgtv/bin/lgtv MyTV on ssl
2023-10-24 03:15:24:
2023-10-24 03:15:29: Executing command: ~/opt/lgtv/bin/lgtv MyTV on ssl
2023-10-24 03:15:30:
2023-10-24 03:15:30: TV was turned on
2023-10-24 03:15:30: Executing command: ~/opt/lgtv/bin/lgtv MyTV getForegroundAppInfo ssl
2023-10-24 03:15:30: {"type": "response", "id": "0", "payload": {"returnValue": true, "appId": "com.webos.app.hdmi3", "processId": "", "windowId": ""}}
{"closing": {"code": 1000, "reason": ""}}
2023-10-24 03:15:30: Event ignored
2023-10-24 03:15:30: Received event: 1 systemWillSleep
2023-10-24 03:15:30: No screens are connected. Please check the 'connected_tv_identifier' in the 'lgtv_init.lua' script matches your connected screen.
2023-10-24 03:15:30: TV was not turned off because it is not connected
2023-10-24 03:15:31: Received event: 10 screensDidLock
2023-10-24 03:15:31: Event ignored
2023-10-24 03:15:31: Received event: 0 systemDidWake
2023-10-24 03:15:31: No screens are connected. Please check the 'connected_tv_identifier' in the 'lgtv_init.lua' script matches your connected screen.
2023-10-24 03:15:31: TV was not turned on because it is not connected
2023-10-24 03:15:32: Received event: 11 screensDidUnlock
2023-10-24 03:15:32: LG TV is connected
2023-10-24 03:15:32: Waking screen.
2023-10-24 03:15:32: Executing command: ~/opt/lgtv/bin/lgtv MyTV on ssl
2023-10-24 03:15:33:
2023-10-24 03:15:38: Executing command: ~/opt/lgtv/bin/lgtv MyTV on ssl
2023-10-24 03:15:39:
2023-10-24 03:15:39: TV was turned on
2023-10-24 03:15:39: Executing command: ~/opt/lgtv/bin/lgtv MyTV getForegroundAppInfo ssl
2023-10-24 03:15:40: {"type": "response", "id": "0", "payload": {"returnValue": true, "appId": "com.webos.app.hdmi3", "processId": "", "windowId": ""}}
{"closing": {"code": 1000, "reason": ""}}
2023-10-24 03:15:40: Event ignored