Bug 485837 - x conf file being changed without confirmation
Summary: x conf file being changed without confirmation
Status: RESOLVED NOT A BUG
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 6.0.4
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-20 05:48 UTC by Ada
Modified: 2024-05-07 01:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ada 2024-04-20 05:48:43 UTC
SUMMARY
After updating the x conf file using nvidia settings to enable downscaling via the ViewPortIn and ViewPortOut settings, the kscreen daemon edits the x conf file during the login process to remove the edit. The edit remains commented out, and a new line without the downscaling has taken its place.

STEPS TO REPRODUCE
1. Open the proprietary nvidia-settings applet with elevated privileges, with two screens of different resolutions. In my instance, the two screens are 4K and QHD
2. On the QHD screen, change the ViewPortIn setting to 4K (3840x2160). Leave the viewport out setting at it's default value
3. Save the updates to the x conf file in the nvidia-settings applet.  In my case, this added the line 

```Option "metamodes" "DP-2: nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}, DP-0: nvidia-auto-select +3840+132 {viewportin=3840x2160, ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"```

4. Reboot the device. At the login screen, the x conf file has not been updated, and the downscaling is in place.

5. Login.  The x conf file is updated by the kscreen daemon and the downscaling is removed.  In my instance, it looks like this

```# Removed Option "metamodes" "DP-2: nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}, DP-0: nvidia-auto-select +3840+132 {viewportin=3840x2160, ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"

Option         "metamodes" "DP-2: nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}, DP-0: nvidia-auto-select +3840+132 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"```

OBSERVED RESULT

Valid x settings are removed on login, with no prompt or warning.


EXPECTED RESULT

Valid settings should be left intact, or a confirmation/warning should be present so that the user is able to determine why their x conf file is being updated.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.8.7-arch1-1 (64-bit)
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0
Comment 1 Zamundaaa 2024-05-06 17:12:54 UTC
KScreen doesn't edit any Xorg config files, it just issues xrandr commands. The config file changes you see are done by something else
Comment 2 Ada 2024-05-07 01:57:10 UTC
(In reply to Zamundaaa from comment #1)
> KScreen doesn't edit any Xorg config files, it just issues xrandr commands.
> The config file changes you see are done by something else

It doesn't occur when I disable the kscreen daemon though...