Raspberry Pi power switch preventing gnd from HDMI
Your description is vague to say the least.

However, turning off parts of a system can be a real chore, whether that be high side or low side. IO pins connected from the unpowered part to the powered part can act as power connections with unfortunate and often unpredictable results. 

A rather more intelligent power reduction system is usually required. You would likely be better putting the pi to sleep rather than unplugging it though. In fact these difficulties are why modern devices have such modes in the first place.