NVIDIA / NVIDIA/nvidia-settings
primary display checkbox toggle
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 345
- Forks
- 92
- PR merge metrics
- No merged PRs in 30d
Description
When I apply a configuration of a secondary screen, it automaticly becomes the primary screen. This while the checkbox is checked on the page of the first screen, and not on the page of the second screen.
Workaround without code modification: just uncheck the checkbox and check it again. Then apply the configuration.
Workaround with code modification:
--- ctkdisplayconfig.c 2017-12-19 08:58:34.765653703 +0100
+++ ctkdisplayconfig.c 2017-12-19 08:56:40.638983837 +0100
@@ -8331,7 +8331,7 @@
}
if (screen->no_scanout) continue;
- if (screen->primaryDisplay && ctk_object->primary_display_changed) {
+ if (screen->primaryDisplay) {
ret = NvCtrlSetStringAttribute(screen->ctrl_target,
NV_CTRL_STRING_NVIDIA_XINERAMA_INFO_ORDER,
screen->primaryDisplay->typeIdName);
I havn't researched the code enought to say it won't cause bugs, if anyone has a proper fix please share :-)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in ctkdisplayconfig.c around the shown NV_CTRL_STRING_NVIDIA_XINERAMA_INFO_ORDER update and inspect how primaryDisplay and primary_display_changed are set when applying a secondary-screen configuration. Reproduce the checkbox scenario, then verify that applying the configuration leaves the intended screen marked primary without requiring a toggle; no test file is mentioned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100