ported UEFI changes from upstream. added an env variable to workaround gnome-keyring bug.