nic*_*ick 74 command-line xrandr resolution kali-linux
我是一个新的 Linux 用户,试图更改屏幕分辨率,因为显示下没有选项。我已经按照在线指南成功地通过侥幸添加了新的分辨率。我没有GPU,不知道是不是这个问题?下面是我的xrandr -q输出。
root@kali:~# xrandr -q
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1280 x 1024, current 1280 x 1024, maximum 1280 x 1024
default connected 1280x1024+0+0 0mm x 0mm
1280x1024 0.0*
1920x1200_60.00 (0x145) 193.2MHz
h: width 1920 start 2056 end 2256 total 2592 skew 0 clock 74.6KHz
v: height 1200 start 1203 end 1209 total 1245 clock 59.9Hz
1440x900_59.90 (0x156) 106.3MHz
h: width 1440 start 1520 end 1672 total 1904 skew 0 clock 55.8KHz
v: height 900 start 901 end 904 total 932 clock 59.9Hz
Run Code Online (Sandbox Code Playgroud)
Chi*_*g64 93
以下是添加新自定义分辨率并应用它所需的步骤。以下步骤用于添加 1920x1080 分辨率,但您可以将其用于您想要的任何其他分辨率。但请确保您的显示器和板载图形支持该分辨率。
# First we need to get the modeline string for xrandr
# Luckily, the tool "gtf" will help you calculate it.
# All you have to do is to pass the resolution & the-
# refresh-rate as the command parameters:
gtf 1920 1080 60
# In this case, the horizontal resolution is 1920px the
# vertical resolution is 1080px & refresh-rate is 60Hz.
# IMPORTANT: BE SURE THE MONITOR SUPPORTS THE RESOLUTION
# Typically, it outputs a line starting with "Modeline"
# e.g. "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
# Copy this entire string (except for the starting "Modeline")
# Now, use "xrandr" to make the system recognize a new
# display mode. Pass the copied string as the parameter
# to the --newmode option:
xrandr --newmode "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
# Well, the string within the quotes is the nick/alias
# of the display mode - you can as well pass something
# as "MyAwesomeHDResolution". But, careful! :-|
# Then all you have to do is to add the new mode to the
# display you want to apply, like this:
xrandr --addmode VGA1 "1920x1080_60.00"
# VGA1 is the display name, it might differ for you.
# Run "xrandr" without any parameters to be sure.
# The last parameter is the mode-alias/name which
# you've set in the previous command (--newmode)
# It should add the new mode to the display & apply it.
# Usually unlikely, but if it doesn't apply automatically
# then force it with this command:
xrandr --output VGA1 --mode "1920x1080_60.00"
Run Code Online (Sandbox Code Playgroud)
原始来源:https : //gist.github.com/debloper/2793261
我还编写了一个自动执行所有这些步骤的脚本。如果以上步骤对您来说太复杂,您可以尝试一下:https : //gist.github.com/chirag64/7853413
jim*_*mij 21
选项--size/-s可用于:
xrandr -s 1440x900
Run Code Online (Sandbox Code Playgroud)
应该适用于RandR1.1 或更高版本。
小智 9
我有同样的问题。在显示设置中,最大分辨率为 1280x720。所以:
例如:
xrandr --output DP-2-1 --mode 2560x1440
Run Code Online (Sandbox Code Playgroud)
这是我必须做的#IntelMaker #Joule,以便使用 SUNFOUNDER 7 英寸 TFT 彩色显示器以原始分辨率工作,它被列为具有 1024*600 分辨率,但被选择为 1280x720。
首先,带有 Linux 4.4.15-yocto-standard x86_64 的 Intel Joule 似乎没有gtf(1),所以,我不得不使用不同的机器来计算适当的数字:
$ gtf 1024 600 60
# 1024x600 @ 60.00 Hz (GTF) hsync: 37.32 kHz; pclk: 48.96 MHz
Modeline "1024x600_60.00" 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync
$
Run Code Online (Sandbox Code Playgroud)
然后,使用适当的命令创建一个文件:
# cat > 1024x600.sh
xrandr --newmode "1024x600_60.00" 48.96 1024 1064 1168 1312 600 601 604 622 -HSync +Vsync
xrandr --addmode HDMI1 "1024x600_60.00"
xrandr --output HDMI1 --mode "1024x600_60.00"
^D
# chmod +x 1024x600.sh
Run Code Online (Sandbox Code Playgroud)
然后,startx或startxfce4,然后运行./1024x600.sh,之后,将报告以下内容xrandr(1)。
# xrandr
Screen 0: minimum 8 x 8, current 1024 x 600, maximum 32767 x 32767
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1024x600+0+0 (normal left inverted right x axis y axis) 697mm x 392mm
1280x720 60.00 + 50.00 59.94
1920x1080 60.00 50.00 59.94
1920x1080i 60.00 50.00 59.94
1280x1024 75.02
1440x900 74.98 59.90
1024x768 75.08 70.07 60.00
1024x600 60.00
800x600 72.19 75.00 60.32 56.25
720x576 50.00
720x576i 50.00
720x480 60.00 59.94
720x480i 60.00 59.94
640x480 75.00 72.81 60.00 59.94
720x400 70.08
1024x600_60.00 60.00*
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
#
Run Code Online (Sandbox Code Playgroud)