Ubuntu 16.04.1 : shutdown/reboot stuck on "[ok] stopped thermal daemon service"
As title says, 3 out of 5 times I shutdown my ubuntu 16.04.1 it always stuck on "[ok] stop thermal daemon service".
My hardware :
- Dell vostro 5459
- Samsung 850 EVO 250 GB
- I5 6200U
- 8GB DDR3
This seems to happened since a month ago after I dual boot windows and Ubuntu.
This thing seems to be triggered if I do anything with my mysql database (installed locally).
If I start my ubuntu and just do some browsing with chrome and mozilla, doing some document works with libreoffice. The problem doesn't happen.
I've made the windows drive to not automatically mount. but it makes no difference.
I've googled for answer, yet no solution really works.
Thank you for any reply or suggestions.
*english is not my native language so please pardon me for any mistakes
I've found a fix for my problem.
*I don't know why the last time I try to wait it out it took more than an hour to shutdown.
What I did was I recorded the shutdown process with my phone in Slow-mo Mode.
Like before, it stucks at
[ok] stopped thermal daemon service
After around 10 minutes, I see something like this
[ok] stopped thermal daemon service
[ok] stopped mysql community server
right before a bunch of text very quickly fill the screen and my laptop shuts down.
So the problem turns out that mysql community server is not shutting down on it's own. but even after the timeout (10 minutes) ran out, it doesn't give me a single error or anything.
Here's the solution
type the following in terminal
systemctl show mysql
it will return the location of mysql service configuration in one of the lines. for example mine says
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: en
edit the file (/lib/systemd/system/mysql.service) find a line that contain the word "timeout". change the value.
TimeoutSec=600
to
TimeoutSec=5
What this does is change the timeout of mysql community server from 10 minutes to 5 seconds, if stopping/starting the service took more than the timeout value, it will force close/stop the service. Making my ubuntu shuts down faster.