Problem 1
I'm not sure if this is a hardware or software problem, but I have a newly built computer and experienced some strange shutdown problems. When I shut down the computer it hangs for a couple of seconds before shutting down. It sounds like the secondary HDD start up, shuts down, starts up and shuts down again before the computer shuts down itself. This always gives me a critical warning in event viewer saying that the PC wasn't shut down properly.

Sometimes it won't shut down at all, and I have to use the power button on the case. The LED code on the motherboard always shows "D4" when computer won't shut down, which means "PCI allocation error - out of resources". HDD also makes power down/up noises. This problem I have had all since I built the computer, but after I did a clean install of Windows with diskpart, it happened that the PC would randomly shut down or enter hibernation mode with LED code "D3", which means "some of the architectural protocols are not available".

However, if I turn off "fast startup" I experience none of these problems. It happens that the PC won't shut down, just much, much more rarely. When that happens LED code shows "D5" which means "no space for legacy option ROM initialization."
What I find strange is that these codes describe problems that doesn't seem to have anything in common, but the LED codes are only from D3 to D5, which are right after each other on the list.

I also get a strange vibrating/humming noise from what I think must be the HDD. The level sound varies very much, sometimes it's very loud and other times it's barely noticable. If I just lay a finger on the chassis the sound goes away, and if I take out the HDD it goes away as well.

Could I have a faulty HDD?

"Problem" 2
In event viewer I'm getting some warnings that seems to pop up right after each other occasionally:

Quote Originally Posted by Wininit ID 11
Custom dynamic link libraries are being loaded for every application. The system administrator should review the list of libraries to ensure they are related to trusted applications. Please visit Working with the AppInit_DLLs registry value for more information.
Quote Originally Posted by e1dexpress ID 27
Intel(R) Ethernet Connection I217-V
Network link is disconnected.
Still, it doesn't seem to affect my system performance (I'm using wireless network)