ramensoftware / windhawk

The customization marketplace for Windows programs: https://windhawk.net/
https://windhawk.net
GNU General Public License v3.0
2.16k stars 70 forks source link

Unable to shutdown monitor / display #176

Open JayGee7485 opened 7 months ago

JayGee7485 commented 7 months ago

Either windhawk launcher or Taskbar Labels for Windows 11 mod prevents any a all apps and scripts enabling scripted or planned monitor shutdown to actually shutdown monitor.

m417z commented 7 months ago

There was a similar issue in Windhawk before version 1.3.1: https://github.com/ramensoftware/windhawk/issues/51 What's your Windhawk version?

JayGee7485 commented 7 months ago

Version 1.4.1, mods Taskbar Labels for Windows 11 and Taskbar height and icon size, both up to date. I tried to disable mods one by one, only shutting down Windhawk all together restores it.

Example of shutdown monitor as i use it in BAT file: powershell (Add-Type '[DllImport(\"user32.dll\")]^public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2) > NUL

I occasionally use other apps to do planned tasks that can usually turn the monitor off.

m417z commented 7 months ago

In this case, how can I reproduce the issue? I have a tool to turn off the monitor and it works for me with or without Windhawk running.

JayGee7485 commented 7 months ago

I don't know exactly. I completely removed both mods, (restarted Windhawk) installed mod back a set up again and above script started to work again. I even rebooted to be sure the behavior doesn't change again. I don't really know what was wrong.

The other app is old software called "Poweroff" which works as well unless called from command line (one of the reasons why i use it: cmd). If Windhawk is running the command line call (poweroff.exe monitor_off) is not accepted. Actually think i call live with how it works now just fine.

m417z commented 7 months ago

If Windhawk is running the command line call (poweroff.exe monitor_off) is not accepted

I can try that. Where can I download this old software? Is it consistent, i.e. it always work when Windhawk isn't running, and always doesn't when Windhawk is running?

JayGee7485 commented 7 months ago

This should work: https://www.stahuj.cz/utility_a_ostatni/zjednoduseni_prace/automatizace/poweroff/download/ and yes. This behavior is consistent.

m417z commented 7 months ago

I tried it, and poweroff.exe monitor_off just works, both with and without Windhawk. Any other ideas?

JayGee7485 commented 7 months ago

I got to test it on a different Win 11 machine and it works fine. Unfortunatelly there is too meny differences in both HW and SW to find out what's really causing this collision. Sorry.

I'll try to give it some more thought later.