English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 04 September 2021, 16:46   #1
hexaae
Bug hunter
 
hexaae's Avatar
 
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.
hexaae is offline  
Old 04 September 2021, 19:31   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,504
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?
Toni Wilen is online now  
Old 04 September 2021, 22:07   #3
hexaae
Bug hunter
 
hexaae's Avatar
 
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
Quote:
Originally Posted by Toni Wilen View Post
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?
I didn't open the GUI (F12) to test... just waited to see if at some point the AmigaOS clock would have been updated. Actually the emu was never paused, even when iconified I kept the emu running... 'till I put the laptop to sleep.
Will test next time.
hexaae is offline  
Old 06 September 2021, 08:05   #4
hexaae
Bug hunter
 
hexaae's Avatar
 
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
Quote:
Originally Posted by Toni Wilen View Post
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?
GUI enter/exit (F12 and then Cancel) = yes
Pause/resume = yes

Last edited by hexaae; 07 September 2021 at 03:41.
hexaae is offline  
Old 12 September 2021, 10:47   #5
hexaae
Bug hunter
 
hexaae's Avatar
 
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.
hexaae is offline  
Old 12 September 2021, 14:30   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,504
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).
Toni Wilen is online now  
Old 13 September 2021, 09:36   #7
hexaae
Bug hunter
 
hexaae's Avatar
 
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.
hexaae is offline  
Old 16 September 2021, 15:11   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,504
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?
Toni Wilen is online now  
Old 16 September 2021, 16:21   #9
hexaae
Bug hunter
 
hexaae's Avatar
 
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
hexaae is offline  
Old 16 September 2021, 16:36   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,504
What if you don't iconify it (and make sure it does not do it automatically)? Perhaps this causes something unexpected.
Toni Wilen is online now  
Old 16 September 2021, 17:41   #11
hexaae
Bug hunter
 
hexaae's Avatar
 
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.
hexaae is offline  
Old 18 September 2021, 16:11   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,504
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)
Toni Wilen is online now  
Old 25 September 2021, 02:44   #13
hexaae
Bug hunter
 
hexaae's Avatar
 
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.
hexaae is offline  
Old 15 February 2022, 09:09   #14
hexaae
Bug hunter
 
hexaae's Avatar
 
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.
hexaae is offline  
Old 15 February 2022, 18:26   #15
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,504
Yeah but I can't duplicate it. It seems Windows refuses to send "woken up" message in your system. It makes no sense.
Toni Wilen is online now  
Old 16 February 2022, 03:19   #16
hexaae
Bug hunter
 
hexaae's Avatar
 
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...
hexaae is offline  
Old 20 February 2022, 18:38   #17
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,504
Quote:
Originally Posted by hexaae View Post
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...
Do you mean it stops working if fullscreen?
Toni Wilen is online now  
Old 23 February 2022, 20:31   #18
hexaae
Bug hunter
 
hexaae's Avatar
 
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)?
hexaae is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:38.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10713 seconds with 13 queries