psieg / Lightpack

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

Prismatik not working after PC sleeps #331

Open mattzzz100 opened 4 years ago

mattzzz100 commented 4 years ago

So im on windows 10 and managed to set up my adalight unit all fine with prismatic. Then I tried sleeping the PC to see if it will come back on after and it didnt. Now I cant get the lights to work again. Any ideas as to why this happened? I can see the unit in device manager, and Prismatik is running with the same settings as before. Thanks

mattzzz100 commented 4 years ago

Okay after fiddling with the program it will work again if I quit prismatik and restart it. Is there a way where I wont need to do this everytime after I put my pc to sleep?

zomfg commented 4 years ago

with what board?

mattzzz100 commented 4 years ago

Its a off the shelf product. Bought it from banggood, not sure what board it uses. https://www.banggood.com/Ambilight-DC5V-2M3M4M5M-WS2812B-5050-RGB-Dream-Color-USB-APP-LED-Strip-Light-for-Desktop-PC-Screen-p-1497308.html?rmmds=myorder&ID=45764554513&cur_warehouse=CN

mattzzz100 commented 4 years ago

Yeah and now even quiting the program and reopening doesnt work anymore either.

zomfg commented 4 years ago

You can open the box to see But looks like you have CH340 serial chip (did you install the driver?) which has all kinds of issues You can try this

mattzzz100 commented 4 years ago

Yeah it is a CH340 displayed in device manager. I downloaded the driver and it worked! As for the usb setting, should I set it to keep power on the USB constantly even when pc is turned off?

zomfg commented 4 years ago

If it works without touching USB power settings, maybe keep it as is for now. Otherwise, no, keeping power even when everything is off won't help

mattzzz100 commented 4 years ago

SO after updating windows, it worked as it should for a day. But now I'm back to the same problem. Doesnt work after pc wakes from sleep.. any ideas?

mattzzz100 commented 4 years ago

After fiddling around with it more, I got it working again by changing the baud rate from 128000 to 115200 in device manager. I was trying to have this higer to make it sync with my 100Hz monitor. Is this never going to be possible?

zomfg commented 4 years ago

It depends on how hard you want it, see here

mattzzz100 commented 4 years ago

Still having issues with this. Only sometimes work when I wake pc from sleep. Then to get it working again I need to shutdown the pc and restart it a few minutes later. Even that method doesnt work all the time. Now im back to not being able to get it working even after a PC shutdown/restart. :/

alexandergre commented 4 years ago

Having the same issue. Happens pretty much ~75% of the time when resuming from sleep. Usually to fix it I just toggle the light off and on, but sometimes this doesn't work either and I have to restart the app.

Exioncore commented 4 years ago

After fiddling around with it more, I got it working again by changing the baud rate from 128000 to 115200 in device manager. I was trying to have this higer to make it sync with my 100Hz monitor. Is this never going to be possible?

I have bought that same exact box myself. If you open it up you'll find that there's a simple Arduino UNO R3 inside of that. You can flash Adalight on it again (I however don't remember exactly which pins it uses for the LED signal but you should be able to trace it back by following the wire that is soldered to the LED connector) with your desired BaudRate if you want it to run faster.

Kas152 commented 4 years ago

I hava a 120hz monitor so I tried a few seetings too, to have the best direct visual effect. So here are my settings that work very nicely for me. boudrate: 500000 (change in code for arduino and in prismatik as well, otherwise it will not work, also changing the boudrate on the settingsmenu in devicemanager has no effect). Then set the grabinterval at 1ms. This gives for me the best effect.

dmutpuul commented 3 years ago

Hi. I am very grateful to you for the work you have done. I am using on windows 10 Prismatik (unofficial fork) software 5.11.2.27 + esp flashed with WLED + Wled_wifi plugin. Everything works great, but stops after resume from sleep state. Restart application helps but after sleeping all repeats. Is there any solution?

zomfg commented 3 years ago

why do you need a plugin? try without (any UDP device option in the config wizard)

dmutpuul commented 3 years ago

Yes, now i can see that plugin is not running) This infornation in logs after resume from sleep state:

11:00:04:104 Debug: void cdecl GrabManager::start(bool) true 11:00:04:104 Debug: void cdecl GrabberBase::startGrabbing(void) DDuplGrabber 11:00:04:104 Debug: void cdecl MoodLampManager::start(bool) false 11:00:04:104 Debug: void cdecl LiquidColorGenerator::stop(void) 11:00:04:104 Debug: void cdecl WindowsSoundManager::start(bool) false 11:00:04:104 Debug: void cdecl SettingsWindow::startBacklight(void) m_backlightStatus = 1 m_deviceLockStatus = 0 11:00:04:104 Debug: void cdecl SettingsWindow::startBacklight(void) check session key 11:00:04:104 Debug: void cdecl LedDeviceManager::switchOnLeds(void) 11:00:04:104 Warning: bool cdecl AbstractLedDeviceUdp::writeBuffer(const class QByteArray &) bytesWritten != buff.count(): 0 902 "Unknown error" 11:00:04:146 Debug: void cdecl SettingsWindow::ledDeviceCallSuccess(bool) Backlight::StatusDeviceError 11:00:04:146 Debug: void cdecl GrabManager::ledDeviceCallSuccess(bool) stopping grabbing while device is not available 11:00:04:146 Debug: void cdecl GrabManager::start(bool) false 11:00:04:146 Debug: void __cdecl GrabberBase::stopGrabbing(void) DDuplGrabber

After restart program every thing works fine. Restarting wled device is not helping.

P.S. I am trying to make script for auto restart prismatik after logon windows))

psieg commented 3 years ago

There is a mechanism to re-create the device on device error. It looks like this was only active for Lightpack devices.

Could you please try this version to see if that fixes it?

psieg commented 3 years ago

@dmutpuul @mattzzz100 when you have a chance, please try the version linked above. Thanks!

minhluan259 commented 3 years ago

There is a mechanism to re-create the device on device error. It looks like this was only active for Lightpack devices.

Could you please try this version to see if that fixes it?

I had the same problem with this version 5.11.2.28. Sometimes it automatically crashes, needs to be restarted and it's back to normal.

psieg commented 3 years ago

Does it crash or keep running but stop updating colors? Could you provide a log file please?

dmutpuul commented 3 years ago

@psieg Since my last comment (11 apr) i had no crashes except after resume from sleep state. I made a script to restart prismatik after logon windows and connect to network, after that no crashes. (sorry for my english) P.S. i have not try this version)) ->

Could you please try this version to see if that fixes it?

but if you want i will. And maybe in my case there was some crashes because my pc connected by wifi, and connection sometimes take a lot of time.

dmutpuul commented 3 years ago

here is log file , version 5.11.2.28 from your commet. Still error with connection device. So i will enable my script))

jechin1 commented 3 years ago

Hello, since the last update (5.11.2.29) my LEDs do not turn back on after resuming from sleep. I can get them to start updating again by double clicking the system tray icon. They also stay responsive if I checkmark Keep lights ON after display sleep/lock/system suspend. I tried rolling back to 5.11.2.28 but the problem persists, even using the version linked above. Linked is my log file and my OS is Windows 10. https://pastebin.com/7yy1610Q

Kas152 commented 3 years ago

I have exactly the same with the same operating system, but it goes with waves. For me this has been the case already since 3 or 4 updates ago. After every update the issue seems fixed but then after a while it comes back again. And then also sometimes it works again. So there does not seem to be a clear cause.


From: jechin1 @.> Sent: Monday, August 9, 2021 9:58:38 AM To: psieg/Lightpack @.> Cc: Kas152 @.>; Comment @.> Subject: Re: [psieg/Lightpack] Prismatik not working after PC sleeps (#331)

Hello, since the last update (5.11.2.29) my LEDs do not turn back on after resuming from sleep. I can get them to start updating again by double clicking the system tray icon. They also stay responsive if I checkmark Keep lights ON after display sleep/lock/system suspend. I tried rolling back to 5.11.2.28 but the problem persists, even using the version linked above. Linked is my log file and my OS is Windows 10. https://pastebin.com/7yy1610Q

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/psieg/Lightpack/issues/331#issuecomment-895024213, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMNQAE6OPG2K5GLYBASD6DLT36DC5ANCNFSM4MXREHAQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

psieg commented 3 years ago

Sorry for the delay, I was able to reproduce this and fix for non-UDP devices. For UDP I'm not sure because I can't test, but I tried something that should help.

Could everyone please try this version and let me know. If it doesn't please provide another log with at least level 2. Thanks!

H3mul commented 3 years ago

Unfortunately this did not fix the issue for me. I am using UDP (address 10.1.1.4 as you can see in the log)

Thanks for trying though, and keep up the awesome work! Looking forward to this being resolved

Prismatik.0.log

jechin1 commented 3 years ago

This new version solved my issue. The lights have resumed every time from sleep.

psieg commented 3 years ago

@H3mul Thanks! Hm, your log is different. The device is recreated and seems to talk to the device again successfully, but grabbing remains stopped. Can you make a log with this version please? I added some logs to help understand why it doesn't resume

H3mul commented 3 years ago

@psieg, sure, here you go. Same behavior, no change (error with connection device).

Prismatik.0.log

psieg commented 3 years ago

I found another bug. Please give this a try.

H3mul commented 3 years ago

Awesome, that version fixed this issue for me

Here's the log just in case: Prismatik.0.log

minhluan259 commented 3 years ago

I found another bug. Please give this a try.

The issue still exist: Prismatik.0.log

dmutpuul commented 3 years ago

@psieg

I found another bug. Please give this a try.

Thank you in my case this version works fine without any issues) P.S. now everything works without my script to restart program after resume from sleep state.

Kas152 commented 3 years ago

For me the issue was always resolved after another update and then it came back after a few months or a month or so. Very strange indeed but unfortunately I have no other info for you. I'm curious to see if the last update fixed it 😊.


From: dmutpuul @.> Sent: Tuesday, September 7, 2021 11:13:54 AM To: psieg/Lightpack @.> Cc: Kas152 @.>; Comment @.> Subject: Re: [psieg/Lightpack] Prismatik not working after PC sleeps (#331)

I found another bug. Please give thishttps://github.com/psieg/Lightpack/suites/3687131547/artifacts/89844662 a try.

Thank you in my case this version works fine without any issues)

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/psieg/Lightpack/issues/331#issuecomment-914135278, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMNQAE63VLKDJ2QD4ZUJMYLUAXJVFANCNFSM4MXREHAQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Kas152 commented 3 years ago

Hi Guys,

Today after getting the computer out of sleepmode, the lights did not start again. I have tried to look for the log (set at level 2) but could not find it, where is this located again?

Thanks!

Van: dmutpuul @.> Verzonden: dinsdag 7 september 2021 11:14 Aan: psieg/Lightpack @.> CC: Kas152 @.>; Comment @.> Onderwerp: Re: [psieg/Lightpack] Prismatik not working after PC sleeps (#331)

I found another bug. Please give thishttps://github.com/psieg/Lightpack/suites/3687131547/artifacts/89844662 a try.

Thank you in my case this version works fine without any issues)

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/psieg/Lightpack/issues/331#issuecomment-914135278, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMNQAE63VLKDJ2QD4ZUJMYLUAXJVFANCNFSM4MXREHAQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

psieg commented 3 years ago

The logs are at C:\Users\Yourname\Prismatik\Logs

ILYA878 commented 2 years ago

@psieg I have a similar problem. Prismatik turns off after an hour or several hours of play. Then it can be turned on only by rebooting. There was no such problem before. It appeared only after the Windows update. Restarting the program does not help, it says "connection problems". I attach logs during shutdown and after restarting the program. Please help me fix this. Prismatik.1.log Prismatik.0.log

zomfg commented 2 years ago

you are not using Prismatik from this repo

lackovic commented 2 years ago

I have a similar problem. Prismatik turns off after an hour or several hours of play. Then it can be turned on only by rebooting. There was no such problem before. It appeared only after the Windows update. Restarting the program does not help, it says "connection problems". I attach logs during shutdown and after restarting the program. Please help me fix this.

@ILYA878 try using the latest version from this repository.

ILYA878 commented 2 years ago

Anyway, after a while, the backlight turns off in some programs and games. Sometimes it happens after a few minutes, sometimes after an hour. after restarting the program, it says "connection error". And the logs say, "The device attached to the system does not work." Prismatik.0.log

ILYA878 commented 2 years ago

@zomfg I think that the problem is in the windows update, while I do not know where to look. The USB power settings is configured as written above.

waferchuck commented 1 year ago

I have created a daemon application to keep monitor COM status and auto restart Prismatik, feel free to use. https://github.com/waferchuck/Prismatik_Daemon