To me, that sounds like an ACPI issue.
ACPI is power management, and each of those actions (plugging in power cable, closing lid, etc.) would cause an action to be taken. e.g. closing the lid would cause hibernation or standby.
Wikipedia: ACPI
I would say use the package manager to get ACPI, but I'm not sure if Slackware has a package manager.