LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-09-2018, 01:56 AM   #1
adityavpratap
Member
 
Registered: Dec 2004
Location: Hyderabad, India
Distribution: Slackware 13, Ubuntu 12.04
Posts: 438

Rep: Reputation: 32
Debian 9 Parallels Desktop wrong time after waking from suspend


Hi,

I am running Debian 9 Gnome on my MacBook Air via Parallels Desktop. Everything works fine except for the fact that when I resume from suspend, the clock shows wrong time.

I tried -

$ sudo hwclock -w

but it does not correct the time.

Any suggestions?

Thanks in advance,
 
Old 07-11-2018, 07:15 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 8,745
Blog Entries: 5

Rep: Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141
Quote:
Originally Posted by adityavpratap View Post
Everything works fine except for the fact that when I resume from suspend, the clock shows wrong time.
this is normal.
if your computer is connected to the internet, it should fix itself after a minute or so.
if your computer is NOT connected to the internet, the CMOS should provide the correct time.
if the CMOS battery is dead, that won't happen.

i sometimes manually set my date with
Code:
sudo date -s 'Jul 7 15:14'
as an example.
 
Old 07-11-2018, 08:55 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,217

Rep: Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215Reputation: 2215
I don't know much about Parallels or how its "hardware clock" works or how or if it keeps track of a virtual machines clock but to set the system time from the hardware clock you would run the command

hwclock -s

If running ntp most likely it has stopped. If you restart ntp it should reset time or as stated you can manually reset time via the date command if the hwclock command does not work.

I assume the virtual machine has no direct connection to the physical hardware clock.
 
Old 07-11-2018, 08:56 AM   #4
adityavpratap
Member
 
Registered: Dec 2004
Location: Hyderabad, India
Distribution: Slackware 13, Ubuntu 12.04
Posts: 438

Original Poster
Rep: Reputation: 32
Thanks for the reply, eventhough my macbook is connected to internet, Debian shows wrong time whereas outside Parallels Desktop, macos show the correct time!

I'll try to restart ntp, if nothing else works, I'll set the time using the command posted by ondoho!

Thanks again,

Last edited by adityavpratap; 07-11-2018 at 08:57 AM.
 
Old 07-12-2018, 02:19 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 8,745
Blog Entries: 5

Rep: Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141
Quote:
Originally Posted by adityavpratap View Post
Parallels Desktop
erm.
i missed the importance of this bit.
sorta virtualbox for mac os.
i thought op had installed linux on their macbook.
 
Old 07-12-2018, 04:40 AM   #6
adityavpratap
Member
 
Registered: Dec 2004
Location: Hyderabad, India
Distribution: Slackware 13, Ubuntu 12.04
Posts: 438

Original Poster
Rep: Reputation: 32
Ok!
Restarting ntp sets the correct time.
Thanks guys, problem solved!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Troubles waking up from suspend on 13.37 bonixavier Slackware 2 08-15-2011 06:00 PM
Problem with waking up from suspend wearetheborg Debian 9 04-06-2009 05:35 AM
waking up laptop from suspend mode at a specified time adityavpratap Ubuntu 1 07-08-2008 03:28 PM
Waking up after suspend shuts down pc dive Linux - Kernel 1 05-27-2008 07:33 PM
Not waking from second suspend ritme909 Linux - Laptop and Netbook 0 01-29-2005 07:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration