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

Static data/image update on PC wake up #419

Closed
Sanichka opened this issue Dec 17, 2023 · 4 comments · Fixed by #427
Closed

Static data/image update on PC wake up #419

Sanichka opened this issue Dec 17, 2023 · 4 comments · Fixed by #427
Labels
bug Something isn't working

Comments

@Sanichka
Copy link

Is your feature request related to a problem? If so, please describe the problem.
After I wake up PC screen refreshing only parts with dynamic data(e.g sensors, percents etc) while background image is corrupted.

Describe the feature / solution to your problem you'd like
Add backround and static elements refresh on PC woke up.

Describe alternatives you've considered / and or tested
I haven't dived into code, so unfortunetly my only alternative is to manually restart program each day when I woke up PC.

Screenshots / photos & mockups of the Turing screen
IMG_20231217_204357
image

Environment:

  • Smart screen model UsbPCMonitor 5
  • Revision of this project release 3.3.4
  • OS with version Windows 10
  • Python version Python 3.9.13
  • Hardware AMD Ryzen 9 5900X, Nvidia 1070Ti

Additional context
Logs from log.log file:
16.12.2023 15:52:34 [DEBUG] Using Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]
16.12.2023 15:52:34 [INFO] Tray icon has been displayed
16.12.2023 15:52:34 [INFO] Display reset (COM port may change)...
16.12.2023 15:52:39 [DEBUG] Static COM port: COM4
16.12.2023 15:52:39 [DEBUG] HW sub-revision: SubRevision.USBMONITOR_5
16.12.2023 15:52:39 [DEBUG] Drawing Image: BACKGROUND
16.12.2023 15:52:39 [DEBUG] Bitmap res/themes/5inchTheme2/background.png is now loaded in the cache
16.12.2023 15:52:39 [DEBUG] Drawing Text: DISK_USED_LABEL
16.12.2023 15:52:39 [DEBUG] Drawing Text: DISK_FREE_LABEL
16.12.2023 15:52:39 [DEBUG] Drawing Text: DISK_TOTAL_LABEL
16.12.2023 15:52:40 [DEBUG] Found one supported GPU: NVIDIA GeForce GTX 1070 Ti
16.12.2023 22:07:19 [DEBUG] Caught Windows window message event 536
16.12.2023 22:07:19 [INFO] Computer is going to sleep, display will turn off
17.12.2023 0:18:59 [DEBUG] Caught Windows window message event 536
17.12.2023 0:19:00 [DEBUG] Caught Windows window message event 536
17.12.2023 0:19:00 [INFO] Computer is resuming from sleep, display will turn on
17.12.2023 1:51:51 [DEBUG] Caught Windows window message event 536
17.12.2023 1:51:51 [INFO] Computer is going to sleep, display will turn off
17.12.2023 12:36:16 [DEBUG] Caught Windows window message event 536
17.12.2023 12:36:16 [DEBUG] Caught Windows window message event 536
17.12.2023 12:36:16 [INFO] Computer is resuming from sleep, display will turn on

@Sanichka Sanichka added the enhancement New feature or request label Dec 17, 2023
@GaryStar
Copy link

add
display.display_static_images()
display.display_static_text()
after
display.turn_on()

(after line 144 in main,py)

@Sanichka
Copy link
Author

add display.display_static_images() display.display_static_text() after display.turn_on()

(after line 144 in main,py)

That helped, thanks!

@mathoudebine mathoudebine added bug Something isn't working and removed enhancement New feature or request labels Dec 22, 2023
@mathoudebine
Copy link
Owner

Thanks for investigating, I can confirm this is a bug on the UsbPCMonitor 5inch display model only. When the display is turned off (using its own command) then turned on again, some part of the display will be black instead of the previous bitmap.
It seems related to an orientation issue (portrait/landscape)
I will implement the workaround from @GaryStar in the next version

@GaryStar
Copy link

GaryStar commented Dec 22, 2023

I have the same issue on a 3.5 display. But in my case, the USB power is turned off by the motherboard on Sleep.
I've added a new variable in config.yaml to control this (also updated configure.py). In case everything is alright on wake from sleep you don't want a full background refresh as it takes a little time and it's not updating the dynamic values while is doing it.

                    if config.CONFIG_DATA["display"].get("REDRAW_BACKGROUND", False):
                        display.display_static_images()
                        display.display_static_text()

Screenshot 2023-12-22 131650

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants