Primary screen not working after wake from sleep (only KDE 5.26)

Enabling early KMS was a thing i mentioned this days quite a lot, but also in the past. Please try and let us know

@brahma thank you again for your suggestions.

Just tried to change the sleep mode, as you suggested, but the outcome when waking up from sleep is the same as before. So we’re unlucky again.

really? the s2idle is:

This state is a generic, pure software, light-weight, system sleep state.
It allows more energy to be saved relative to runtime idle by freezing user
space and putting all I/O devices into low-power states (possibly
lower-power than available at run time), such that the processors can
spend more time in their idle states.

so you should have none issues with this… maybe there is some bios setting messing things up… can you check in bios, options related to pcie/sleep/power management…
provide output also from:
head /etc/default/grub
just to be sure the parameter is correct

@bogdancovaciu thanks for your input.

Just added these kmodules to early kms. Did the whole procedure, updated ramdisk and bootloader and rebooted. Duh, still no luck. After waking up the system shows the same messed up symptoms.

My naive Cure so far:

  • delete ~/.local/share/kscreen
  • reboot
  • go to system-settings → Display and rearrange the screens

I’m pretty confident that we can exclude the BIOS, as sleep works perfectly with other OS (Manjaro + Wintendo). Even if I go back to older backups (before the KDE 5.25-5.26 updates), sleep+wake, CUDA, Steam, Blender, etc. work all flawlessly. This machine has never had any problem for the last two years using the exactly same BIOS settings. Just to mention and to save you some brain cycles.

so i have no idea, you can try with an older kernel - kernel 5.10, and see if it helps… but since it started to happen after the 5.25 plasma, it will probably not help, but its worth a try…

also manjaro released a lts plasma version before the 5.25 version, you can use it in the meantime:

1 Like

Yes, I’ll just do a downgrade to 5.24.7 LTS, like @omano suggested, and then update from time to time to see if things have been fixed. We’ve already spent too much time trying stuff. To me it seems obvious that it’s somehow related to this Plasma/Nvidia/SomethingElse combination. But yes, I’m not an expert by any means.

Thank you again for your kind support.

Hold on … you did the early kms, but the only issue is with the 5.26 but works on 5.24.7 while using the latest Nvidia drivers on both?
Then my next guess is that you are hold back by this bugger thing:

So is not the

That only works temporary, or did i got that wrong?
Please check that linked topic and let me know.

Just had a look at my ~/.config/kwinrc file and it’s very minimal:

[Desktops]
Id_1=49998625-3f84-46c7-aced-f5a7f9454822
Id_2=b6252d0d-1f64-485c-99ff-ee39117cd798
Rows=2

Just to be sure, I renamed it and rebooted while being logged out. After reboot and trying sleep+wake, the problem is the very same. Only a pointer on the second screen and no way to log in. The only thing that then helps is deleting the ~/.local/share/kscreen folder and rebooting. As soon as I retry sleep, the kscreen folder contains new config files that are bogus (single screen).

Btw: I tried that early on my trip to create a new user and see if it’s related to my profile. Same problem there.

It may not be limited to Nvidia.
My GPU is an AMD Radeon.
After the same update my primary displays got swapped.
Now if I want my primary monitor to be my Acer I have to select the LG monitor to be primary and vice versa.
It’s not important enough to downgrade, but a bit frustrating. On a zoom call I had to also select the opposite desktop to share.

My last try, Do you have any custom code inside /etc/X11/mhwd.d/nvidia.conf that you manually added? For long time i use


    Option  "ConnectToAcpid"    "Off"

In the Section "Device" and i found out that best stability was to create a fixed layout.

Another thing: by any chance you are using Restore last session in Desktop Session settings?

That file (/etc/X11/mhwd.d/nvidia.conf) is completely empty.

Please run:
sudo mhwd -f -i pci video-nvidia
and check if the file is generated and then it is present run:
sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf
If is not there, please let me know, so we can try something else.

sudo mhwd -f -i pci video-nvidia                                                ✔  system  
> Removing video-nvidia...
Sourcing /etc/mhwd-x86_64.conf
Has lib32 support: true
Sourcing /var/lib/mhwd/local/pci/video-nvidia/MHWDCONFIG
Processing classid: 0300
Sourcing /var/lib/mhwd/scripts/include/0300
Processing classid: 0302
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing nvidia-utils breaks dependency 'nvidia-utils' required by cuda
Error: pacman failed!
Error: script failed!

He’s unable to remove Nvidia as CUDA depends on it.

By erroring out no new file is created.

There are two ways to deal with this
Remove CUDA first then force install the driver.
Or use this generic config, BUT, you will have to boot into desktop somehow and via Nvidia X Settings to get the proper information about your primary Screen and replace the one from here in Section "Monitor" with yours where is the replace

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "replace"
    ModelName      "replace"
    HorizSync       replace
    VertRefresh     replace
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option         "TripleBuffer"  "On"
    Option  "ConnectToAcpid"    "Off"
    Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
    Option         "COMPOSITE" "Enable"
EndSection

 
Section "InputClass"
    Identifier          "Keyboard Defaults"
    MatchIsKeyboard        "yes"
    Option              "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

i hope this makes sense.
The Option "TripleBuffer" "On" can be dropped, or you can use it as described here

Well I feel like I am fitting right in with this thread.
I have encountered the same issue OP has today.
I use a 1440p 144Hz display over DP and a 1080p 60Hz display over DVI with a 1070 and NVIDIA proprietary drivers.
Since the latest update every time my monitors are going into energy savings mode my 1440p primary monitor is no longer waking up and I am left with my 1080p display taking on the configuration of my primary display (meaning the task bar and background from the primary display). My 1440p monitor is recognized and depending if plasma feels lucky today, I am actually able to finagle my way through the GUI settings menu to reset the configuration (it seems to be a 50/50 chance if that works or not). In any case using xrandr I am able to restore the configuration again. A reboot curiously does not fix the issue, I am forced to manually set up the screens again.
Currently using 5.19.17-1 kernel and KDE 5.26.2-1. Never had any issues previously.
So far I was not able to reproduce the issue when sending my PC to sleep so for me it just seems to be a monitor energy savings issue in KDE.
My current fix for this is just to turn off monitor energy savings mode until this is fixed.

If any of the mods/devs need any diagnostics or want me to test something particular to help fix the issue let me know.

2 Likes

It’s unlikely that KDE devs are reading this forum. I suggest creating a bug report following the instructions given here:

https://community.kde.org/Get_Involved/Issue_Reporting

You could also look into the log files to see if you find any error oder warning messages.

Indeed, but I don’t report bugs that need proper repro and proper traces. Manjaro does not provide KDE with debug symbols, KDE devs don’t want useless bug reports, I do the maths for such bug, you get the result.

Traces are only needed in case of crashes. If you have an erroneous behaviour, that you can reliably reproduce, it does make sense to create a bug report. KDE devs usually will look into those and might give additional instructions for you on how to provide more information, if they cannot reproduce it themselves.

Created one. Let’s see how quickly Nate Graham will find a duplicate :smile:

2 Likes