This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
考虑如下命令输出,来自我的华硕天选
FA506
笔记本(AMD Ryzen 4900h带集显 + RTX2060):其中
Unknown AMD Radeon GPU @ pci:0000:06:00.0
是我的集显名称,5.7.0
版本内核带的开源驱动还没有识别这个显卡,所以名称长这样,带有好几个空格。如果用原来的分割方法,显卡名称就变成了
0000
,setprovideroutputsource
也就会失败。新方法可以正确获得GPU的完整名称
Unknown AMD Radeon GPU @ pci:0000:06:00.0
,设置可以成功。图1:
xrandr --listproviders
输出:图2:修改前只有独显外接的屏幕亮:
图3:旧版本的执行结果:
图4:修改后可以同时驱动内屏和外接屏幕了: