Announcement

Collapse
No announcement yet.

PC switched on at 1:00am all by itself!

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • PC switched on at 1:00am all by itself!

    Here's an interesting little problem. My PC switched itself on last night at 1:00:38 (according to the system logs), and I didn't tell/want it to! I'm running Kubuntu Feisty, and have an Abit AN-M2HD motherboard. Now the motherboard can be woken up via a PCI/PCIe card (I don't have any), via the LAN (my router was switched off), via a manual alarm set via the BIOS screen (I didn't do that), or setting an alarm using /proc/acpi/alarm.

    I set it up last week to test this function out, via this link (and I also installed the MythTV front- and backends -- I'm thinking of turning it into a mediacentre, and wanted to check that the software end was working before I get any hardware), and all worked fine and dandy. I've been switching the PC off at the point at night, but I forgot last night, so this may turn out to be a nightly thing! (I'll check again tonight.) Does anyone have any idea why this is happening, or how I could check what exactly told it to power on? Any help would be appreciated.

  • #2
    my friend had a stupid issue - there was an option in bios that caused his pc to turn on in the middle of the night. simple as that.

    Comment


    • #3
      There is an option in my BIOS to start on an alarm, and that is set to midnight, but the alarm is disabled by default -- so I don't think that could be it. I guess I'll have to wait up tonight and see what happens...

      Comment


      • #4
        While I was in the BIOS I noticed that "Wake up by onchip LAN" was set to enabled, so I disabled it. My router was switched off, as I said, but maybe there was some electrical interference which tricked the PC into starting up. My network cable is quite long, and snakes all though the walls. Does this sound plausible? It seems a bit of a coincidence that it would happen at almost exactly 1 am though.

        EDIT: Just tried setting the clock from BIOS to just before midnight (=1am with daylight savings), and waited to see what happened: nothing! So I'm not sure what was going on!
        Last edited by nemo; 07-23-2007, 10:41 AM.

        Comment


        • #5
          OK (just in case anyone is following this, or Googles for it when it happens to them) it looks like I've solved the problem now.

          I had originally followed this guide. In order to get the computer to power on from a timer I had to make the changes to /etc/init.d/hwclock.sh documented at the previous link. The important line is this one:

          Code:
          echo "$ACPITIME" > /proc/acpi/alarm && sleep 1 && echo "$ACPITIME" > /proc/acpi/alarm
          This is used to set the "alarm" that powers on the computer, and it is deliberately positioned in the script so that it comes after the code that sets the clock (otherwise the alarm will be forgotten). The catch is that when the timer is unset it has a value of "2007-00-00 00:00:00" (as can be seen using "cat /proc/acpi/alarm") my motherboard interprets this as "please switch on at midnight" (or 1am, taking into account daylight savings). Consequently every time my computer is shutdown this script effectively tells it to power on again at midnight!

          So I made the following modification to /etc/init.d/hwclock.sh:

          Code:
          if [ "$ACPITIME" != "2007-00-00 00:00:00" ]; then
             echo "$ACPITIME" > /proc/acpi/alarm && sleep 1 && echo "$ACPITIME" > /proc/acpi/alarm
          fi
          This only sets the alarm if it is not set to the off value of "2007-00-00 00:00:00".

          I shall experiment more, but so far it seems to work correctly.

          Comment


          • #6
            Your computer is watching dirty things and doesn't want you to know. There is no solution for this.

            No, seriously, I never heard of this. But I guess it was fun when the computer suddenly booted :P

            Comment


            • #7


              Also, my above code does not work properly. As it is it won't work after a timer has been set (after a timer has passed the day and month set to zero but not the time), or next year. The following should do this trick:

              Code:
               if [ "`echo "$ACPITIME" | sed "s/20..-\(00-00\)\(.*\)/\1/"`" != "00-00" ]; then
                 echo "$ACPITIME" > /proc/acpi/alarm && sleep 1 && echo "$ACPITIME" > /proc/acpi/alarm
              fi

              Comment

              Working...
              X