Mac won't stay in Sleep mode

# The Issue
Lately my iMac (model Mid 2012) has trouble staying in sleep mode (believe or not it started on April 1st, yup I am not kidding). When the Mac is in sleep mode every minute or so it briefly wakes from sleep (fans are spinning up) and it goes back into sleep mode.

The following is a list of possible Wake reasons:
**OHC**: Open Host Controller, USB or Firewire. OHC1 or OHC2 generally a USB keyboard or mouse.
**EHC**: Enhanced Host Controller, USB or a wireless devices like bluetooth, they're on the USB bus.
**USB**: A USB device woke the machine up.
**LID0**: The lid or cover of MacBook, triggered when you open the lid.
**RTC**: Real Time Clock Alarm, generally from wake-on-demand services.
**PWRB**: The Power Button on your Mac.
**GIGE**: Gigabit Ethernet, the internal network card

# Resolving The Issue
The first thing that caught my eye is that every Wake event was caused by GIGE, i.e. something happening with the internal network card. So to test this I unplugged the network cable and put my Mac back into sleep mode.... and it stayed in sleep mode. Great!!!

Well not entirely because I am constantly working with large files which I need to be able to copy between several machines, and I don't want to do that over the WiFi connection all the time. Got better things to do that waiting for copy operations to finish.

Looking closer at the results from *syslog* I noticed that it mentioned ***Thoth-3***. I clearly remember naming my iMac ***Thoth*** (I got a thing for ancient Egypt, so I name my machine after [ancient Egyptian gods/goddesses][5]).

Somewhere along the line the name for my Mac has changed from Thoth into Thoth-3 (so I probably missed Thoth-2). As you can see as well Bonjour detects a conflict somewhere.

There are two preference panes (that I know of) where it states the name of your machine, the first on the 'Sharing'-pane and the second in the 'Network'-pane. On the 'Sharing'-pane you will immediately see the entry field aptly named 'Computer Name'
![Sharing preference pane][share]
On the 'Network'-pane you will have to first select your Ethernet interface (here named Ethernet) and the click on the 'Advanced...'-button.
![Network preference pane][network]
On the next pane select the 'WINS'-tab. Here you will find the [NetBIOS Name][6] for your Mac
![WINS NetBIOS][wins]
Most likely both these values will (and should) be the same (although the NetBIOS name will be in all caps). In my case they were, but Thoth-3 (and THOTH-3) instead of just Thoth.

I changed both the Computer Name and the NetBIOS name back to what I had originally named my Mac and to be safe rebooted the machine. After the machine was up and running again checked the values again just to be sure and detected no unwanted changes.

As a final test put the Mac into sleep mode again and waited... and waited some more for good measure. The Mac was no longer waking up from sleep mode every minute. Hooray!!

Not sure how or why but somewhere along the line these (automa[t|g]ic?) name changes were causing Bonjour in a constant loop to resolve conflicts

# Closing Statement
From the searches I performed online it was funny (or actually a bit disappointing) that the information on Apple's own support site was the least helpful. Just saying...