Auto-detect settings