psieg / Lightpack

Lightpack and Prismatik open repository
GNU General Public License v3.0
1.59k stars 190 forks source link

LEDs stay on when shutting down the PC #206

Open Infidaelity opened 5 years ago

Infidaelity commented 5 years ago

Hi all,

so I've built myself an ambilight using this tutorial: https://www.youtube.com/watch?v=juC-3imLoTQ

Initially it worked fine and the LEDs always turned off when shutting down my PC. But due to the windows feature "Fast boot" my PC only really went to standby instead of completely shutting down. This also produced some other issues on my PC unrelated to lightpack which is why I turned this feature off two days ago.

Now since my PC is finally really shutting down when i want it to the LEDs stay turned on after shutting down the PC. At least most of the time. I had one exception so far where they turned off properly.

I already checked and made sure that all 3 settings in Prismatik to keep the LEDs on in various states (lock, standby, exit) are turned off.

Did any of you experience this and have an idea how to fix it so the LEDs properly shut down when I turn off my PC?

Looking forward to your answer! Infidaelity

Edit: An additional thing that I noticed today. I'm currently playing Witcher 3 and everytime I play the game and afterwards try to shut down my pc the LEDs stay on. They never cease to function during the game or afterwards and work fine up until I shut down the pc. On shutdown they stay at the last displayed configuration.

psieg commented 5 years ago

The fast boot setting should not have an effect on this. Do you have DX hooking on?

Infidaelity commented 5 years ago

DX hookkng is currently disabled. Should I enable it?

Just yesterday it happened again without even playing a game, just regular use of my PC (watching videos, browsing the web). You could turn the LEDs off just fine manually in Prismatik but when I shut down the PC the LEDs stayed on.

psieg commented 5 years ago

No keep it off. Do the lights turn off when you lock/standby/exit?

Infidaelity commented 5 years ago

So far they turned off fine when locking. I rarely use standby but on my few occasions they also turned off fine. Exiting Prismatik doesn't turn the LEDs off although all the "Keep lights ON after ..." settings are disabled.

psieg commented 5 years ago

Hmmm, it should. Can you turn up the log level and post a logfile please?

Infidaelity commented 5 years ago

I turned the Log Level to 3. You can find the logs here: https://drive.google.com/file/d/15k1CScw5Dg6NImKrREATfSBPuk_Asc_M/view?usp=sharing

In this Zip-file you can find 3 log files.

The first was created after manually existing Prismatik and starting it again. The LEDs didn't turn off on the exiting before. In the first log file there should also be a manual shutting off of the LEDs through the software which worked fine.

The second log file was also created after manually exiting Prismatik, again the LEDs stayed on. I just wanted to have both parts (before and after exit) in those log files.

The third log file was created after I shut down my PC and started it again. The shutdown, again, did not turn off the LEDs.

Hope this helps. If you need anything else let me know!

Benik3 commented 5 years ago

What HW do you use? (LED type and controller). Isn't it same problem as #178 ?

ghost commented 3 years ago

Same here, strip leds doesn't power off when on PC shutdown.

My setup:

PC:

Pending to install Linux in a second ssd, will report back then.

Benik3 commented 3 years ago

If you try to shut off the LEDs by doubleclick on Prismatik icon, does it also always turn off?

1MikeKramer commented 3 years ago

I saw this thread and wanted to add my information to it as well. I built my setup about 2 years ago, I have gone through several versions prismatic and have always had the problem of the lights not turning off when I shut down the computer. I use the mood lamp static color for times when I am doing productive work and find this mode sticks on during shutdown much more often than the grabbing mode. (Though grabbing mode stays on during shutdown about 30% of the time) I always have to cycle the lights on and off like you said Benik3 by double clicking on the icon before I exit the software to get the lights to turn off. 95% of the time the lights cycle normally on and off when clicking the icon. There is the rare instance where double clicking the icon does nothing, I can switch profiles, but the leds are stuck on. Only by exiting prismatic then re-launching it do I get control of the leds back again, can switch profiles, and cycle them on and off like normal.

Not sure if this information helps at all, But figured since this was a relevant discussion I should share my experience.

Arduino Uno BTF W2812B strip 115 leds external 12 AMP power supply

Asrock X470 K4 Motherboard Ryzen 1600 Windows 10 Pro

ghost commented 3 years ago

If you try to shut off the LEDs by doubleclick on Prismatik icon, does it also always turn off?

Yes, 90% of the time (it fails sometimes but it doesn't worry me).

Benik3 commented 3 years ago

When turning PC off there could be theoretically problem, that SW is not fast enough to send the off message (everyone is using SSD now ad OS is pretty fast in turning ON/OFF). The problem with not turning off by doubleclick is probably cause by the Arduino Atmega + WS2812, mentioned here: #223

You can also easily solve the problem with LEDs by simply turning OFF the power to LED strip, which can be done simply by MOSFET/relay connected to Arduino power...

ghost commented 3 years ago

I'm a beginner with electronics... I'll look forward for your advice on MOSFET with the arduino, thanks a lot for your answer!

Ekristoffe commented 2 years ago

Hello all, I have found this fork for arduino: https://github.com/t0stiman/adalight_ws2812/tree/autooff It use a system of timeout to shutdown the LED after some time when no data is coming from the serial port. It could help to give it a try.

Edit: Right branch linked

Benik3 commented 2 years ago

I don't see any timeout in the code but yes, this could be an option. EDIT: Ok, it's in second branch :)

Ekristoffe commented 2 years ago

thanks my mistake, I use the same nearly the same code (timeout is 30s for me)

Ekristoffe commented 2 years ago

@Infidaelity @1MikeKramer @Benik3 I have found a better program for the arduino base: https://github.com/dmadison/Adalight-FastLED

I hope this could help a lot like it helped me to have a more stable setup.

Benik3 commented 2 years ago

If you want more stable setup use ESP8266/ESP32 and Makuna NeopixelBus library, instead of Atmega and FastLED :) https://github.com/Benik3/Adalight_WS2812_ESP8266_Non-blocking

Ekristoffe commented 2 years ago

That can be interesting to test. If I remember right the arduino Nano every I am using could also use another uart port for the LED. And for the lvl problem maybe using a fast optocopler or a transistor.

Benik3 commented 2 years ago

But Arduino Nano (Atmega 328P) has only one UART, which is used for communication from Prismatik.
Yes, you can of course use fast enough level shifter. For WS2812 etc. it's not so problematic, for SPI (APA102, SK9822 etc.) it's worse. But Makuna NeopixelBus has also option to invert the output data, so you can use simply just one transistor as level shifter. I like this solution with diode, it's easy and working nice. I have it now on my TV.

Ekristoffe commented 2 years ago

the nano every use the ATMega4809, it seem to have 4 USART ... maybe i need to learn more about this little board.

Benik3 commented 2 years ago

Interesting, I didn't know there is version with Atmega4809. The right name is Arduino Nano Every.
It's a nice upgrade, but I don't know if FastLED support using serial as output for LEDs. In Makuna NeopixelBus there is supported "Many Arm based Arduinos", but also not sure if it can use the serial port to output data for LED without disabling interrupts on these platforms.

Ekristoffe commented 2 years ago

Anyway I will download your .ino and test it on my hardware. if it doesn't work what could go wrong XD

wintercounter commented 1 year ago

I had the same problem. Turns out it was because of Over-Brightening. Turned it off (to 0) and now LEDs are turning off fine as well. Played a bit with Gamma instead to achieve similar results. It's funny tho, when just my screen turns off, LEDs are turning off fine despite of Over-Brightening. Seems like the software should automatically turn it to 0 upon suspend.

Ekristoffe commented 1 year ago

this is because of the controller used. some time it will loose some frames ... Unfortunately it may also loo the last frame (go black) ...

wintercounter commented 1 year ago

That doesn't explain why it works just fine without Over-Brightening.