Screen goes black and everything freezes

It was caused especially, when playing via Firefox in Total Battle/Forge of Empires. Previously, when using electron (lutris) to play this games, only screen of electron window sometimes goes black and game do not response, but I could still interact with WM (moving window, etc.).

Currently (with FF), the only solution is to kill session (kwin_wayland) by pressing ctrl+alt+backspace twice in short period. Problem start occurring (maybe) month or month and half ago. I go to holidays, takes only Steam Deck and leave laptop. When I went back and update system, problem still occur.

Form Plasma’s information center:

Operating System: openSUSE Tumbleweed 20230929
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Kernel Version: 6.5.4-1-default (64-bit)
Graphics Platform: Wayland
Processors: 8 Ă— AMD Ryzen 7 4700U with Radeon Graphics
Memory: 15.0 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: ZenBook UX562IQ_UM562IQ
System Version: 1.0

lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 003 Device 002: ID 13d3:56cb IMC Networks USB2.0 HD IR UVC WebCam
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 8087:0029 Intel Corp. AX200 Bluetooth
Bus 001 Device 006: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 005: ID 4e53:5407 USB OPTICAL MOUSE
Bus 001 Device 003: ID 214b:7250 Huasheng Electronics USB2.0 HUB
Bus 001 Device 002: ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne IOMMU
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
00:02.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 51)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 7
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce MX350] (rev

Can you post the output of

journalctl -b -0

After do reset and start system?

       -b [[ID][±offset]|all], --boot[=[ID][±offset]|all]
           Show messages from a specific boot. This will add a match for "_BOOT_ID=".

So, when system freeze, I do reset it and do the command. Thanks.

Can you switch to a different TTY (CTL+ALT+F3) when it freezes? If so you should be able to run the journalctl I mentioned above.

If not then you should run this after rebooting:

journalctl -b -1

When problem occur, I switched to console and above message appears. I do not known many about GPU drivers, but word parser bring me thought about Shaders. There’s also word AMDGPU, which seems to be AMD GPU driver. My laptop also have NVidia dGPU (amd is integrated in APU).

Logs:
https://rcgstore.pl/log-broken-rendering.txt

Log was too long to paste it here. Thanks!

Have you tried to recreate the problem with a kernel version prior to 6.4? If not, can you see if a previous kernel has the issue?

How to test it? In Yast Bootloader module, I can select only 6.5.4-1 and 6.5.2-1 .

If purge-kernels has removed your last 6.4 kernel, you can reinstall one from https://download.opensuse.org/repositories/home:/tiwai:/kernel:/6.4/standard.

I installed this kernel, but installation process breaks GRUB2 configuration - it complains about “it is necessary to load kernel first”, so config gives (probably) initrd first. I try repair this or load system by hand. I provide password and load working kernel from menu.

I have used these instructions:

Booting a custom kernel

Secure boot does not prevent you from using your own self compiled kernel. You just have to sign it with your own certificate and make that certificate known to the firmware or MOK.

    Create a custom X.509 key and certificate used for signing:
    $ openssl req -new -x509 -newkey rsa:2048 -sha256 -keyout key.asc -out cert.pem -nodes -days 666 -addext extendedKeyUsage=1.3.6.1.5.5.7.3.3 -subj "/CN=$USER/"
    Package key and cert as PKCS#12 structure:
    $ openssl pkcs12 -export -inkey key.asc -in cert.pem -name kernel_cert -out cert.p12
    Generate NSS database for use by pesign:
    $ certutil -d . -N
    Import key and certificate contained in PKCS#12 into NSS database:
    $ pk12util -d . -i cert.p12
    Bless the kernel with the new signature:
    $ pesign -n . -c kernel_cert -i arch/x86/boot/bzImage -o vmlinuz.signed -s
    List the signatures on the kernel image:
    $ pesign -S -i vmlinuz.signed

from: openSUSE:UEFI - openSUSE Wiki . I do rather copy-paste, but:

pesign -n . -c kernel_cert -i /boot/initrd-6.4.12-1.gf5aa89b-default -o vmlinuz.signed -s
authentication failed for token "NSS Certificate DB": The security password entered is incorrect.
pesign: Could not find certificate kernel_cert

It does not asks me for password. If password I prompted/typed previously is incorrect, they should been validated earlier, so that’s not point, I think. What could I do wrong.

PS: I do rpm -ql kernel-devel and search for string starting with /var, but nothing. Does package install public key. I am not security expert, sorry.

Sorry for not editing last post, but it is impossible. How to add an hash of kernel to EFI? EFI store, as I remember, contains certificates and hashes of executables.

This message is produced because the kernel could not be found, which is usually the result of an inaccessible boot filesystem. Your installation of kernel 6.4.12 may have failed to include nvme drivers, as has happened to me in the past, and may be causing your boot failure.

# lsinitrd /boot/initrd-6.4.12-1-default | grep nvme
drwxr-xr-x   3 root     root            0 Oct  3 18:20 usr/lib/modules/6.4.12-1-default/kernel/drivers/nvme
drwxr-xr-x   2 root     root            0 Oct  3 18:20 usr/lib/modules/6.4.12-1-default/kernel/drivers/nvme/host
-rw-r--r--   1 root     root       113995 Aug 24 20:00 usr/lib/modules/6.4.12-1-default/kernel/drivers/nvme/host/nvme-core.ko.zst
-rw-r--r--   1 root     root        42914 Aug 24 20:00 usr/lib/modules/6.4.12-1-default/kernel/drivers/nvme/host/nvme.ko.zst

From rescue boot I would test as above each installed kernel’s initrd. You may find all are absent. This should be permanently correctable by including:

add_drivers+=" nvme nvme_core "

to a file in /etc/dracut.conf.d/. Mine is 90-local.conf. I doubt the filename matters. Whether it will always be applied in every rescue boot environment I can’t be sure. Thus, I would also append:

 --add "nvme nvme-core"

to whatever else you include on the dracut command line to rebuild the current initrds.

Sorry. But where persistent memory driver was missing? In the kernel? In the intird? GRUB2, as far as I known, loads both kernel and intird. Additionally, I can start other kernel.

>lsinitrd /boot/initrd-6.4.12-1.gf5aa89b-default | grep -i nvm
drwxr-xr-x   2 root     root            0 Sep 11 21:33 usr/lib/modules/6.4.12-1.gf5aa89b-default/kernel/drivers/nvme
drwxr-xr-x   2 root     root            0 Sep 11 21:33 usr/lib/modules/6.4.12-1.gf5aa89b-default/kernel/drivers/nvme/host
-rw-r--r--   1 root     root        96977 Aug 29 16:14 usr/lib/modules/6.4.12-1.gf5aa89b-default/kernel/drivers/nvme/host/nvme-core.ko.zst
-rw-r--r--   1 root     root        34805 Aug 29 16:14 usr/lib/modules/6.4.12-1.gf5aa89b-default/kernel/drivers/nvme/host/nvme.ko.zst

As I see the 6.4.12 initrd contains the two nvme modules, there must be some other problem. I don’t have much more to suggest, except:

1-check whether the newer installed kernels’ initrds also contain these two modules, and regenerate them if they do not.

2-at Grub menu, strike E key, navigate to linu line, remove quiet, remove splash=silent, append plymouth.enable=0, append 3, proceed with boot to see what results. There may be useful messages.

Maybe just asks about booting in another thread? Sorry for making mess.

I think, that reason it is not booting was Secure Boot. OpenSUSE add their certificate during install, but this kernel cannot be signed by OpenSUSE team. I must asks how to add kernel (and initrd?) hash to EFI.

PS: This makes sense. GRUB2 cannot load kernel, cause it was not signed, tries to load initrd them, so when boot command occur, it complains about kernel was not loaded.

I use this tutorial:

And:

> uname -a
Linux localhost.localdomain 6.4.12-1.gf5aa89b-default #1 SMP PREEMPT_DYNAMIC Fri Aug 25 08:26:31 UTC 2023 (f5aa89b) x86_64 x86_64 x86_64 GNU/Linux

So I will test previously kernels. I think most important think, which could compromise my system is kernel installation. Of course - maybe creating certificates let someone’s else to sign their own kernels, but I think time window of testing is small enough.

Everything seems to work, but I do not have nvidia modules installed for current kernel. Maybe reason is apps do not use NVidia GPU? How to install nvidia for

6.4.12-1.gf5aa89b-default

?

> uname -a
Linux localhost.localdomain 6.4.12-1.gf5aa89b-default #1 SMP PREEMPT_DYNAMIC Fri Aug 25 08:26:31 UTC 2023 (f5aa89b) x86_64 x86_64 x86_64 GNU/Linux
slawomir@localhost:~> nvidia-smi 
Sun Oct  8 13:27:47 2023       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.113.01             Driver Version: 535.113.01   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce MX350           Off | 00000000:01:00.0 Off |                  N/A |
| N/A   62C    P8              N/A / ERR! |      4MiB /  2048MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      1925      G   /usr/bin/Xorg.bin                             4MiB |
+---------------------------------------------------------------------------------------+

I just installed dkms, kernel-syms from the same repo, kernel-devel from the same repo and kernel-default-devel from the same repo. I must also import new certificate. I will test in next week and response (maybe) at the end of next week. Currently, on AMD APU, everything seems worked, but maybe NVida drivers causes problems?

I use older kernel and I had only one issue: today I switch page in Firefox to Forge Of Empires during it loads and screen do not update. But… I think it is another, Firefox issue. Everything works like a charm.

What to do next? Where to fill bug report, how to gather info? Or what to do to solve my issue?