Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
12
rated 0 times [  12] [ 0]  / answers: 1 / hits: 3589  / 1 Year ago, mon, april 17, 2023, 4:29:58

I have a pretty decent laptop (Intel Core i7-3520M CPU @ 2.90GHz, SataII SSD from Samsung, 8GB Ram), but I not satisfied with my boot and shutdown times...
I have installed bootchart, and am trying to interpret it, but I don't understand some parts.



Bootchart output



In particular, I don't get what is happening during the first 10 seconds, when there is almost no CPU utilization, nor I/Os. What is happening then ? (there seem to be only udevd, modprobe and plymouth running).



On the other end of my daily work, I also experiente slow shutdown. No shotdown chart here, so I'm even more clueless...



Update
I have come accross a hint saying hitting the up key while shutting down gives access to the console (I had been fighting with F1 / Alt F1 before that). So I have seen that the long shutdown time seems to have to do with rpcbind and modem-manager being unable to quit cleanly... Any idea?



Update 2
I have uninstalled rpcbind, as well as modemmanager. This made things better for shutdown, but I still have several seconds waiting between the 'All processes ended within 1 seconds' message, and the real shutdown. Just then, I get a quick message I was unable to read yet, but I suspect some sort of timeout to occur...



Update 3
Ok, I think I have narrowed things down to the execution of resume and wait-for-root during the first 10 seconds of the boot process. This is taking more than 5 secs, with no disk nor noticable CPU activity. I noticed that swap UUID in /etc/initramfs/conf.d/resume does not match with the real UUID of my swap partition, which happens to be... crypted. Maybe that is the point ? Any hint on initramfs-tools and cryptswap ?


More From » 12.10

 Answers
5

Ok, I have found the problem.
As I was feeling, the 5 seconds waiting on resume and wait-for-root is not normal.



Googling around, I finally found this bug report: 5 second delay on wait-for-root



Essentially, it states that the 5 secs wait is due to a wrong entry in /etc/initramfs-tools/conf.d/resume.



It turns out that my swap is encrypted, and I had the initial installation UUID in /etc/initramfs-tools/conf.d/resume.
I tried to put the one given by blkid for /dev/mapper/cryptswap1, but it didn't work...



I finally just commented out the entry in the file, and the 5 seconds delay is gone.
Any way, hibernate is not enabled on my system (I think it is disabled by default in Ubuntu). Notice the # at the beginning of the entry.



#RESUME=UUID=3835540d-0cb4-46fc-b39a-de9ff88dcefd


then run:



sudo update-initramfs -u


So here is my latest bootchart:



bootchart



Much better.
Regarding shutdown, removing rpcbind and modemmanager did the trick. I now have great boot and shutdown times.


[#33212] Monday, April 17, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rialhirt

Total Points: 422
Total Questions: 113
Total Answers: 120

Location: France
Member since Sun, May 15, 2022
2 Years ago
rialhirt questions
Mon, May 24, 21, 18:24, 3 Years ago
Tue, May 10, 22, 21:43, 2 Years ago
Thu, Feb 16, 23, 16:32, 1 Year ago
Mon, Jun 13, 22, 03:02, 2 Years ago
;