Wake up issues from S0ix and S3 (black screen after resume)

Hello,

I have a particular laptop (84dd524) with a DGPU (1650 GTX).

I switched from Gentoo few days ago, resuming from S3/S0ix was working fine before I switched to CachyOS.

Here’s what I can report:

I had the same issue on Gentoo when I wanted to get rid of the ‘X’ program being ran on my DGPU, I noticed it with nvidia-smi, nothing was running in the DE except this one program, even on Wayland, so I wanted to remove it because it prevented me to unload the NVIDIA driver at runtime.

By digging a bit more, I noticed there was a particular X rule that started it:
/usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf

But when I removed it, I had the same exact issue: resuming from S3/S0ix didn’t work anymore and I’m not sure exactly why (yet?).

From what I can think of, it is highly related to a config in the user space driver that allows that program to be ran and is probably managing the DGPU, especially during sleep or somehow keep it activated in order to make it not fallen off the PCI bus. (I say this because I also noticed my that my wifi card also disappear if I don’t turn off the laptop and unplug power supply after it resumes, behind the scenes it’s probably a firmware issue but since I didn’t get that issue on Gentoo, I’m not sure what CachyOS is doing different)

Unfortunately, when I tried to compare both of the files on my Gentoo installation and nothing much is different except these 3 rules that is present on CachyOS:

Option "AllowEmptyInitialConfiguration"
ModulePath "/usr/lib/nvidia/xorg"
ModulePath "/usr/lib/xorg/modules"

I’m not sure it is related to it, but if you have any other ideas or what can cause such bugs, please let me know.

Thanks.

Best regards,
xutaxkamay.

What is the exact process that’s running? Is it just xorg?

Exactly, it seems to be something like this on Gentoo:

As root:

/usr/bin/X -nolisten tcp -background none -seat seat0 vt2 -auth /run/sddm/xauth_XSnejH -noreset -displayfd 16

I noticed also two more things:

  1. nvidia-smi is not being launched at boot when sddm starts with these commands, while on Gentoo it is launched, is this program maybe the one responsible for starting the X command ? (user kamay, which is myself)
/usr/bin/nvidia-smi dmon -d 2 -s pucm
  1. On CachyOS, there is an “unknown” display that shouldn’t be present at all…

Weird.

Is SDDM running using the Wayland backend? If not, please try to do so.

Oh right.

Ran Gentoo with editing /etc/sddm.conf.d/override.conf

[General]
DisplayServer=wayland
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell
 
[Wayland]
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1

Resume works normally on Gentoo without issues, but the X program is also gone, so you were correct assuming SDDM was still running under xorg I didn’t even realize it, thank you a lot.

I also tried it on CachyOS but the same issue occurs with a black screen.

After some tests though, I realized that I can switch to a tty on S3 (sleep to ram) easily and restart SDDM as a workaround for now. (on S0ix I can’t resume at all, the system or some firmware seem to crash but I don’t really care of it for now since it doesn’t work either on Gentoo anymore for some reasons, this is probably a firmware issue not the fault of CachyOS that I need to figure out myself later since I use a coreboot laptop)

It may be related to that “unknown” screen ?

I tried to create a new user if it was just some misconfiguration but it gets always detected for some reasons. I think the blackscreen from SDDM comes from there, it probably tries to switch to that screen, but since there’s no output, it can not.

I tried to switch from keyboard the screen (with the fn key) just in case but nothing worked to make the screen appear.

I must also say that when resuming, the screen brightness is completely gone aswell, except when I switch to a tty and screen brightness comes back and turn black again switch again to SDDM. (ctrl + alt + f3)

I also noticed that when I switch to a tty, SDDM appears for some milliseconds and then the tty appears. (weird)

That’s unfortunate.

Yeah, if you can find the differences between your Gentoo setup and CachyOS setup, we might know a bit more in what’s the problem or how to solve this.

I’ll try some things today to try to get S3 working on CachyOS, I’ll let you know. I feel like this is probably a misconfiguration somewhere or some bad default config somewhere (especially the duplicated screen, this one is really weird).

Thanks for the help.