Setting Underscan xrandr permanently

So I finally figured out how to set underscan on my tv screen monitor using command below:

xrandr --output HDMI-A-0 --set underscan on --set “underscan vborder” 65 --set “underscan hborder” 128

I have an amd graphics card, I thought this would not be permanent however it seems to be.

Take a look here maybe that will work. Depending on the DE, Display Manager and shell you’re using you could also places the commands you want to run on start-up in their respective “auto run” files or files like ~/.xprofile or ~/.xsessionrc. Maybe putting it in ~/.profile might also work for you. What is read and executed when pretty much depends on how you log on to your computer and with what DE stack that you’re using. You could also try to automatically run a script at startup over systemd, chron or the like. See here. Like with most things there are a lot of ways to accomplish what you want.

Wait so do I understand correctly that your problem is solved because it already is permanent? If so maybe you should close this.

Yeah its solved, I solved it myself I dont know why its permanent but it is. How do I close this?

I guess you just mark your last reply as solution. Ideally if you solve something yourself you’d probably just reply with how you solved it to your original question and mark this as answer so others can easily find it if they have the same problem.

For anyone who encounters the issue where you have a monitor but part of the screen is beyond the viewable area on the monitor, if you have an amd card use this command to fix the issue:

In a terminal run the command:
xrandr
This will show you something like this:

Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384
DisplayPort-0 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 510mm x 287mm
   1920x1080     60.00*+
   1680x1050     60.00
   1280x1024     60.02
   1440x900      59.90
   1280x800      59.91
   1152x864      75.00
   1280x720      60.00
   1024x768      70.07    60.00
   800x600       60.32    56.25
   640x480       66.67    59.94
   720x400       70.08
HDMI-A-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 640mm x 360mm
   1280x720      60.00 +  59.94
   1920x1080     60.00    59.94*   30.00    29.97
   1024x768      60.00
   800x600       60.32    56.25
   720x480       60.00    59.94
   640x480       60.00    59.94

So this tells me I have two monitors connected DisplayPort-0 and HDMI-A-0
In my case the monitor I need to fix the overscan issue is on HDMI-A-0,

The command you will want to run to fix the issue would be:

xrandr --output HDMI-A-0 --set underscan on --set “underscan vborder” 65 --set “underscan hborder” 128

Your setup will likely be different. So once you figure out the name of your monitor for lack of a better term you would want to substitute whatever your monitors name is with HDMI-A-0 and change the
--set “underscan vborder” 65 --set “underscan hborder” 128 values to ones that you think will get the image to fit on your monitor,

you will have to play around with these values until the image on your monitor actually fits on the monitor, Don’t worry if you get it wrong at first, just keep running the command with modified values until you get it to fit. On my system the changes stay even after restart.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.