NVIDIA / NVIDIA/nvidia-settings

primary display checkbox toggle

Open
#19 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.