A complete guide to mirror and control your Note 20 Ultra from Fedora Linux with high performance, screen-off mode, autostart, and safe always-plugged-in usage.

Why scrcpy?
scrcpy is the best free and open-source tool for controlling Android devices from Linux. It offers:
- Low latency
- Full mouse + keyboard control
- Audio support
- No root required
- Works over USB or Wi-Fi
This guide is written specifically for Fedora + Galaxy Note 20 Ultra (SM-N986B), but it works with most modern Samsung phones.
1. Install scrcpy on Fedora
sudo dnf install android-tools
sudo dnf copr enable zeno/scrcpy
sudo dnf install scrcpy
Enable USB debugging on your phone:
- Go to Settings → About phone → Software information
- Tap Build number 7 times
- Go back → Developer options
- Enable USB debugging
Connect the phone via USB and accept the debugging prompt.
2. High Performance + Screen Off Command
This is the recommended command for best visuals, audio, and keeping the phone screen off while controlling it:
scrcpy \
--video-codec=h264 \
--video-bit-rate=16M \
--max-fps=60 \
--audio-bit-rate=192K \
--turn-screen-off \
--stay-awake \
--disable-screensaver \
--power-off-on-close
What the options do:
h264→ Most compatible codec on Fedora16Mbitrate → Sharp image60FPS → Smooth--turn-screen-off→ Phone screen stays black--stay-awake→ Prevents the phone from sleeping--power-off-on-close→ Turns the phone screen off when you close the scrcpy window
3. Create a Startup Script
Create a reliable script that waits for the phone and then launches scrcpy with the best settings:
mkdir -p ~/bin
nano ~/bin/start-scrcpy.sh
Paste this:
#!/bin/bash
# Wait until the phone is connected
while ! adb devices | grep -q "device$"; do
sleep 2
done
# High quality + screen off + audio
exec scrcpy \
--video-codec=h264 \
--video-bit-rate=16M \
--max-fps=60 \
--audio-bit-rate=192K \
--turn-screen-off \
--stay-awake \
--disable-screensaver \
--power-off-on-close
Make it executable:
chmod +x ~/bin/start-scrcpy.sh
4. Create a Desktop Shortcut
nano ~/Desktop/scrcpy.desktop
Paste:
[Desktop Entry]
Version=1.0
Type=Application
Name=Phone Control
Comment=Control Note 20 Ultra with scrcpy
Exec=/home/YOUR_USERNAME/bin/start-scrcpy.sh
Icon=phone
Terminal=false
Categories=Utility;
StartupNotify=false
Replace YOUR_USERNAME with your actual username, then:
chmod +x ~/Desktop/scrcpy.desktop
Right-click the icon on the desktop → Allow Launching.
5. Auto-start on Login (Optional)
mkdir -p ~/.config/autostart
nano ~/.config/autostart/scrcpy.desktop
Use the same content as the desktop shortcut above (just change the path if needed).
6. Handling Pattern Lock / Black Lock Screen
Android protects the pattern/PIN lock screen, so scrcpy shows a black screen when the phone is locked. This is a security feature.
Best workflow:
- Unlock the phone first (fingerprint or pattern)
- Then launch Phone Control
- The screen will turn off, but the phone stays unlocked and fully controllable
7. Safe Always-Plugged-In Usage
If you keep the phone connected most of the time:
- Go to Settings → Battery and device care → Battery → More battery settings
- Enable Protect battery (limits charge to 85%)
Extra tips:
- Use a good quality cable and charger
- Keep the phone in a well-ventilated spot
- Avoid covering it while charging
This combination keeps the battery healthier over the long term.
Final Recommended Script
Here’s the complete polished version:
#!/bin/bash
while ! adb devices | grep -q "device$"; do
sleep 2
done
exec scrcpy \
--video-codec=h264 \
--video-bit-rate=16M \
--max-fps=60 \
--audio-bit-rate=192K \
--turn-screen-off \
--stay-awake \
--disable-screensaver \
--power-off-on-close
Summary
You now have:
- High-quality remote control of your Note 20 Ultra
- Phone screen stays off while controlling
- Desktop shortcut named Phone Control
- Optional auto-start
- Safe battery settings for always-plugged use
This setup turns your Note 20 Ultra into a powerful secondary device you can control comfortably from Fedora.


My Start Script
1 Main 2 Virtual:
#!/bin/bash
while ! adb devices | grep -q "device$"; do
sleep 2
done
VIDEO_OPTS=(
--video-codec=h265
--video-bit-rate=10M
--max-fps=60
--stay-awake
--disable-screensaver
)
# 1. Home Assistant (portrait virtual)
scrcpy "${VIDEO_OPTS[@]}" \
--new-display=1080x1920 \
--start-app=io.homeassistant.companion.android \
--no-audio \
--no-vd-system-decorations \
--window-title="Home Assistant" &
# 2. Main phone screen
scrcpy "${VIDEO_OPTS[@]}" \
--audio-bit-rate=192K \
--turn-screen-off \
--power-off-on-close \
--window-title="Note20 Main" &
# 3. Jellyfin (landscape virtual)
scrcpy "${VIDEO_OPTS[@]}" \
--new-display=1920x1080 \
--start-app=org.jellyfin.mobile \
--no-audio \
--no-vd-system-decorations \
--window-title="Jellyfin" &
wait








