76 lines
2.7 KiB
Markdown
76 lines
2.7 KiB
Markdown
---
|
||
{
|
||
title: "Xorg 红蓝两色通道异常 默认分辨率和色深设置",
|
||
description: "Xorg显示颜色异常(如红色显蓝),因色深设置错误,将8bit改为16bit后修复。需在配置中指定amdgpu驱动并设DefaultDepth为16,原modesetting驱动不支持16bit下1920x1080分辨率。调整配置后问题解决。",
|
||
draft: false,
|
||
type: "article",
|
||
created_at: "2024-07-15T02:35:00+08:00",
|
||
published_at: "2024-07-15T02:45:00+08:00",
|
||
updated_at: [ "2024-07-15T02:45:00+08:00"],
|
||
category: '个人',
|
||
tags: [ "Linux" ],
|
||
tech_stack: [ "Linux" ],
|
||
tech_stack_percent: [ 1 ],
|
||
tech_stack_icon_names: [ "simple-icons:linux" ],
|
||
tech_stack_theme_colors: [ "#263238" ],
|
||
}
|
||
---
|
||
!!!warning Legacy Article 过时的文章
|
||
此文章从旧博客迁移而来,编写时技术水平有限,仅供参考
|
||
!!!
|
||
|
||
现象:红色显示蓝色,蓝色显示黄色
|
||
原因:Xorg色深设置错误,从8bit提升至16bit后显示正确
|
||
相关conf:
|
||
```
|
||
Section "Device"
|
||
Identifier "AMD"
|
||
Driver "amdgpu"
|
||
EndSection
|
||
|
||
Section "Screen"
|
||
Identifier "Default Screen"
|
||
Device "amdgpu"
|
||
Monitor "Default Monitor"
|
||
DefaultDepth 16
|
||
|
||
SubSection "Display"
|
||
Depth 16
|
||
Modes "1920x1080"
|
||
EndSubSection
|
||
EndSection
|
||
|
||
### Valid values for rotation are "normal", "left", "right"
|
||
Section "Monitor"
|
||
Identifier "Default Monitor"
|
||
# Option "Rotate" "normal"
|
||
# 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
|
||
Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
|
||
EndSection
|
||
```
|
||
正点原子RK3568的默认配置中,Device使用的驱动是modesetting,该驱动在16bit色深下不能提升分辨率至1920x1080
|
||
你可以通过执行 `sudo X :1 -configure` (:1 可以是其它非0数字,不要是已激活的屏幕就行)
|
||
```
|
||
X.Org X Server 1.21.1.7
|
||
X Protocol Version 11, Revision 0
|
||
Current Operating System: Linux atompi-ca1 5.10.160 #1 SMP Tue Jan 30 11:01:02 CST 2024 aarch64
|
||
Kernel command line: earlycon=uart8250,mmio32,0xfe660000 root=/dev/mmcblk0p3 earlyprintk console=ttyFIQ0 rootwait rw
|
||
xorg-server 2:21.1.7-3+deb12u7 (https://www.debian.org/support)
|
||
Current version of pixman: 0.42.2
|
||
Before reporting problems, check http://wiki.x.org
|
||
to make sure that you have the latest version.
|
||
Markers: (--) probed, (**) from config file, (==) default setting,
|
||
(++) from command line, (!!) notice, (II) informational,
|
||
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
|
||
(==) Log file: "/var/log/Xorg.1.log", Time: Sun Jul 14 18:42:15 2024
|
||
List of video drivers:
|
||
amdgpu
|
||
ati
|
||
nouveau
|
||
radeon
|
||
modesetting
|
||
fbdev
|
||
vesa
|
||
No devices to configure. Configuration failed.
|
||
(EE) Server terminated with error (2). Closing log file.
|
||
``` |