Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
astefan
2 discussion posts
Hey there. I've used this code to define a Scripted Function to sleep all monitors. Associated a key combination to it and tried it out.

All three monitors go black, but this lasts only 1-2 seconds. Am I doing something wrong or is there something I could check that prevents the monitors to go to sleep?

I'm using DisplayFunction Pro 9.7 on a 64bit Windows 10 Pro.
Jan 7, 2022  • #1
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
I tested it on out on my end and it seemed to work fine. If you let your computer go to sleep naturally, does that work or does it never enter sleep mode?

Thanks!
Jan 7, 2022  • #2
User Image
astefan
2 discussion posts
Yes, it does.

One small thing I want to clarify: not the PC going to sleep, but only the monitors. In Windows "When plugged in, turn off after..." functionality.

Thanks
Jan 7, 2022  • #3
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Ah right, my mistake. Could you send me over a debug log? Here are the steps:

  • On the DisplayFusion Settings > Troubleshooting tab, change the Logging drop-down to "L1: Log Minimal" and click Apply
  • Reproduce the issue and note the time so we'll know where to check in the log file
  • Click the "Export Info to File" button on the Settings > Troubleshooting tab
  • Reply with the file attached
  • Disable debug logging after sending the log

Thanks!
Jan 7, 2022  • #4
User Image
eggie
1 discussion post
I came across a this thread when I was searching for a solution for this same problem.

I ended up modifying the scripted fuction to add a wait which helped me work around the issue. Thought I'd tack it on in case someone else stumbles upon this issue as well. Hope it helps!

Code

using System;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;

// The 'windowHandle' parameter will contain the window handle for the:
//   - Active window when run by hotkey
//   - Window Location target when run by a Window Location rule
//   - TitleBar Button owner when run by a TitleBar Button
//   - Jump List owner when run from a Taskbar Jump List
//   - Currently focused window if none of these match
public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {    
        //wait 1000mS to avoid key combo waking the screen 
        BFS.General.ThreadWait(1000);
        // put all the monitors to sleep
        BFS.General.SleepMonitors();
    }
}
Sep 10, 2023  • #5
User Image
panckage
6 discussion posts
Quote:
Hey there. I've used this code to define a Scripted Function to sleep all monitors. Associated a key combination to it and tried it out.

All three monitors go black, but this lasts only 1-2 seconds. Am I doing something wrong or is there something I could check that prevents the monitors to go to sleep?

I'm using DisplayFunction Pro 9.7 on a 64bit Windows 10 Pro.

Do you have Steam and possibly a wireless MS keyboard/mouse installed by chance?

If so, I am/was having the same issue. There are some potential solutions here:
https://steamcommunity.com/discussions/forum/11/3004430610118704574/

The quickest workaround is just to make sure Steam is closed and then my monitors stay off. The other option is to change the wireless KB options as noted in the thread above. This sort of works for me... allowing monitors to stay off SOMETIMES but not always. Its an incredibly weird issue as my old korean 1440p doesn't have this issue ( straight DVI, and now DP->DVI through adapter) but my Dell monitor does. Super annoying.
Sep 10, 2023  • #6
User Image
salmawisoky
1 discussion post
Quote:
Quote:
Hey there. I've used this code Drift Boss to define a Scripted Function to sleep all monitors. Associated a key combination to it and tried it out.

All three monitors go black, but this lasts only 1-2 seconds. Am I doing something wrong or is there something I could check that prevents the monitors to go to sleep?

I'm using DisplayFunction Pro 9.7 on a 64bit Windows 10 Pro.

Do you have Steam and possibly a wireless MS keyboard/mouse installed by chance?

If so, I am/was having the same issue. There are some potential solutions here:
https://steamcommunity.com/discussions/forum/11/3004430610118704574/

The quickest workaround is just to make sure Steam is closed and then my monitors stay off. The other option is to change the wireless KB options as noted in the thread above. This sort of works for me... allowing monitors to stay off SOMETIMES but not always. Its an incredibly weird issue as my old korean 1440p doesn't have this issue ( straight DVI, and now DP->DVI through adapter) but my Dell monitor does. Super annoying.

Thanks!
Sep 11, 2023 (modified Sep 11, 2023)  • #7
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)