xrandr配置失败:Bug还是操作失误?旧电视欠扫描问题求助
Hey there, let’s work through this underscan problem with your old TV—nothing’s more frustrating than losing access to your top menu and launcher because the screen cuts off parts of the desktop. Let’s break down why the xrandr methods might have failed, and walk through actionable fixes step by step.
First, Confirm Your Display Details
Before tweaking settings, make sure xrandr recognizes your TV correctly. Run this command in the terminal to get all output info:
xrandr --verbose
Look for your TV’s output name (it’ll be something like HDMI-1, VGA-1, or DP-1) and note its native resolution (e.g., 1920x1080). This is critical because all subsequent commands target this specific output.
Fix 1: Troubleshooting the Underscan Border Adjustment
If the underscan setting method didn’t work before, it’s likely you either targeted the wrong output or used incorrect border values. Try this refined approach:
- Enable underscan for your output first:
(Replacexrandr --output HDMI-1 --set underscan onHDMI-1with your actual output name.) - Adjust vertical and horizontal borders incrementally. Start with moderate values (e.g., 40) and tweak until the full desktop is visible:
xrandr --output HDMI-1 --set underscan vborder 40 --set underscan hborder 40- If you get an error like "Failed to get size of gamma for output default", your graphics driver might not be properly recognizing the TV. Try updating your graphics drivers (switch to proprietary NVIDIA/AMD drivers if you’re using open-source ones) or reconfiguring Xorg.
Fix 2: Scaling the Desktop with xrandr (Alternative Approach)
If scaling the output didn’t work before, you might need to combine scaling with panning to keep your desktop resolution intact. Here’s how:
- Use the
--scaleflag to shrink the output so it fits the TV’s visible area. Start with a small reduction (e.g., 0.9 for 10% smaller):xrandr --output HDMI-1 --mode 1920x1080 --scale 0.9x0.9 --panning 1920x1080- Replace
1920x1080with your TV’s native resolution. - The
--panningflag ensures your desktop stays at full resolution—you can still move the mouse to access off-screen areas if needed, or adjust the scale value until everything fits without panning.
- Replace
- For finer control, use the
--transformflag to adjust scaling and positioning precisely:xrandr --output HDMI-1 --transform 0.9,0,10,0,0.9,10,0,0,1- The first two
0.9values are x/y scaling factors. - The
10values are x/y offsets—adjust these to shift the screen left/right or up/down until edges are visible.
- The first two
Make Settings Permanent
Once you find a configuration that works, save it so it persists after reboot:
- Add the working xrandr command to your
~/.xprofilefile (create it if it doesn’t exist):echo 'xrandr --output HDMI-1 --set underscan on --set underscan vborder 40 --set underscan hborder 40' >> ~/.xprofile - Or create an Xorg config file for more reliable persistence:
Create/etc/X11/xorg.conf.d/90-monitor.confwith the following content (replace values with your own):Section "Monitor" Identifier "HDMI-1" Option "underscan" "on" Option "underscanvborder" "40" Option "underscanhborder" "40" EndSection Section "Screen" Identifier "Screen0" Monitor "HDMI-1" SubSection "Display" Modes "1920x1080" EndSubSection EndSection
If All Else Fails
- Check if your TV has a hidden service menu (many older TVs do—search for your TV model’s service menu code online). Sometimes underscan/overscan settings are locked there instead of the regular user menu.
- Try a different video cable (HDMI/VGA) to rule out signal issues causing misalignment.
Let me know if you hit specific error messages or need help tweaking values—we can refine this further!
内容的提问来源于stack exchange,提问作者MongrelShark

