If you own a Synology NAS, you probably know the trouble that it frequently wakes up from hibernation without any obvious reason. Synology has added a more or less undocumented debugger for that issue. If enabled, it will log the reason for waking up from its beauty sleep, so one can take measures against it.
WARNING: This article is targeted at experienced Linux users. Even if you manage to enable the debug mode, you still have to analyze the log files, find a solution to your individual problem, and assess if it is safe to apply. If you make a mistake, you can cause a lot of damage to your system and your data. Please take this advice seriously.
In any case, make sure your data is properly backed-up. Remember that a RAID is not a backup!
Also note that the debug mechanism has changed from time to time, so it may be completely different on your NAS depending on the DSM version that is used.
You need to log into your NAS via ssh, and become root. (If you struggle at that, better stop here for your own good.)
Open the /etc/synoinfo.conf
file, and locate these lines:
enable_hibernation_debug="no"
hibernation_debug_level="1"
To enable the debugger, change enable_hibernation_debug
to yes
.
The hibernation_debug_level
line changes the debug level. The default 1
only logs the reason for your NAS to wake up, which should be sufficient. Level 2
also logs the interrupts that caused the wake-up.
After changing the configuration, invoke this command:
syno_hibernation_debug
The command itself gives no visual feedback, and also does not provide any kind of help or options. However, you can check the /tmp/hibernation.debug
file. If the file is present, the debugger was successfully started, and the file contains the PID of the debugger process. If you would run that command again, it would start another debugger instance. It would interfere with hibernation and would also need to be killed manually later, so make sure there is only one debugger running.
All you need to do now is log out and wait for the NAS to wake up by itself. Then log in again, and check the log files /var/log/hibernation.log
and /var/log/hibernationFull.log
. They contain a hint to the reason of the insomnia.
As there are a lot of possible reasons, fixing the problem is out of scope of this article. There may even be no viable solution.
To turn off the debugger, just change /etc/synoinfo.conf
back and invoke syno_hibernation_debug
again.