Mea*_*ynn 5 linux tty virtual-console
前段时间在运行 Ubuntu 的旧计算机上,我注意到虚拟控制台(例如tty1
)上的输出很慢。这在那里不是问题,甚至几乎没有引起注意。
但是现在在我的新笔记本电脑上使用 Manjaro Linux(源自 Arch)有时速度慢得离谱。我认为这与这里描述和解释的情况不同,因此我的问题不是重复的。我怀疑图形加速问题。
我发现该问题受到处理器时钟速度的严重影响。该视频显示了它在 800 MHz 下的样子。
可能来自dmesg
以下方面的相关信息:
[ 0.474770] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[ 0.478826] vesafb: mode is 1920x1080x32, linelength=7680, pages=0
[ 0.478827] vesafb: scrolling: redraw
[ 0.478828] vesafb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[ 0.478843] vesafb: framebuffer at 0xa0000000, mapped to 0xffffc90001000000, using 8128k, total 8128k
[ 0.661095] Console: switching to colour frame buffer device 240x67
[ 0.842325] fb0: VESA VGA frame buffer device
[ 2.301199] fb: switching to inteldrmfb from VESA VGA
[ 2.363655] fbcon: inteldrmfb (fb0) is primary device
[ 2.363698] Console: switching to colour frame buffer device 240x67
[ 2.363705] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
Run Code Online (Sandbox Code Playgroud)
这scrolling: redraw
部分看起来很有趣,虽然我不确定它是否意味着什么,因为它说switching to inteldrmfb from VESA VGA
.
的输出fbset -i
:
mode "1920x1080"
geometry 1920 1080 1920 1080 32
timings 0 0 0 0 0 0 0
accel true
rgba 8/16,8/8,8/0,0/0
endmode
Frame buffer device information:
Name : inteldrmfb
Address : 0xa0000000
Size : 8294400
Type : PACKED PIXELS
Visual : TRUECOLOR
XPanStep : 1
YPanStep : 1
YWrapStep : 0
LineLength : 7680
Accelerator : No
Run Code Online (Sandbox Code Playgroud)
一些额外的测试来记录差异:
time python -c "for i in range(100): print(\"hi\")"
显示我0.03s
在xfce4-terminal
和0.23s
一个虚拟控制台上。
time echo -e "\033c"
0s
在xfce4-terminal
和0.14s
-0.16s
在虚拟控制台上。
time man gpm
(并Q在打开时按下)
立即在xfce4-terminal
, 3s
-4s
在虚拟控制台上。
这在滚动man
页面时尤其令人沮丧。有趣的nano
是,似乎不受此影响。
如何让我的虚拟控制台以不错的速度渲染文本?
顺便说一句,tty表示任何“电传打字机”设备(串行线、伪终端……)。你说的是Linux虚拟控制台。滚动速度慢得离谱,因为最新版本的 Linux 在帧缓冲区中使用图形模式而不是文本模式,但有时不是图形加速。
因此,请检查您的帧缓冲区设置,看看是否无法通过使用正确的驱动程序等来使其使用加速。
编辑:正如在视频中看到的那样,问题肯定是通过重绘所有内容而无法加速滚动,随着内容移动,人们可以看到“波浪”。
我也很困惑为什么你首先似乎在使用vesafb
(这会减慢非加速滚动),然后 2 秒后inteldrmfb
(这应该会加速滚动)。问题可能与开关有关。请在启动后提供完整的dmesg
输出,将其放入粘贴箱等中,并使用链接编辑问题。
归档时间: |
|
查看次数: |
2556 次 |
最近记录: |