【20240702】银河麒麟2207系统novnc黑屏问题

0 前言

转载请附上原文出处链接

稀土掘金本文链接:https://juejin.cn/post/7399952279502110735

优快云本文链接:https://blog.youkuaiyun.com/qq_43252610/article/details/140973163

1 问题概述

1.1 基础环境

【系统】Kylin-Desktop-V10-GFB-Release-2207-Build11-ARM64.iso(5.4.18-65-generic)

【CPU】vCPU

【显卡】virtio-gpu

1.2 问题现象

该系统分辨率设置为1920x1080时,novnc在系统阶段黑屏

使用vnc初次连接虚拟机时,能看到明显的从小区域,全屏的缩放情况,用户首次连接时体验不好

(一般服务端与客户端分辨率不同时,才会有类似缩放情况,分辨率相同时不应该出现该情况)

vnc缩放-1-1920x1080

2 问题定位

2.1 其他系统对比验证

2.1.1 V10-server版本

使用V10-Server版系统无该问题,虚拟机使用1920x10801600x12001280x8001024x768等分辨率,novnc显示均正常

2.1.2 V10-desktop-2303版本

使用V10-desktop-2303版系统无该问题,虚拟机使用1920x10801600x12001280x8001024x768等分辨率,novnc显示均正常

2.3 显示相关日志分析

2.2.1 Xorg.0.log

查看该系统启动时的Xorg.0.log日志

[     6.914]
X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
[     6.914] Build Operating System: Linux 4.4.58-20180615.kylin.server.YUN+-generic aarch64 Ubuntu
[     6.914] Current Operating System: Linux kylin-kvmvirtualmachine 5.4.18-65-generic #54-KYLINOS SMP Tue Jul 12 11:12:01 UTC 2022 aarch64
[     6.914] Kernel command line: BOOT_IMAGE=/vmlinuz-5.4.18-65-generic root=UUID=f9935f0e-eebe-4e12-a49b-7e7d916c5d3b ro quiet splash resume=UUID=ef9ee3d4-4271-4bc7-849c-537b83df608b audit=0 security=none
[     6.914] Build Date: 13 January 2022  11:28:46PM
[     6.914] xorg-server 2:1.20.8-2kylin2.4k21.17 (For technical support please see http://www.ubuntu.com/support)
[     6.914] Current version of pixman: 0.38.4
[     6.914]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[     6.914] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[     6.914] (==) Log file: "/var/log/Xorg.0.log", Time: Mon Jul  1 08:01:44 2024
[     6.942] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[     7.055] (==) No Layout section.  Using the first Screen section.
[     7.055] (==) No screen section available. Using defaults.
[     7.055] (**) |-->Screen "Default Screen Section" (0)
[     7.055] (**) |   |-->Monitor "<default monitor>"
[     7.056] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[     7.056] (**) Option "BlankTime" "0"
[     7.056] (**) Option "StandbyTime" "0"
[     7.056] (**) Option "SuspendTime" "0"
[     7.056] (**) Option "OffTime" "0"
[     7.056] (==) Automatically adding devices
[     7.056] (==) Automatically enabling devices
[     7.056] (==) Automatically adding GPU devices
[     7.056] (==) Automatically binding GPU devices
[     7.056] (==) Max clients allowed: 256, resource mask: 0x1fffff
[     7.106] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[     7.106]    Entry deleted from font path.
[     7.106] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[     7.106]    Entry deleted from font path.
[     7.106] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[     7.106]    Entry deleted from font path.
[     7.106] (WW) The directory "/usr/share/fonts/X11/Type1" does not exist.
[     7.106]    Entry deleted from font path.
[     7.106] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[     7.106]    Entry deleted from font path.
[     7.106] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[     7.106]    Entry deleted from font path.
[     7.106] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        built-ins
[     7.106] (==) ModulePath set to "/usr/lib/xorg/modules"
[     7.106] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[     7.106] (II) Loader magic: 0x557c53c010
[     7.106] (II) Module ABI versions:
[     7.106]    X.Org ANSI C Emulation: 0.4
[     7.106]    X.Org Video Driver: 24.1
[     7.106]    X.Org XInput driver : 24.1
[     7.106]    X.Org Server Extension : 10.0
[     7.108] (++) using VT number 7

[     7.108] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[     7.108] (II) xfree86: Adding drm device (/dev/dri/card0)
[     7.108] (II) Platform probe for /sys/devices/pci0000:00/0000:00:02.0/virtio0/drm/card0
[     7.112] (--) PCI: (0@0:2:0) 1af4:1050:1af4:1100 rev 1, Mem @ 0x10440000/4096, 0x8000400000/16384
[     7.112] (II) no primary bus or device found
[     7.112]    falling back to /sys/devices/pci0000:00/0000:00:02.0/virtio0/drm/card0
[     7.112] (II) LoadModule: "glx"
[     7.168] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[     7.260] (II) Module glx: vendor="X.Org Foundation"
[     7.260]    compiled for 1.20.8, module version = 1.0.0
[     7.260]    ABI class: X.Org Server Extension, version 10.0
[     7.260] (==) Matched modesetting as autoconfigured driver 0
[     7.260] (==) Matched fbdev as autoconfigured driver 1
[     7.260] (==) Assigned the driver to the xf86ConfigLayout
[     7.260] (II) LoadModule: "modesetting"
[     7.260] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[     7.284] (II) Module modesetting: vendor="X.Org Foundation"
[     7.284]    compiled for 1.20.8, module version = 1.20.8
[     7.284]    Module class: X.Org Video Driver
[     7.284]    ABI class: X.Org Video Driver, version 24.1
[     7.284] (II) LoadModule: "fbdev"
[     7.284] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[     7.324] (II) Module fbdev: vendor="X.Org Foundation"
[     7.324]    compiled for 1.20.8, module version = 0.5.0
[     7.324]    Module class: X.Org Video Driver
[     7.324]    ABI class: X.Org Video Driver, version 24.1
[     7.324] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[     7.324] (II) FBDEV: driver for framebuffer: fbdev
[     7.332] (II) modeset(0): using drv /dev/dri/card0
[     7.332] (WW) Falling back to old probe method for fbdev
[     7.332] (II) Loading sub module "fbdevhw"
[     7.332] (II) LoadModule: "fbdevhw"
[     7.332] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[     7.425] (II) Module fbdevhw: vendor="X.Org Foundation"
[     7.425]    compiled for 1.20.8, module version = 0.0.2
[     7.426]    ABI class: X.Org Video Driver, version 24.1
[     7.429] (II) modeset(0): Creating default Display subsection in Screen section
        "Default Screen Section" for depth/fbbpp 24/32
[     7.429] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[     7.429] (==) modeset(0): RGB weight 888
[     7.429] (==) modeset(0): Default visual is TrueColor
[     7.431] (II) Loading sub module "glamoregl"
[     7.431] (II) LoadModule: "glamoregl"
[     7.431] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[     7.487] (II) Module glamoregl: vendor="X.Org Foundation"
[     7.487]    compiled for 1.20.8, module version = 1.0.1
[     7.487]    ABI class: X.Org ANSI C Emulation, version 0.4
[    11.021] (II) modeset(0): Refusing to try glamor on llvmpipe
[    11.024] (EE) modeset(0): glamor initialization failed
[    11.024] (II) modeset(0): ShadowFB: preferred NO, enabled NO
[    11.024] (II) modeset(0): Output Virtual-1 has no monitor section
[    11.025] (II) modeset(0): EDID for output Virtual-1
[    11.025] (II) modeset(0): Manufacturer: RHT  Model: 1234  Serial#: 0
[    11.025] (II) modeset(0): Year: 2014  Week: 42
[    11.025] (II) modeset(0): EDID Version: 1.4
[    11.025] (II) modeset(0): Digital Display Input
[    11.025] (II) modeset(0): 8 bits per channel
[    11.025] (II) modeset(0): Digital interface is DisplayPort
[    11.025] (II) modeset(0): Max Image Size [cm]: horiz.: 32  vert.: 20
[    11.025] (II) modeset(0): Gamma: 2.20
[    11.025] (II) modeset(0): No DPMS capabilities specified
[    11.025] (II) modeset(0): Supported color encodings: RGB 4:4:4
[    11.025] (II) modeset(0): Default color space is primary color space
[    11.025] (II) modeset(0): First detailed timing is preferred mode
[    11.025] (II) modeset(0): Preferred mode is native pixel format and refresh rate
[    11.025] (II) modeset(0): redX: 0.640 redY: 0.330   greenX: 0.300 greenY: 0.600
[    11.025] (II) modeset(0): blueX: 0.150 blueY: 0.060   whiteX: 0.312 whiteY: 0.329
[    11.025] (II) modeset(0): Supported established timings:
[    11.025] (II) modeset(0): 640x480@60Hz
[    11.025] (II) modeset(0): 800x600@60Hz
[    11.025] (II) modeset(0): 1024x768@60Hz
[    11.025] (II) modeset(0): Manufacturer's mask: 0
[    11.025] (II) modeset(0): Supported standard timings:
[    11.025] (II) modeset(0): #0: hsize: 2048  vsize 1152  refresh: 60  vid: 49377
[    11.025] (II) modeset(0): #1: hsize: 1920  vsize 1080  refresh: 60  vid: 49361
[    11.025] (II) modeset(0): #2: hsize: 1920  vsize 1200  refresh: 60  vid: 209
[    11.025] (II) modeset(0): #3: hsize: 1600  vsize 1200  refresh: 60  vid: 16553
[    11.025] (II) modeset(0): #4: hsize: 1680  vsize 1050  refresh: 60  vid: 179
[    11.025] (II) modeset(0): #5: hsize: 1440  vsize 900  refresh: 60  vid: 149
[    11.025] (II) modeset(0): #6: hsize: 1280  vsize 1024  refresh: 60  vid: 32897
[    11.025] (II) modeset(0): #7: hsize: 1280  vsize 960  refresh: 60  vid: 16513
[    11.025] (II) modeset(0): Supported detailed timing:
[    11.025] (II) modeset(0): clock: 107.3 MHz   Image Size:  325 x 203 mm
[    11.025] (II) modeset(0): h_active: 1280  h_sync: 1600  h_sync_end 1638 h_blank_end 1728 h_border: 0
[    11.025] (II) 
### 关于银河麒麟V10 SP1桌面操作系统中配置EDID的方法 在银河麒麟V10 SP1桌面操作系统中,配置EDID(Extended Display Identification Data)通常涉及调整显示器的功能参数,例如分辨率、刷新率和支持的颜色空间等。以下是详细的说明: #### 一、EDID的基础概念及其作用 EDID是一种数据结构,存储了显示器的能力描述信息,包括支持的视频模式、屏幕尺寸和其他特性。对于银河麒麟V10 SP1系统而言,EDID主要用于确保图形驱动程序能够正确识别并适配硬件设备。 如果遇到诸如`novnc`黑屏问题,则可能是由于EDID未被正确解析或传递给虚拟机环境所致[^1]。因此,在某些情况下需要手动干预来修正这些问题。 #### 二、具体实现步骤概述 虽然不建议直接修改原始固件中的EDID数据,但在特定场景下可以通过软件手段重新定义这些参数。下面介绍几种可能的方式: ##### 1. **利用Xorg配置文件** 创建自定义Xorg配置可以覆盖默认行为从而影响最终呈现效果。编辑位于 `/etc/X11/xorg.conf.d/` 下的一个新文件或者现有文件,添加如下内容作为例子: ```bash Section "Monitor" Identifier "Configured Monitor" Option "PreferredMode" "1920x1080_60.00" EndSection Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" Device "Configured Video Card" EndSection ``` 上述代码片段设置了首选分辨率为 `1920x1080@60Hz` 。这一步骤有助于强制指定显示规格而不依赖自动检测机制[^2]。 ##### 2. **通过Kernel模块加载时注入定制化EDID** 当常规方法无法满足需求时,还可以尝试借助内核层面的技术手段解决问题。比如编写一个小工具读取预设好的二进制EDID资料并通过命令行传送给正在初始化过程里的GPU子系统。 示例脚本如下所示: ```bash #!/bin/bash modprobe i2c-dev dd if=/path/to/custom-edid.bin of=/dev/i2c-<bus_number> bs=1 count=128 seek=<address> sync sleep 1 rmmod i2c_dev ``` 注意替换实际路径名与总线编号前缀部分以匹配目标平台具体情况[^3]。 另外值得注意的是,任何改动都应谨慎行事以免造成不可逆损害;同时也要记得备份重要文档以防万一发生意外状况。 #### 三、其他注意事项 除了以上提到的内容之外,还有几个方面值得特别留意: - 如果仅仅是为了简单验证当前状态是否准确无误的话,可以直接查阅日志消息寻找线索。“dmesg | grep -i edid”这样的指令可以帮助快速定位关联条目; - 对于那些频繁遭遇启动失败情形下的恢复措施也有必要了解清楚——即如何安全退出紧急维护界面恢复正常运作流程[^4]。 --- 问题
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值