Windows 7 hangs randomly after some period of inactivity

Hello Experts.   I have a Lenovo  desktop  with 2GB Ram  and 120GB Hard drive.   I have been running Windows 7 on it without any problems for about two months.  Suddenly   from yesterday it just freezes after a random period of inactivity.   I have diabled harddrive shut down and sleep mode  but it still freezes.  When it freezes both mouse and keyboard are unresponsive.    The only hard ware change i have made  recently is replace the busted IDE  dvd writr with a SATA  one.
I have AVG 9 running with current updates.     Any ideas?

LVL 2
aduhwaleAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DavidPresidentCommented:
Whenever I want to eliminate hardware problems, I use a trusty Ubuntu LINUX LiveCD.  Download and boot it.  This does NOT install an O/S on your HDD, and it will work with vast majority of RAID controllers.    You then log in, ( it gives you a read/write filesystem based on how much RAM you have in the system).

Then after you log on, run some disk tests.  I just set up a script to perpetually read from all disk drives and throw it in the bitbucket.  

i.e.  dd if=/dev/sda of=/dev/null bs=64k &

(Substitute /dev/sda if this is not the appropriate name for your HDD.  Look at the logs that show up as it boots to see what the actual device name is)

There are also some diagnostics built into the disk for testing other things

Let it run all night.   If, when you come back in the morning you see it still running disk I/O and there are no errors, then you know problem has to do with windows, and not the hardware.   If you see a POST screen or the logon screen for Ubuntu, then you know the box crashed overnight and hardware is to blame.
0
DavidPresidentCommented:
Even if you have never touched a LINUX/UNIX system, it is still relatively painless.  Anybody who has enough common sense to know what expertsexchange is in the first place and who can make hardware changes such as you should have no problems figuring out how to run the diags.  
0
DavidPresidentCommented:
If it does lock up, then unplug the SATA DVD, and re-test.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

aduhwaleAuthor Commented:
hello there.  excellent idea.  I will leave the disk  check running through the night and  rule out hardware as suggested.      I  will first  remove the SATA drive  and see if that stops the freezing.  I will revert after the tests.

0
DavidPresidentCommented:
Also run dmsg and look at /var/log/messages even if system stays up.  Something could still be throwing out error messages and LINUX is just more tolerant of them.  But the good news is that if it does stay online, and there are error messages, then you have confirmation on exactly what the hardware problem is.
0
AnnOminousCommented:
Even before you check the disks, start with the Ubuntu Live CD Memory Test. if that passes overnight, then try the disk test (ideally with the new components removed). If that works, then add the new DVD drive and check again.

If they all work, you may have a software issue, though the fact that the mouse freezes makes it somewhat more likely that a hardware issue is the root cause.
0
DavidPresidentCommented:
Ann makes good point, but personally I would just start with the disk because it has higher probability of root cause.  RAM fails, but I put my money on a mechanical device rather than a failure on a molecular scale to hold a charge.
0
AnnOminousCommented:
dlethe root cause analysis is probably correct, however how do you distinguish between a faulty disk and faulty memory? Answer is that you can't in general. So check memory first (or more the disk to a new machine and check it there).
0
DavidPresidentCommented:
Faulty memory will crash the system immediately, and it will not log anything.  Faulty disk will log an I/O error and since system is booted in RAM and errrolog is in ram, you will have 100% confidence if you get a disk error.  It would be different if the O/S wasn't running in RAM
0
AnnOminousCommented:
I've seen one flaky bit in 4GB allow the system to work quite well most of the time.

The only observable behavior were occasional unexpected 'phase of the moon' errors that were never repeatable and seemed like disk corruption (and probably were). Swapping the hard drive and reinstalling the OS worked for a while, but the cumulative effect of bit flips eventually killed the new install.

The basic problem is that if the system is locking up, it's probably not going to behave as you expect.

Now obviously, if you boot Ubuntu and it reports a SMART error, then good for you. But I don't see how a disk read error will lead to a hung system. And so it makes sense to me to start from the basics, and work up.

0
markdmacCommented:
Windows 7 has a built in memory diagnostic.  Run MdSched.exe and it will do a thorough investigation of the memory and tell you if there is a problem or not.

I had a memory issue with one stick.  Even MDSCHED would hang, but that was good.  I found that if I removed one stick I could get a full complete test and verify one stick was totally good.  I removed that one and put the other in and got the same hang on the test.  So I was able to determine which one was bad.
0
aduhwaleAuthor Commented:
hello  experts ,  thanks for all your help.   After  a couple of days of  various tests,  I  was able to find the problem to be my broadband modem.  here is what i did.

I first of all removed the SATA dvd writer which was the only new hard ware I installed.    I then ran the machine in windows  again  and after  about 45 mins same problem  ,     I then   ran a disk check   and while doing that I took my broadband modem  and plugged into my laptop  so I could continue working.   my laptop then hang  after a period   too.    
 I did both memory and   disk checks on both computers  and they were fine.  Both computers dont freeze up   when   unplugged from the broad band modem .

I then  spoke to the ISP  who confirmed they had been having some trouble.  Next I had a look at the modem  settings  and  turned  on modem error control  and voila  !  working.  

Now,  I am not sure if modem error control  was the issue  or the isp  had something to do with it?

Ok for the points,   Dlethe  sent me on the right path so gets  the majority of the points,  Ann  gets an assist.    Mark  gets a  mention.   Hope its fair guys?  Thx
0
aduhwaleAuthor Commented:
The  various tips led me to find a previously unconsidered  hardware that was causing the problem
0
AnnOminousCommented:
So it was one of those unexpected behaviors after all.

I would be interested in knowing the cable modem model and the ISP explanation of the cause of the failure. It's disappointing to hear that faulty external hardware could freeze your system, but it also means that it could freeze anyone else too.

Forwarned...
0
DavidPresidentCommented:
what is make/model of the modem?  it would be great if you posted a followup that has all the keywords of the modem, and a sentence that it locks up your system. Then other people who have same modem can get a search hit on a single post that confirms it is (was) a known bug at the time you made the post.  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 7

From novice to tech pro — start learning today.