feat: GPU切换回退保护逻辑
- switchGpu切换前写入备份文件(.gpu-switch-backup)记录之前模式 - init()检测未确认的切换,启动30秒自动回退计时器 - QML弹出'显示是否正常'确认覆盖层,支持手动确认/回退/超时自动回退 - confirmSwitchSuccess()用户确认正常后删除备份 - restoreFromBackup()自动恢复之前模式并发送通知 - primeOffloadEnabled属性检测当前PRIME offload状态 - switchGpu改用environment.d方式,不需要root/pkexec - 翻译更新:回退确认相关8条新增
This commit is contained in:
@@ -193,5 +193,45 @@
|
||||
<source>Integrated</source>
|
||||
<translation>核显</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../package/driverview.qml"/>
|
||||
<source>Display OK?</source>
|
||||
<translation>显示是否正常?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../package/driverview.qml"/>
|
||||
<source>GPU mode was changed. If display is abnormal, it will auto-revert in %1s.</source>
|
||||
<translation>GPU 模式已切换。如果显示异常,将在 %1 秒后自动回退。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../package/driverview.qml"/>
|
||||
<source>Revert</source>
|
||||
<translation>回退</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../package/driverview.qml"/>
|
||||
<source>Display OK</source>
|
||||
<translation>显示正常</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../package/driverview.qml"/>
|
||||
<source>GPU Mode Switched</source>
|
||||
<translation>GPU 模式已切换</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../package/driverview.qml"/>
|
||||
<source>Switched to %1 mode. Please re-login to take effect.</source>
|
||||
<translation>已切换到 %1 模式,请重新登录生效。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../package/driverview.qml"/>
|
||||
<source>GPU Mode Restored</source>
|
||||
<translation>GPU 模式已恢复</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../package/driverview.qml"/>
|
||||
<source>Reverted to %1 mode. Please re-login to take effect.</source>
|
||||
<translation>已恢复到 %1 模式,请重新登录生效。</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
||||
@@ -193,5 +193,45 @@
|
||||
<source>Integrated</source>
|
||||
<translation>核顯</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../package/driverview.qml"/>
|
||||
<source>Display OK?</source>
|
||||
<translation>顯示是否正常?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../package/driverview.qml"/>
|
||||
<source>GPU mode was changed. If display is abnormal, it will auto-revert in %1s.</source>
|
||||
<translation>GPU 模式已切換。如果顯示異常,將在 %1 秒後自動回退。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../package/driverview.qml"/>
|
||||
<source>Revert</source>
|
||||
<translation>回退</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../package/driverview.qml"/>
|
||||
<source>Display OK</source>
|
||||
<translation>顯示正常</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../package/driverview.qml"/>
|
||||
<source>GPU Mode Switched</source>
|
||||
<translation>GPU 模式已切換</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../package/driverview.qml"/>
|
||||
<source>Switched to %1 mode. Please re-login to take effect.</source>
|
||||
<translation>已切換到 %1 模式,請重新登入生效。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../package/driverview.qml"/>
|
||||
<source>GPU Mode Restored</source>
|
||||
<translation>GPU 模式已恢復</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../package/driverview.qml"/>
|
||||
<source>Reverted to %1 mode. Please re-login to take effect.</source>
|
||||
<translation>已恢復到 %1 模式,請重新登入生效。</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
||||
Reference in New Issue
Block a user