twinkle-tray icon indicating copy to clipboard operation
twinkle-tray copied to clipboard

Automatically refresh displays

Open Keavon opened this issue 1 year ago • 0 comments

Twinkle Tray works great, except on my Dell U2715H, it fails to interact with my monitor after I've pressed the power button to turn it off and then turned it back on again. But I can easily solve it by right clicking on the tray icon and clicking Refresh displays.

image

But I turn my monitor off many times per day and don't want to have to keep clicking that. Could there be an option to always refresh displays, perhaps always immediately before sending a command to the monitor?

Keavon avatar Aug 10 '22 02:08 Keavon

Hi @Keavon,

What you're requesting is what Twinkle Tray should be doing already. It listens for display changes (connects/disconnects/edits) and refreshes the displays shortly after. For whatever reason, that seems to not be not working properly with your configuration. Try enabling "Get Current Brightness", and let me know if that helps.

get-current-brightness

xanderfrangos avatar Aug 14 '22 21:08 xanderfrangos

Thanks @xanderfrangos, although I have already had that enabled. Do you have any other suggestions?

A few other details:

  • Based on your screenshot, I enabled the Power State button shown above and that makes it show the "Power off" button when clicking the tray icon, but this does nothing on my display (however Contrast does work)
  • I hear the Windows sound from plugging in and then unplugging a device each time I ever turn my display on (not when I turn it off, just when I turn it on both sounds play one after the other). I'm using the Micro DisplayPort input on my monitor and don't have the USB cable plugged in. Device Manager just shows this, even when the display is off (as confirmed through remote desktop software). image
  • I can't be certain, but I think if I keep the display on for many hours, it eventually refreshes without me doing so manually. (For the record, I don't have a time out time for the screen to go blank when it's on.)
  • When my display is off, and I use remote desktop software, my GPU doesn't properly render things that require a GPU to render (for example Blender and games are just black) because there's no output device for the GPU to target. Not directly relevant but I thought I'd mention it in case it's a hint.

Keavon avatar Aug 14 '22 22:08 Keavon

Assuming you're not using the Windows Store version, give this version a try and let me know if it helps. I've adjusted how the "Get Current Brightness" feature to works to re-check a little bit more about the monitors.

https://1drv.ms/u/s!AiWKFpjcSKRQhtgfR2lhKKiyWeG9PA?e=SiUClS

xanderfrangos avatar Aug 15 '22 04:08 xanderfrangos

That seems to work! At least initially. I'll report back tomorrow if it doesn't continue to work after my tests right now.

Edit with another detail: it seems that, after turning on the monitor, the keyboard shortcut doesn't work until the application decides to actually check the current brightness. So if I turn it on, play with the keyboard shortcuts to adjust brightness and nothing happens (the Windows 10 OSD shows the percentage similar to the audio volume OSD but even at 0% the brightness remains as it did when the monitor turned on), but then simply hovering over the Twinkle Tray tray icon to see the percentage in the tooltip causes it to check the brightness and then the shortcut keys begin to function correctly.

Keavon avatar Aug 15 '22 06:08 Keavon

Okay, here's one more build which should fix keyboard shortcuts as well: https://1drv.ms/u/s!AiWKFpjcSKRQhtggKc-uEFVqcSgMuA?e=gns3np

Let me know if that works. 👍

xanderfrangos avatar Aug 16 '22 02:08 xanderfrangos

That does the trick! Thank you @xanderfrangos. There's no more issues that I'm aware of now, assuming this solution remains robust beyond my initial test. Only time will tell if real world conditions cause any problems, as is inevitable in software development, but it looks great so far and I'll post here again if any issues do arise during a longer period of usage. I really appreciate the effort to make such a high quality app and your rapid fix to the issues! Feel free to close this now or when it's appropriate.

Keavon avatar Aug 16 '22 02:08 Keavon

Awesome, glad to hear that helped! This change only affects how the "Get Current Brightness" option works, which very few users enabled. So if there's something amiss, it doesn't affect very many people. Not that I expect anything new to be broken. 😅

I'll keep this issue open until I release the next update officially.

xanderfrangos avatar Aug 16 '22 13:08 xanderfrangos