代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/startdde 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
diff -Nuar startdde-5.9.61/display/util.go startdde-5.9.61.new/display/util.go
--- startdde-5.9.61/display/util.go 2022-12-09 11:19:18.000000000 +0800
+++ startdde-5.9.61.new/display/util.go 2023-04-12 11:21:51.145365556 +0800
@@ -15,6 +15,7 @@
"sort"
"strconv"
"strings"
+ "os/exec"
"github.com/godbus/dbus"
hostname1 "github.com/linuxdeepin/go-dbus-factory/org.freedesktop.hostname1"
@@ -333,6 +334,32 @@
return chassis, nil
}
+func CheckKvm() string {
+ var maty string
+ out, err := exec.Command("systemd-detect-virt").Output()
+ if err != nil {
+ maty = ""
+ }else {
+ maty = string(out)
+ maty = strings.Replace(maty, "\n", "", -1)
+ }
+ return maty
+}
+
+func CheckArch() string {
+ var KArch string
+ out, err := exec.Command("arch").Output()
+
+ if err != nil {
+ KArch = ""
+ }else {
+ KArch = string(out)
+ KArch = strings.Replace(KArch,"\n","",-1)
+ }
+ return KArch
+}
+
+
func getGraphicsCardPciId() string {
var pciId string
subsystems := []string{"drm"}
@@ -362,6 +389,27 @@
}
}
}
+//qxl not support in arm/loongarch
+//just try drm/card0
+ if pciId == "" {
+ maty := CheckKvm()
+ KArch := CheckArch()
+ if maty == "kvm" {
+ if KArch == "aarch64" || KArch == "loongarch64" {
+ for _, dev := range devices {
+ name := dev.GetName()
+ if name == "card0" {
+ cardDevice := dev.GetParent()
+ parentDevice := cardDevice.GetParent()
+ pciId = parentDevice.GetProperty("PCI_ID")
+ cardDevice.Unref()
+ parentDevice.Unref()
+ break
+ }
+ }
+ }
+ }
+ }
return pciId
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。