So, I have a Galaxy S5 and since the release of Nougat (LineAge OS 14.1) I was stuck with the idea of using it as my pocket computer (I have bluetooth mouse and keyboard) by using multiwindow (freeform, with taskbar).
So I updated itto LineAge OS 14.1 and I was very disappointed to notice that this app (Screen StandBy) did not work anymore. Without it, battery drain is huge. Since then, I was trying to figure it out a way to turn the Galaxy S5 screen off (to save battery) while connected to MHL (HDMI out).
I was thinking that it had to be made by a specific app, so I keep looking.
The solution happened to be quite simple (REALLY SIMPLE). Nougat (and LingeAge OS 14.1) has a built-in option to calibrate colors of screen (its under Settings -> Screen -> LiveDisplay). If you put red, blue and green to minimum THE SCREEN WILL BE TURNED OFF, while MHL (HDMI out) is unaffected. I believe that this trick can be used with any smartphone with AMOLED screen running Nougat.
I hope to help anyone who was in the same situation as mine. Sorry my english.
For those who do not have this option natively, the Kcal Color Control app ( https://xdaforums.com/android/software-hacking/dev-kcal-advanced-color-control-t3032080 ) can do this. But from what I read, it only works on Qualcomm and with an specific option on Kernel. On my Z3 Compact, with custom rom, worked but on GPD Q9, also with custom rom, did not work