MolotovCherry / virtual-display-rs

A Windows virtual display driver to add multiple virtual monitors to your PC! For Win10+. Works with VR, obs, streaming software, etc
MIT License
601 stars 47 forks source link

Monitor flashes black screen #18

Closed lolKaizen closed 1 year ago

lolKaizen commented 1 year ago

Hi again

I'm back with another problem :/

Like the title suggests I've been having one or both monitors flashing black and then functioning normally. There seems to be no pattern or way to replicate it.

Sometimes there's times where it will flash both monitors multiple times in a minute, other times it will only flash one monitor once without another issue for a while.

I tried recording it but only managed to catch an example of it flashing my built in monitor once. I tried to catch it flashing both but it didn't act up for multiple minutes and I didn't want to waste my phone storage continuously waiting for it to happen again.

https://github.com/MolotovCherry/virtual-display-rs/assets/132479519/7d4d6df4-56ae-432b-a678-b1d9b8daaa40

Edit: new vid

https://github.com/MolotovCherry/virtual-display-rs/assets/132479519/414a737f-173b-4fc6-ac56-ebe1dbffdf7c

MolotovCherry commented 1 year ago

Could you clarify when it happens? You mean when connecting/disconnecting the monitor?

lolKaizen commented 1 year ago

It happens randomly. I cannot seem to replicate it. I don't mess with enabling or disabling the display. I turn it on, leave it on, and then it will randomly throw a fit which you can see in the videos I attached earlier.

Sometimes it is only one screen that flashes, either the virtual one or my physical one. Sometimes it's both

MolotovCherry commented 1 year ago

And it doesn't happen at all when the monitors are disabled?

Does it happen when running a particular application or type of application (e.g. games), or is that completely unrelated?

Does it only happen after a long time? Or does that not matter?

Is this a recent development, or did it used to do the same?

What monitor settings do you have for the virtual monitors? And what are the settings for them in windows (extended, duplicated, etc)?

Did the driver log anything of note to the event log? If it's crashing, it'll send a report to the event log

lolKaizen commented 1 year ago

And it doesn't happen at all when the monitors are disabled?

Nope, only when it is enabled.

Does it happen when running a particular application or type of application (e.g. games), or is that completely unrelated?

Seems unrelated, all I use this laptop for is school and runescape lol. The only two apps I use for extended periods of time are Edge and Runelite. Happens when either is open solo, and when they're opened together. I also use sunshine to view the virtual screen but it still happens when I completely close sunshine

Does it only happen after a long time? Or does that not matter?

It doesn't seem to matter, sometimes I can go hours without anything happening, sometimes it will be really disruptive and flash multiple times a minute

Did the driver log anything of note to the event log? If it's crashing, it'll send a report to the event log

Not a thing :/

Is this a recent development, or did it used to do the same?

It has happened since I first started using this however long ago, I've only thought to write about it after seeing how responsive you are

What monitor settings do you have for the virtual monitors? And what are the settings for them in windows (extended, duplicated, etc)?

1920x1080 60hz Extend

MolotovCherry commented 1 year ago

This doesn't happen on my computer (at least, I've never seen it happen before), though I'll leave it enabled and see if it happens to me eventually.

Can you test this on another computer too?

lolKaizen commented 1 year ago

Yeah, I can try my other computer.

If I had to guess, it could be that this laptop has no dedicated gpu? My other computer does, and from what I remember yours does too.

But that's just speculation from someone that has no idea about the development of something like this.

lolKaizen commented 1 year ago

So far its been ~40 mins on my other computer doing the same thing I would be doing. No problems on this computer everything runs just fine. Usually there would've been a hiccup by now. I'm not sure what this means for solving the problem :/

MolotovCherry commented 1 year ago

I'm working on seeing what it could be / improving things. Edit: I think I've located the issue, but it will take quite a bit of work and time to properly fix.

MolotovCherry commented 1 year ago

@lolKaizen Can you test out this debug driver please? (As usual, uninstall the old one first. Don't uninstall the whole program, just the driver itself)

Note: that's a debug build driver, which means its performance will be decreased

lolKaizen commented 1 year ago

Yeah I'll try it out, I'll make another comment in ~an hour just so I know for sure what the results sre

lolKaizen commented 1 year ago

Just had the same thing happen again, it seems it didn't fix the issue.

MolotovCherry commented 1 year ago

Just had the same thing happen again, it seems it didn't fix the issue.

Hmm, I haven't the slightest clue then. I definitely just fixed what should likely be the last big bug (and I've been testing it and ran it for a long time)

Are you sure all other drivers are gone? (E.g. using pnputil /enum-devices you can see a list of all of them)

lolKaizen commented 1 year ago

Are you sure all other drivers are gone? (E.g. using pnputil /enum-devices you can see a list of all of them)

Yeah, I made sure to check before I installed the driver.

MolotovCherry commented 1 year ago

I'm using integrated graphics right now just in case, but I don't think that will allow me to reproduce it still. If the issue is one I can reproduce (like the win10 one was), I can debug it to figure it out, (and the one I just fixed), but if I can't reproduce it, it could also be something hardware/software specific to a computer/model which I can't account for

I will say that a black flash is normal when connecting/disconnecting a monitor, but definitely not during any other time

Any other black flashes could be related to the actual processing of a monitor once it's connected - but I just fixed that part.

lolKaizen commented 1 year ago

Idk how debugging works, is there any way you can look at my computer to check out what's going on? Might be a silly question, just trying to be of more help.

MolotovCherry commented 1 year ago

Is that machine running win10? Even if so though, it should run the same now as far as I know.

is there any way you can look at my computer to check out what's going on?

Not really unfortunately. Debugging is generally a troubleshooting process where one makes educated guesses about what it could be and hopes one of those guesses hits the mark (and maybe with some help prior knowledge, and from tools). If it's a familiar problem, educated guesses could be more precise. If it's one that's very specific to one machine in a particular configuration (which often ordinarily may not even be a bug in the program, but something that a workaround has to be written for once found). Being able to reproduce it also means I have access to the (my) physical machine and can keep making guesses to see when it stops happening. It's like finding a needle in a haystack with a metal detector, but without the metal detector it's even harder

I'm not saying it's any of those, but if someone else also reports the same, it will mean it's more likely something about the code itself, and in such a case, may help me pinpoint it

I'll keep this in mind. If you do find any more commonalities that could help pinpoint it, please do post them! (You did with the win10 vs win11 suggestion, and you were spot on in fact)

lolKaizen commented 1 year ago

Is that machine running win10?

Yes, but I've since upgraded to 11

I totally get it, about the debugging. Don't stress yourself out too much with this, I'll try to think of anything else that could be causing this

MolotovCherry commented 1 year ago

Is that machine running win10?

Yes, but I've since upgraded to 11

I totally get it, about the debugging. Don't stress yourself out too much with this, I'll try to think of anything else that could be causing this

So would I be correct in assuming it's happening on win11 as well, and it persisted across upgrades (it happened on both)?

lolKaizen commented 1 year ago

Yes, it has persisted

MolotovCherry commented 1 year ago

I'm going to post an update soon since a big bug got fixed. I have added a portable zip to the release build containing only the files (no installer). Instructions for how to install using that one are on the main page.

When that version comes out, might I ask you to uninstall the program, then install it manually using those instructions?

lolKaizen commented 1 year ago

The portable ?

MolotovCherry commented 1 year ago

There will be two zips. One is a zip containing the installer. One of them is this one image

MolotovCherry commented 1 year ago

The portable ?

The file assets will be attached to the release (below) once the build is finished (~10 minutes) https://github.com/MolotovCherry/virtual-display-rs/releases/tag/v0.2.6

MolotovCherry commented 1 year ago

I think I just saw a flash actually 🤔 That's good news at least

lolKaizen commented 1 year ago

Just downloaded the new thing, should I uninstall or just keep it?

I think I just saw a flash

So maybe I was on to something?

MolotovCherry commented 1 year ago

Just downloaded the new thing, should I uninstall or just keep it?

I think I just saw a flash

So maybe I was on to something?

Uninstall the current program (it'll take care of the debug driver automatically). The debug drivers have a version based on the build time, so the version always increases every time, so it's best to just get rid of them first when going for release versions

Are you using a built-in intel integrated graphics card? I wonder if their software might be causing this (their software has been known to cause problems like this)

lolKaizen commented 1 year ago

Are you using a built-in intel integrated graphics card?

Yeah, Intel iris xe

MolotovCherry commented 1 year ago

@lolKaizen It turns out I made a mistake when I asked you to try the other debug driver. Please try this one. I am pretty sure it fixes the problem (ignore the performance issues)

lolKaizen commented 1 year ago

Hey dude, I meant to respond earlier but I got carried away with my studies. That does mean that I have thoroughly tested the driver though, and it seems to work perfectly now. I'll let you know if it ever happens again but if something was wrong, I think I would know by now.

MolotovCherry commented 1 year ago

Fixed in 3393d6f4da014010e225cb2f297f156c0d04fd42

lolKaizen commented 1 year ago

Question, do I have to keep this driver installed or will the latest release work?

MolotovCherry commented 1 year ago

Question, do I have to keep this driver installed or will the latest release work?

The latest release is still plagued by the bug, but the one you tried isn't. The one you tried is debug however. It'll probably work fine regardless though. But if you make more than 1 monitor, it'll become very laggy. So it is only functional for 1 monitor.

The next release has to be entirely re-architected to make multiple monitors work again. However, the next release should be out of beta since this is the last major bug and re-design needed

lolKaizen commented 1 year ago

Oh okay, cool. I'm glad I could contribute a little lol

MolotovCherry commented 1 year ago

Oh okay, cool. I'm glad I could contribute a little lol

PPS. If you want the latest debug release

lolKaizen commented 1 year ago

Hey, I didn't want to make another issue but lmk if I should. My uni gives us access to udemy and I noticed that the DRM makes video playback a black screen when it's shown on the virtual monitor. When I turn off hardware acceleration on my browser it shows fine though.

I'm assuming you can't fix this without knowing how udemy DRM works but I thought I'd ask.

MolotovCherry commented 1 year ago

Hey, I didn't want to make another issue but lmk if I should. My uni gives us access to udemy and I noticed that the DRM makes video playback a black screen when it's shown on the virtual monitor. When I turn off hardware acceleration on my browser it shows fine though.

I'm assuming you can't fix this without knowing how udemy DRM works but I thought I'd ask.

That's correct. This is not an easily fixable thing. My most pressing concern right now is simply to have it working properly rather than DRM (or maybe there's a Windows/browser solution to it)

lolKaizen commented 1 year ago

My most pressing concern right now is simply to have it working properly

Totally understand lol, no worries