Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prismatik not working after PC sleeps #331

Open
mattzzz100 opened this issue May 2, 2020 · 43 comments
Open

Prismatik not working after PC sleeps #331

mattzzz100 opened this issue May 2, 2020 · 43 comments

Comments

@mattzzz100
Copy link

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
Copy link
Author

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
Copy link

zomfg commented May 2, 2020

with what board?

@mattzzz100
Copy link
Author

@mattzzz100
Copy link
Author

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

@zomfg
Copy link

zomfg commented May 2, 2020

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
Copy link
Author

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
Copy link

zomfg commented May 2, 2020

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
Copy link
Author

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
Copy link
Author

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
Copy link

zomfg commented May 3, 2020

It depends on how hard you want it, see here

@mattzzz100
Copy link
Author

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
Copy link

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
Copy link

Exioncore commented Jun 28, 2020

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
Copy link

Kas152 commented Aug 7, 2020

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
Copy link

dmutpuul commented Apr 10, 2021

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
Copy link

zomfg commented Apr 10, 2021

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

@dmutpuul
Copy link

dmutpuul commented Apr 11, 2021

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
Copy link
Owner

psieg commented Jun 27, 2021

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
Copy link
Owner

psieg commented Jul 1, 2021

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

@minhluan259
Copy link

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
Copy link
Owner

psieg commented Jul 21, 2021

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

@dmutpuul
Copy link

dmutpuul commented Jul 21, 2021

@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
Copy link

dmutpuul commented Jul 21, 2021

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

@jechin1
Copy link

jechin1 commented Aug 9, 2021

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
Copy link

Kas152 commented Aug 9, 2021 via email

psieg added a commit that referenced this issue Sep 4, 2021
@psieg
Copy link
Owner

psieg commented Sep 4, 2021

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
Copy link

H3mul commented Sep 4, 2021

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
Copy link

jechin1 commented Sep 4, 2021

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

@psieg
Copy link
Owner

psieg commented Sep 4, 2021

@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
Copy link

H3mul commented Sep 4, 2021

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

Prismatik.0.log

psieg added a commit that referenced this issue Sep 5, 2021
This was introduced in b464611. Instead of disconnecting this=>m_ledDevice, it disconnects this=>*, breaking recovery logic
@psieg
Copy link
Owner

psieg commented Sep 5, 2021

I found another bug. Please give this a try.

@H3mul
Copy link

H3mul commented Sep 5, 2021

Awesome, that version fixed this issue for me

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

@minhluan259
Copy link

minhluan259 commented Sep 6, 2021

I found another bug. Please give this a try.

The issue still exist:
Prismatik.0.log

@dmutpuul
Copy link

dmutpuul commented Sep 7, 2021

@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
Copy link

Kas152 commented Sep 7, 2021 via email

@Kas152
Copy link

Kas152 commented Sep 10, 2021 via email

@psieg
Copy link
Owner

psieg commented Sep 13, 2021

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

@ILYA878
Copy link

ILYA878 commented Jan 28, 2022

@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
Copy link

zomfg commented Jan 29, 2022

you are not using Prismatik from this repo

@lackovic
Copy link

lackovic commented Jan 30, 2022

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
Copy link

ILYA878 commented Feb 17, 2022

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
Copy link

ILYA878 commented Feb 25, 2022

@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
Copy link

waferchuck commented Nov 14, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests