Automatically try to detect background.