It is currently February 25th, 2020, 9:20 am

Lano Visualizer - computer can't auto-sleep

Help with creating, editing & fixing problems with skins
valentine1
Posts: 11
Joined: May 29th, 2012, 10:54 pm

Lano Visualizer - computer can't auto-sleep

Post by valentine1 »

Hi everyone,

I'm having a little bit of difficulty with computer sleeping when this skin is running... Not sure how to fix it.

At the moment it is unable to go into auto-sleep mode because "an audio stream is currently in use" (for windows users, in command.com type "powercfg -requests" to see any active processes that prevent sleep).

Is there any way to fix this? I gather that this skin runs in the background monitoring my audio output continuously. Is there any way to shut it off after a while?

At the moment I manually unload the skin every time I leave the computer! I could just shut down the computer every time I leave the house for a while, but it's not really feasible!
User avatar
balala
Rainmeter Sage
Posts: 9758
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Lano Visualizer - computer can't auto-sleep

Post by balala »

I had the same issue a while ago. I also looked for a fix/solution, but found no one. Finaly I stoped using any visualizer skin. But I also would be interested finding a fix, if it's possible. There is one?
User avatar
dgrace
Developer
Posts: 265
Joined: June 28th, 2014, 8:32 am
Location: Tokyo, Japan

Re: Lano Visualizer - computer can't auto-sleep

Post by dgrace »

Question: is the computer able to sleep if you sleep it manually from the Start menu? Or is that also prevented? (I do this every day, but I don't have my system set to auto-sleep after an inactive timeout)

If Rainmeter gets some message from Windows that "auto-sleep is starting" I can probably make a fix - jsmorley's researching it. Just wanted to give you guys a heads up that we're looking at it.

dave
valentine1
Posts: 11
Joined: May 29th, 2012, 10:54 pm

Re: Lano Visualizer - computer can't auto-sleep

Post by valentine1 »

dgrace wrote:Question: is the computer able to sleep if you sleep it manually from the Start menu? Or is that also prevented? (I do this every day, but I don't have my system set to auto-sleep after an inactive timeout)

If Rainmeter gets some message from Windows that "auto-sleep is starting" I can probably make a fix - jsmorley's researching it. Just wanted to give you guys a heads up that we're looking at it.

dave
Thanks guys!

The computer is able to sleep if selected manually from the Start menu. I think the main issue is that this skin is constantly monitoring the audio steam, which prevents the computer from ever achieving 'inactive' mode. I guess it then prevents the computer from ever thinking that it's time to go to sleep. I can tinker with skins but I don't know exactly how this skin actually monitors the audio - perhaps there is a way for this process to be considered a 'background task' which then wouldn't interfere with computer inactivity?
User avatar
balala
Rainmeter Sage
Posts: 9758
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Lano Visualizer - computer can't auto-sleep

Post by balala »

Absolutely agree with valentine1: my computer also can sleep manualy and even more: it enters in sleep mode if I don't have loaded any visualizer skin (which uses the plugin), but after I load one, it won't ever sleep again. After unload, it again enters in sleep mode (after the preset time).
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3762
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Lano Visualizer - computer can't auto-sleep

Post by eclectic-tech »

While this is being investigated...

You could use the SysInfo IDLE_TIME to detect inactivity and deactivate/disable the visualizer skin after a certain number of inactive seconds. That would allow the sleep mode to activate (or you could run a vbs sleep script from within the skin when the idle_time is reached).

It's a "workaround" but might help until the Rainmeter team comes up with something better 8-)
User avatar
jsmorley
Developer
Posts: 20280
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Lano Visualizer - computer can't auto-sleep

Post by jsmorley »

eclectic-tech wrote:While this is being investigated...

You could use the SysInfo IDLE_TIME to detect inactivity and deactivate/disable the visualizer skin after a certain number of inactive seconds. That would allow the sleep mode to activate (or you could run a vbs sleep script from within the skin when the idle_time is reached).

It's a "workaround" but might help until the Rainmeter team comes up with something better 8-)
I think the SysInfo / IDLE_TIME approach might be best. We are looking at some other code'ish things, but it's a bit tricky and risky to try to fool Windows about what it does or doesn't see as "activity" that precludes sleep.

Since sleep is also based on inactivity, you could in theory set a measure looking at idle_time, and have it unload the skin one minute before the value you have for sleep in the Windows power options.
User avatar
balala
Rainmeter Sage
Posts: 9758
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Lano Visualizer - computer can't auto-sleep

Post by balala »

Yes, probably the SysInfo / IDLE_TIME approach would be a good solution, but it also would be nice to not unload the skin. As for me, I think I'll wait to see if there will be any fix for that bug (if this can be named a bug).
User avatar
jsmorley
Developer
Posts: 20280
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Lano Visualizer - computer can't auto-sleep

Post by jsmorley »

balala wrote:Yes, probably the SysInfo / IDLE_TIME approach would be a good solution, but it also would be nice to not unload the skin. As for me, I think I'll wait to see if there will be any fix for that bug (if this can be named a bug).
It's not really a bug as such. The plugin has to "hook" the audio driver to capture data while it is running. Windows sees that "hook" as "activity" on the driver, and won't auto-sleep. I'm pretty sure dgrace can "unhook" the driver, but the issue is "when?" Rainmeter has no way to know that the computer is "about to sleep" or "wants to sleep", so it has to be driven by something else.
User avatar
balala
Rainmeter Sage
Posts: 9758
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Lano Visualizer - computer can't auto-sleep

Post by balala »

jsmorley wrote:It's not really a bug as such.
Yes, I thought but couldn't find quickly a better expression.