[Topic DIscussion] 为什么deepin系统的默认分辨率是1.25倍缩放
Tofloor
poster avatar
流浪的加菲
deepin
2023-09-20 01:44
Author

很早以前就听说Linux系统的显示(分辨率?)很有问题,但是目前用deepin似乎感觉还好,不过日常也确实遇到一丢丢的问题:

系统默认【屏幕缩放】是1.25倍,手动改成1.0之后,好像有的软件的显示确实会出现排版问题confused

image.png


问题1:为什么Linux系统的分辨率很难调?

问题2:为什么deepin系统的屏幕缩放默认要设置为1.25?

Reply Favorite View the author
All Replies
阿尼樱奈奈
Moderator
2023-09-20 01:47
#1

同分辨率,然而我的默认是1.0倍缩放

Reply View the author
神末shenmo
deepin
Spark-App
2023-09-20 02:06
#2

小2k显示器如果是笔记本就是1.25很适合,台式机就要1.0

Reply View the author
忘记、过去
deepin
2023-09-20 02:10
#3

我记得安装器里面有一些复杂的判断逻辑,似乎是检测到 1080p 并且是笔记本就默认开启了 1.25 倍缩放来着......

Reply View the author
流浪的加菲
deepin
2023-09-20 02:37
#4
神末shenmo

小2k显示器如果是笔记本就是1.25很适合,台式机就要1.0

我是笔记本和台式都设置的1.0,不过分辨率都是1080p的

Reply View the author
流浪的加菲
deepin
2023-09-20 02:41
#5
忘记、过去

我记得安装器里面有一些复杂的判断逻辑,似乎是检测到 1080p 并且是笔记本就默认开启了 1.25 倍缩放来着......

🙂 这是啥逻辑,为什么要设置1.25呢

Reply View the author
DebuggerX
deepin
2023-09-20 03:06
#6

不只是根据分辨率,而是结合分辨率和屏幕尺寸综合判断的:

https://github.com/linuxdeepin/startdde/blob/118d4e4af6557ea311d63364034e61dedb1431dd/display/manager.go#L981C1-L997C2

// calcRecommendedScaleFactor 计算推荐的缩放比
func calcRecommendedScaleFactor(widthPx, heightPx, widthMm, heightMm float64) float64 {
	if widthMm == 0 || heightMm == 0 {
		return 1
	}

	lenPx := math.Hypot(widthPx, heightPx)
	lenMm := math.Hypot(widthMm, heightMm)

	lenPxStd := math.Hypot(1920, 1080)
	lenMmStd := math.Hypot(477, 268)

	const a = 0.00158
	fix := (lenMm - lenMmStd) * (lenPx / lenPxStd) * a
	scaleFactor := (lenPx/lenMm)/(lenPxStd/lenMmStd) + fix

	return toListedScaleFactor(scaleFactor)
}
Reply View the author
WangZhongyun
deepin
2023-09-20 03:32
#7

我的Deepin23B2安装默认就是1.0倍缩放。

Reply View the author
hotime
deepin
2023-09-20 07:24
#8

我的分辨率2160x1440,12英寸,默认显示缩放是1.75,贼啦大,sob每次重装系统后都要调整到1.25才看着正好。

Reply View the author
流浪的加菲
deepin
2023-09-20 17:07
#9
hotime

我的分辨率2160x1440,12英寸,默认显示缩放是1.75,贼啦大,sob每次重装系统后都要调整到1.25才看着正好。

如果调整后,一些常用程序的界面没有出现显示异常,那其实也还可以

Reply View the author