adb wakeup not wakes up galaxy s8
Try this command:

adb shell "dumpsys power | grep "Display Power: state=ON" | xargs -0 test -z" &amp;&amp; adb shell input key event 26


  This will first check to see if the screen is on. If it isn't, it will
  emulate the power key, which will turn on the device's screen.


Credits: Vimalraj Selvam