I have a single laptop screen with 100% scaling. Sometimes the scaling automatically changes to 125%. I can reset it in systemsettings, but it will change again at a later point. There seem to be at least two situations where this happens: - When waking the laptop up from sleep. This happens only sometimes - When using the recordme example from kpipewire and clicking "Add Virtual Monitor". This happens every time kwin f4d88e79f7c48a527ec958ee2a65c2cee60adbfe Qt 6.5.1
Is 125% the auto-calculated value for your screen's physical size and resolution? If so it sounds like the generator is inappropriately re-running when it should instead be reading the existing settings. Possibly related to KWin eating KScreen in Plasma 6.
I just experienced this after waking my laptop from sleep in a Plasma 6 Wayland session. I assume you were on Wayland too? I've never seen this in the Plasma 6 X11 session, which I had been using regularly until today.
> Is 125% the auto-calculated value for your screen's physical size and resolution? If so it sounds like the generator is inappropriately re-running when it should instead be reading the existing settings. It is not, or it shouldn't be anyway. This is a 14" 1080p screen, 100% is the appropriate scaling
In fact it is; see https://invent.kde.org/plasma/kscreen/-/blame/master/tests/kded/configs/AutogeneratedLaptopScreenScales.json#L32-L53
This is happening to me 100% reproducibly after waking from sleep. I have a hunch that a number of "changed settings not remembered" bugs may be related. We have quite a few now. See: - Bug 470345 - Bug 470574 - Bug 470604 Maybe there's a KConfig regression somewhere?
KScreen doesn't use KConfig, most likely the config generator in KWin runs when it shouldn't. Can you put a debug print into https://invent.kde.org/plasma/kwin/-/blob/80b7ed62da1b1c3dd9ff1f531b9d9637cb1b7522/src/outputconfigurationstore.cpp#L33 and see if that's the case?
> In fact it is; see https://invent.kde.org/plasma/kscreen/-/blame/master/tests/kded/configs/AutogeneratedLaptopScreenScales.json#L32-L53 well that's not great, 125% is too large for this screen
Screen scaling can be a matter of preference, which is why it's configurable; that's simply the default auto-calculated value that we reason ought to be sane for an average person. If you think the default scale calculation is sub-optimal for an average person, feel free to look through the code in generator.cpp that explains why we do it this way, and propose a change that remains faithful to human-biology-based reasoning in principle, and also adjust the autotests.
I could reproduce this reliably, however after an update to fix an ABI issue in kscreen and a good clean reboot it no longer appears to be the case. Nico can you confirm if it's still an issue?
Still happening with the virtual monitor thing in recordme
While it's not great, that one is expected. When there's no existing config for a given combination of outputs, KScreen generates a completely new config from scratch. The current logic in KWin does the same too.
It just happened again on wakeup
This is 100% reproducible for me when closing my laptop lid. OutputConfigurationStore::generateConfig() actually gets called before the system goes to sleep, according to journal logs: Jun 20 23:14:19 Liberator systemd-logind[911]: Lid closed. Jun 20 23:14:19 Liberator kwin_wayland[1513]: OutputConfigurationStore::generateConfig was called with outputs: QList(KWin::DrmOutput(0x16a31e0, name="eDP-1", geometry=QRect(0,0 1920x1080), scale=2)) and is lid closed? true Jun 20 23:14:19 Liberator systemd-logind[911]: The system will suspend now! Jun 20 23:14:19 Liberator ModemManager[1034]: <info> [sleep-monitor-systemd] system is about to suspend Jun 20 23:14:19 Liberator NetworkManager[858]: <info> [1687295659.7941] manager: sleep: sleep requested (sleeping: no enabled: yes) Jun 20 23:14:19 Liberator NetworkManager[858]: <info> [1687295659.7948] device (p2p-dev-wlp0s20f3): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed') Jun 20 23:14:19 Liberator NetworkManager[858]: <info> [1687295659.7952] manager: NetworkManager state is now ASLEEP
For me, this has been fixed by the fix for Bug 471282. Can you confirm that, Nico?
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!