fix(display):Fix nvidia display while no enabled monitor
-适配nvidia驱动在未接入显示连接器条件下的显示 Related #9609
This commit is contained in:
parent
6a23bdfc2b
commit
62b5003e0d
@ -0,0 +1,37 @@
|
||||
From 160d68558c462ae4a49b89428e2790132b693c01 Mon Sep 17 00:00:00 2001
|
||||
From: meizhigang <meizhigang@kylinsec.com.cn>
|
||||
Date: Mon, 31 Jul 2023 15:12:59 +0800
|
||||
Subject: [PATCH] fix(display):Fix nvidia display while no enabled monitor
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
-适配nvidia驱动在未接入显示连接器条件下的显示
|
||||
|
||||
Related #9609
|
||||
---
|
||||
plugins/display/display-manager.cpp | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/plugins/display/display-manager.cpp b/plugins/display/display-manager.cpp
|
||||
index f80e248..7450187 100644
|
||||
--- a/plugins/display/display-manager.cpp
|
||||
+++ b/plugins/display/display-manager.cpp
|
||||
@@ -550,6 +550,14 @@ bool DisplayManager::save_config(CCErrorCode &error_code)
|
||||
|
||||
bool DisplayManager::apply(CCErrorCode &error_code)
|
||||
{
|
||||
+ // 如果使用的是nvidia驱动,当没有接入任何显示器时,会将output的分辨率设置为8x8,导致底部面板不可见且后面无法恢复。
|
||||
+ if (this->get_enabled_monitors().size() == 0)
|
||||
+ {
|
||||
+ KLOG_WARNING("Cannot find enabled monitor.");
|
||||
+ error_code = CCErrorCode::ERROR_DISPLAY_NO_ENABLED_MONITOR;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
if (this->dynamic_scaling_window_)
|
||||
{
|
||||
// 应用缩放因子
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: kiran-cc-daemon
|
||||
Version: 2.5.1
|
||||
Release: 16
|
||||
Release: 17
|
||||
Summary: DBus daemon for Kiran Desktop
|
||||
|
||||
License: MulanPSL-2.0
|
||||
@ -20,6 +20,7 @@ Patch0011: 0001-fix-edid-Fix-the-problem-that-cannot-match-correct-m.patch
|
||||
Patch0012: 0001-fix-keyboard-Add-capslock-and-numlock-tips-switch.patch
|
||||
Patch0013: 0001-fix-power-Add-battery-charging-and-discharging-time.patch
|
||||
Patch0014: 0001-fix-keyboard-Fix-ci-build-error.patch
|
||||
Patch0015: 0001-fix-display-Fix-nvidia-display-while-no-enabled-moni.patch
|
||||
|
||||
BuildRequires: cmake >= 3.2
|
||||
BuildRequires: pkgconfig(glibmm-2.4)
|
||||
@ -189,6 +190,9 @@ glib-compile-schemas /usr/share/glib-2.0/schemas &> /dev/nulls || :
|
||||
%{_libdir}/pkgconfig/kiran-cc-daemon.pc
|
||||
|
||||
%changelog
|
||||
* Mon Jul 31 2023 meizhigang <meizhigang@kylinsec.com.cn> - 2.5.1-17
|
||||
- KYOS-F: Fix nvidia display while no enabled monitor (#9609)
|
||||
|
||||
* Fri Jul 21 2023 meizhigang <meizhigang@kylinsec.com.cn> - 2.5.1-16
|
||||
- KYOS-F: Add battery charging and discharging time (#9506)
|
||||
- KYOS-F: Fix ci build error
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user