Can someone help me with a problem? I really don't know what is wrong with my computer in general but I think it is linked to my dual booting.

So one day my computer suddenly restarted and took me to my UEFI settings. I kept saving and exiting multiple times and finally got out of it but my computer started booting straight to my windows. I fixed it by goign to my UEFI settings and changing the bios or boot up options making ubuntu first because for some reason it switched.

but then I was doing work on windows and it happened again.. and I fixed it again and went on my ubuntu 13.10 and did some work there although I noticed something weird that when i closed my computer lid my computer and opened it up again my computer restarted. this also happens when I am on my windows. I don't know why closing my lid causes a reboot.

I started workign on my windows again and it crashed rebooted and took me to UEFI and now it jsut boots straight to windows 8 again

this problem is really annoying and i don't knwo if its a virus. i ran my symantec and it found no viruses. Does anyone know a solution to the problem?