04 September 2021, 16:46 | #1 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
WinUAE clock not updated after Windows resume from sleep
Beta31.
As the subjects says even with the MISC option "Syncronize clock = ON" Workbench wasn't aware (2-3 minutes later) the PC clock has changed after a overnight resume... have had to use SetClock LOAD from shell... What I did: with these options enabled: I ALT+Tabbed to Windows desktop and manually put the laptop in Sleep mode. On resume the next morning when I uniconified WinUAE and everything was working fine, I noiced Amiga clock didn't update. I didn't open F12 GUI panel, just uniconified the emulator. Last edited by hexaae; 04 September 2021 at 16:54. |
04 September 2021, 19:31 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
|
WinUAE already listens for WM_POWERBROADCAST which executes clock sync if system has resumed (sleep, hibernate etc).
Did clock sync after pause/unpause? or GUI enter/exit? |
04 September 2021, 22:07 | #3 | |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Quote:
Will test next time. |
|
06 September 2021, 08:05 | #4 | |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Quote:
Pause/resume = yes Last edited by hexaae; 07 September 2021 at 03:41. |
|
12 September 2021, 10:47 | #5 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
@Toni
Would be possible to add clock sync when you just re-activate WinUAE's screen/window, resuming from iconification or just clicking on it? Last edited by hexaae; 12 September 2021 at 10:57. |
12 September 2021, 14:30 | #6 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
|
Simple alt-tab = clock sync would be annoying in some situations.
Syncronize clock option should automatically keep clock in sync as long as emulation is running (not paused). Option has two modes: - when resuming/unpause/exit gui (which is basically same as unpause): AmigaOS clock is set to host clock. - when emulation is running: CIA-A TOD is synced to real world 50Hz (or 60Hz if NTSC) timing. AmigaOS uses this as a clock source. Make sure you have "bigbox" Amiga configured (Advanced chipset CIA-A TOD source = Power supply). If source is vsync, clock will drift (drifts also in real world). |
13 September 2021, 09:36 | #7 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Not a big problem pressing Pause key twice, but a smarter sync on resume would be better IMHO.
|
16 September 2021, 15:11 | #8 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
|
Resume from sleep generated expected WM_POWERBROADCAST message.
https://download.abime.net/winuae/files/b/winuae.7z adds log message when WM_POWERBROADCAST arrives and two SETSYSTIME log messages if clock sync was started. Do you get all 3 messages when resuming from sleep? |
16 September 2021, 16:21 | #9 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Tested after manual Hibernation and resume:
https://pastebin.com/d9KX1Cjs Uniconified WinUAE and clicked on Workbench... I see no WM_POWERBROADCAST or SETSYSTIME strings. My current cfg: https://pastebin.com/QAqxrGvj |
16 September 2021, 16:36 | #10 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
|
What if you don't iconify it (and make sure it does not do it automatically)? Perhaps this causes something unexpected.
|
16 September 2021, 17:41 | #11 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Maybe are simply these settings? I do never pause emulation.
EDIT: tested without auto-minimize on focus lost and still happened with WinUAE never been iconified. I'm quite confident are just the settings above and never knows in this case if Windows has resumed from sleep/hibernation. Last edited by hexaae; 16 September 2021 at 17:50. |
18 September 2021, 16:11 | #12 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
|
Looks fine..
So you don't see any POWERBROADCAST log messages if you run with log window open (-log): - run some basic windowed Amiga config, for example basic A500 with insert disk screen is fine. No need for clock sync option to be enabled. - sleep or hibernate PC - resume from sleep/hibernate - Amiga window and log window is still open. Note that there are usually dozens of new log lines added when resuming because display and sound require re-initializing. POWERBROADCAST line might be earlier line. If it appears, try same with more complex config. If it does not: need to find why it isn't working. (works fine here) |
25 September 2021, 02:44 | #13 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
That's so strange (and took me a lot of trial & error):
https://pastebin.com/Dv94PbrL this config WON'T show POWERBROADCAST in the log, but if you change lines: ... 141. gfx_fullscreen_amiga=true -> false ... 214. hardfile2=rw,DH0:.\WinUAE files\winuae_hd0.vhd,32,1,2,512,0,.\ROMS\SmartFilesystem,uae4 -> remove line 215. uaehf4=hdf,rw,DH0:.\\WinUAE files\\winuae_hd0.vhd,32,1,2,512,0,.\ROMS\SmartFilesystem,uae4 -> remove line 216. hardfile2=rw,DH1:.\WinUAE files\winuae_hd1c.vhd,32,1,2,512,-128,.\ROMS\SmartFilesystem,uae6 -> remove line 217. uaehf5=hdf,rw,DH1:.\\WinUAE files\\winuae_hd1c.vhd,32,1,2,512,-128,.\ROMS\SmartFilesystem,uae6 -> remove line ... POWERBROADCAST will show up! If I remove just lines 214÷217 (the HD files) or just change 141 it won't happen: both must be changed to restore POWERBROADCAST. Last edited by hexaae; 25 September 2021 at 02:58. |
15 February 2022, 09:09 | #14 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Hi Toni,
just wanted to report that I was able to reproduce this issue even with 4.9.1: closed the lid of my notebook the night before (sleep and then hibernated) and this morning I woke up the PC and WinUAE still reported the old clock. A "Setclock LOAD" or WinUAE pause/unpause can workaround the issue in this case and restore correct Windows host clock. |
15 February 2022, 18:26 | #15 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
|
Yeah but I can't duplicate it. It seems Windows refuses to send "woken up" message in your system. It makes no sense.
|
16 February 2022, 03:19 | #16 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Mmmh, how can I verify is Windows? Ideas... (other win programs I could test to see if they are affected etc.)?
From #13 it looked like a WinUAE custom cfg issue... |
20 February 2022, 18:38 | #17 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
|
|
23 February 2022, 20:31 | #18 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Sorry for delay...
Tested again and DID NOT happen with WB in windowed mode. Maybe it affects only full-window mode for some reason (DX11)? |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sleep / Resume | kfasheldon | request.UAE Wishlist | 6 | 07 May 2020 17:56 |
Dead mouse after resume from Windows display power saving | hexaae | support.WinUAE | 2 | 25 July 2013 16:35 |
Clock-Sync after resume from standby.. | tbone | request.UAE Wishlist | 2 | 06 July 2013 23:35 |
Clock not works on Winuae on Workbench/kick 1.3 | laser | support.WinUAE | 3 | 18 October 2007 15:28 |
Winuae FAQ pages updated | pjhutch | support.WinUAE | 1 | 16 January 2005 17:50 |
|
|