Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use gtf to adjust the resolution in Linux system

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "how to use gtf to adjust the resolution problem in the Linux system". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

When we use the Linux desktop environment, sometimes the screen is offset or the resolution is too low, there are two solutions, one is to install the display card to drive, and the other is to adjust it through the tool gtf provided by the xorg-x11 package.

Management tools for display settings

In Fedora, the configuration tool for monitors and display cards is system-config-display, which exists in the package system-config-display. If you don't have this command or you can't find it on the menu, you can install it yourself.

[beinan@localhost] # rpm-Q system-config-display

System-config-display-1.0.29-1

Without the above prompts, you can install the software through the package management tool system-config-packages. Or find the package installation from the CD image.

[beinan@localhost ~] # rpm-ivh system-config-display*

Call method:

[beinan@localhost ~] # system-config-display

Or

[beinan@localhost ~] # / usr/bin/system-config-display

This tool is relatively simple, and we can configure it according to the configuration of our machine. It is worth noting that if you use LCD, be sure to choose LCD.

Second, display card driver

The driver of the display card can provide stronger functions, such as supporting 3D functions. In addition, the resolution of the screen is related to whether the display card is driven or not. When the system is installed by default, the driver of the display card does not support 3D. If we want the system to support 3D, we must have a video card driver.

Unfortunately, not all graphics cards have official Unix-like drivers. At present, it seems that the official support of NVidia graphics cards is stronger. Some ATI display cards can be officially supported, and according to the official documentation of AIT, the display card version must be higher than 8500 before the official driver is available.

If you are using Fedora Core 4.0, you should upgrade your display card driver online. Please refer to "apt+synaptic installs Nvida chip display card and Ati card display driver for Fedora core 4.0".

We can use the official graphics card graphics adjustment tool to adjust the display properties. Extremely simple, done with a mouse click, similar to Windows. After installing the ATI and NVIDIA drivers, there is a graphical configuration tool on the menu. Look for yourself.

If you use Intel 855 integrated display card, you can refer to "Intel set in the graphics card resolution adjustment tool 855resolution"

Third, the handling of desktop display problems that are not NVidia and ATI display cards or are not supported by ATI manufacturers.

If you pass system-config-display, you can't solve your display problems, such as screen offset, resolution and so on. We can try it with the gtf tool.

1. Which software package does the gtf tool come from?

Gtf is from the software package xorg-x11, which is generally available if you have a desktop environment installed. Most systems are installed by default.

2. What is gtf.

Gtf-calculate VESA GTF mode lines in Chinese means to calculate the display device VESA driver GTF mode command line tool.

What is gtf? Gtf (generalized timing formula), the general program time, defines the time required to generate a picture, including such as the picture refresh rate, etc.). In addition, gtf is also an industry standard for display devices. The screen size can be adjusted automatically through GTF.

We use gtf tool to calculate the screen size and resolution of the display, and then we insert the calculated values into the xorg.conf configuration file to automatically adjust the display size, position and resolution of the screen.

3. The usage of gtf.

Gtf h-resolution v-resolution refresh

[- v |-- verbose] [- f |-- fbmode] [- x |-- xorgmode]

Example: my monitor supports 1024x768 and can reach 85HZ in X mode.

[beinan@localhost] # / usr/X11R6/bin/gtf 1024 768 85-x

# 1024x768 @ 85.00 Hz (GTF) hsync: 68.60 kHz; pclk: 94.39 MHz

Modeline "1024x768_85.00"

94.39 1024 1088 1200 1376 768 769 772 807-HSync + Vsync

Insert the Modeline line of the output above into the Monitor configuration section in the / etc/X11/xorg.conf configuration file. After joining, it's similar.

Section "Monitor"

Identifier "Monitor0"

VendorName "Monitor Vendor"

ModelName "LCD Panel 1280x1024"

HorizSync 31.5-67.0

VertRefresh 50.0-75.0

Option "dpms"

Modeline "1024x768_85.00"

94.39 1024 1088 1200 1376 768 769 772 807

-HSync + Vsync

EndSection

After the change, restart X. Re-enter desktop mode.

4. Xdpyinfo tool.

We adjust the properties of the monitor through the gtf tool, and we generally know whether it is feasible or not by observing. For example, the screen does not flash too much. The display area is in the middle of the display screen, etc. But we also have a test tool, xdpyinfo, to test our adjustments.

Xdpyinfo-display information utility for X (display information testing tool for X).

[beinan@localhost ~] $/ usr/X11R6/bin/xdpyinfo

Through this output, we can see a lot of information, the most important of which is the following paragraph.

Default screen number: 0

Number of screens: 1

Screen # 0:

Dimensions: 1024x768 pixels (302x232 millimeters)

Resolution: 86x84 dots per inch

Depths (7): 24, 1, 4, 8, 15, 16, 32

Root window id: 0x3f

Depth of root window: 24 planes

We can define multiple display screens in xorg.conf, such as 1024x768investors 800x600 and so on. The sequence of identifiers defined by the display starts at 0, and so on. In fact, defining one is enough. The default is general. If we adjust it ourselves, add a similar 1024x768 to the Modes line with a depth of 24 in screen. Then set the default color depth to 24.

Section "Screen"

Identifier "Screen0"

Device "Videocard0"

Monitor "Monitor0"

DefaultDepth 24

SubSection "Display"

Viewport 0 0

Depth 16

Modes "800x600"640x480"

EndSubSection

SubSection "Display"

Viewport 0 0

Depth 24

Modes "1280x1024"1152x864"1152x768"

"1024x768"800x600"640x480"

EndSubSection

EndSection

In fact, in the above paragraph, we can delete the paragraph with a depth of 16 or the paragraph below with a # sign in front of each line. Because we use 24.

SubSection "Display"

Viewport 0 0

Depth 16

Modes "800x600"640x480"

EndSubSection

This only works if we change the number from 24 in DefaultDepth 24 to 16:00.

This is the end of the content of "how to use gtf to adjust the resolution in the Linux system". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report