added unlock/lock/shutdown for linux, and improved device discovery, but not yet fully working