-
Notifications
You must be signed in to change notification settings - Fork 189
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 HDR bug - Light blinking when moving mouse #255
Comments
Same here. I have used ATmega328 CH340 Chinese replica and 2-3 days from installing everything was working normally, but suddenly the LEDs start flickering with different colors when I move the mouse. And it only happens when any window or app are running in fullscreen. |
Is it related to HDR? Does it occur if HDR is disabled? |
@psieg Yes, it's HDR related since it's does not happened on SDR. My workaround is to have mouse trail enabled, I guess it's linked to refresh rate. |
I have the same problem here: |
the problem happen if your grab interval is "too fast" for what your PC can capture. If you can capture at 30FPS, set the grab interval under 33ms, this is not a solution but a workaround, it should work. and it is another reason why I don't understand how nvidia can deprecate NVFBC. |
Try running this build with flashes and without. |
I see nothing strange in the image produced by your build zomfg. Imho the problem isn't in the capturing step but in the output of the software from the PC to the microcontroller. I was able to reproduce the problem on a software written by my own. the problem is that some "dirty transmission" isn't blocked by the checksum check you use before displaying the colors on the led strip. |
if by checksum you mean the 3 bytes after "Ada", that only applies to the led count, the color values aren't taken into account |
I'm pretty sure this is unrelated to sending data to the microcontroller. I am using Prismatik without any external ledstrip connected to my computer. Instead I use the socket api that comes with Prismatik to send the color values to my own application, which then sends http requests to my lights. I'm seeing the same issue without any microcontroller for a ledstrip. Or at least, that's how it used to be for me anyway. I can't seem to replicate it anymore now, I recently switched from an amd card to one from nvidia, so perhaps that's related. |
Don't know what happened but I have the same problem of the opener. Prismatik is unusable when HDR is on |
In my case, the problem was solved by replacing all LED strips and wiring. |
I don't think that this can be the case since it works ok without HDR |
Ok I finally release my implementation of Screen Capture for Adalight devices and I don't have any problems with HDR. Obviously I don't post the link to my implementation because it would not be correct to you guys, I love your community and your work here. If someone is interested in having a working HDR can try my implementation on my GitHub. I still remain a big fan of prismatik and hope that this problem will be solved in the future. PS: Zomfg, sorry I had no time to do that try, I will do it as soon as I can. |
Hello. EDIT: Is interesting that it flash really only when actual FPS are lower then grab interval (or something like this) P.S. You can simulate this behaviour on SDR monitor by setting const DXGI_FORMAT DesktopFormats[] = { DXGI_FORMAT_R10G10B10A2_UNORM }; under DDUplGrabber.cpp |
interesting... diff --git a/Software/grab/GrabberBase.cpp b/Software/grab/GrabberBase.cpp
index 56a0b571..87278bf5 100644
--- a/Software/grab/GrabberBase.cpp
+++ b/Software/grab/GrabberBase.cpp
@@ -28,6 +28,7 @@
#include "GrabberBase.hpp"
#include "src/debug.h"
#include <cmath>
+#include <QFile>
namespace
{
@@ -140,6 +141,7 @@ void GrabberBase::grab()
++grabScreensCount;
_context->grabResult->clear();
+ const GrabbedScreen *gs = NULL;
for (int i = 0; i < _context->grabWidgets->size(); ++i) {
if (!_context->grabWidgets->at(i)->isAreaEnabled()) {
_context->grabResult->append(qRgb(0,0,0));
@@ -149,6 +151,7 @@ void GrabberBase::grab()
getValidRect(widgetRect);
const GrabbedScreen *grabbedScreen = screenOfRect(widgetRect);
+ gs = grabbedScreen;
if (grabbedScreen == NULL) {
DEBUG_HIGH_LEVEL << Q_FUNC_INFO << " widget is out of screen " << Debug::toString(widgetRect);
_context->grabResult->append(0);
@@ -222,7 +225,9 @@ void GrabberBase::grab()
preparedRect);
_context->grabResult->append(avgColor);
}
-
+ QFile frameFile("/tmp/frame.dat");
+ frameFile.open(QIODevice::WriteOnly);
+ frameFile.write(QByteArray::fromRawData((const char*)gs->imgData, gs->imgDataSize));
}
emit frameGrabAttempted(_lastGrabResult);
}
|
I will try it. EDIT: Hmm with later version of Lightpack I got this error in log. No problem with version 5.11.2.23 7aa0be4 Anyway i found that the problem with color happens also if you change white balance in wizard. |
OK, I tried saving the frame as you mentioned. P.S. I made another brach in my repository from older version of Prismatik, which works for me: |
I think that I found some trace. |
re-reading remarks here now makes more sense QString path = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
QImage imog(gs->imgData, gs->bytesPerRow / 4, gs->imgDataSize / gs->bytesPerRow, QImage::Format_RGB32);
imog.save(QString("%1/priz_%2_og.png").arg(path).arg(grabScreensCount), "PNG"); try this with now why would |
True, after re-reading the remarks I understand it also more. The #373 also came to my mind, but making I will try tomorrow more :) |
what was the test setup here? old api? new? 8bit?..
so it's both, crazy colors and timeouts (I don't have either in SDR)
this is normal, it's just padding for memory alignment |
It was on the new API 8bit (in Prismatik) monitor is in 10bit. |
that's what I'd suspect yeah, and if have you tried this one? |
I just tried to write screenData->duplication->GetDesc always return format 24. |
what if you set |
If I set |
so no issues now?.. |
I tried these two texDesc.Format = desc.Format;
scaledTextureDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
screen.imgFormat = mapDXGIFormatToBufferFormat(DXGI_FORMAT_B8G8R8A8_UNORM); texDesc.Format = desc.Format;
scaledTextureDesc.Format = DXGI_FORMAT_R10G10B10A2_UNORM;
screen.imgFormat = mapDXGIFormatToBufferFormat(DXGI_FORMAT_B8G8R8A8_UNORM); so with a working conversion I should get funky colors if I save those as |
hmm probably there is problem in copy from R8 to R10 texture? As I wrote is even weird that the copy texture copy from R10 to R8 works for me, because it shouldn't (from Microsoft description)... |
but even just BGR->RGB 8bit fails, so not even 8->10 |
Ah, I see, weird |
Maybe this could help https://www.manongdao.com/q-1240529.html |
Maybe
|
probably |
OK, is there someone who knows these D3D staffs? I see it for the first time :D |
Just for info, I tried to turn on windows HDR and grabbing doesn't work even after this "hack" :/ Hmm it doesn't work. But when I save the picture as png they are OK (before and after conversion). But not if I save it in GrabberBase.cpp
|
does not work as in you get all black? or random colors? |
It's white, but I found that problem is in the pointer to img data (imog exist only in this function....). |
Ok I got it working and with 12ms grabbing I have up to 15% CPU usage (i7-6700K 4,6GHz OC) :D |
OMG I thought that I have it working after all, but the QIamge doesn't have format for R16G16B16A16 (RGB64 doesn't fit) :( |
you mean |
yep. That's when you switch windows to HDR (and maybe also in other HDR applications, but I didn't test it yet) |
Confirming the "pointer trails" fix at least for desktop. Haven't had time to test in games yet but with Windows HDR and Win8DDupl in Prismatik enabled the flashing went away with "pointer trails" on at minimum setting in internet browsing. For those looking for this setting it's found in windows by typing "Mouse settings" into the start menu and clicking the system settings result. Scroll down to additional mouse options, click that and go to the "pointer options" tab in the window that pops up to find the "pointer trails" option. Had the same issue as the title. All LEDs in the string flashing bright while mouse is moving with HDR and Win8 Desktop Duplication enabled. LEDs acting just fine in videos or games for the most part with the rare flash of "lightning". So far the pointer trails setting has fixed the issue. NO clue what that means but hopefully this helps those who know. Current version of Prismatik (PSIEG build 5.11.2.27), Arduino w/FASTLED (not sure what version of FASTLED as I lost source code years ago) and 138 leds using APA102 LEDs at 77hz capture rate. Windows HDR enabled running at 3440x1440 144hz, 10 bit YCbCr444 color set via NVIDIA control panel. |
Mouse trail is a good workaround because it forced the Grab Frequency to jump to maximum level at a quicker rate and not jumping up and down. |
For me the issue still occurs, even with HDR disabled. Pointer trails are really annoying to me... Ambibox 2.1.7 doesn't have this issue, but I have different issues with that right now |
Is there any fix expected for this issue? |
Nope, I tried some thing, but I didn't get it working on windows HDR (R16G16B16) with my skills. |
Is this issue impossible to fix? This problem has to the most annoying part of using the program with peace & love. Is there any way a non-developer like myself can contribute to help with this? |
https://github.com/psieg/Lightpack/releases/tag/5.11.2.31 should fix this, thanks to @romkal |
thanks! Works like a charm! |
That would be #343. |
Yeah. I tried capture even with IDXGIOutput6 but that's not the problem :/ |
I have the issue here: https://www.youtube.com/watch?v=NgSb_JKcttU
FYI the controller is CH340 chinese one.
The text was updated successfully, but these errors were encountered: