You are not logged in.

#1 2024-04-28 11:11:59

sunzhenyu
Member
Registered: 2024-04-28
Posts: 6

Kwin_wayland crash when wake up after suspended or hibernated

Hi, experts.

I using the Arch Linux with KDE 6 Wayland.

And my system information are below:

Kernel Version: 6.8.7-arch1-2

Displays:

- 2560x1600 @ 165Hz (as 1280x800) [Built-in]
- 2560x1440 @ 165Hz (as 1280x720)

WM: KWin (Wayland)

DE: KDE Plasma 6.0.4

GPUs:

- AMD Radeon Vega Series / Radeon Vega Mobile Series (764.31 MiB / 4.00 GiB, 19%) [Discrete]
- NVIDIA GeForce RTX 3060 Mobile / Max-Q

CPU: AMD Ryzen 7 5800H (16) @ 4.46 GHz

This is link for system journals after kwin_wayland crashed: https://0x0.st/XHga.txt

I dont know why and hot to fix it, i need some help plz sad

Offline

#2 2024-04-28 11:46:34

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,034

Re: Kwin_wayland crash when wake up after suspended or hibernated

Your processor comes with an integrated radeon Vega videocard which makes this a hybrid graphics system .

Did you set the nvidia card as primary in the (uefi) firmware menu ?

If not, what guide/wiki page did you follow to setup the videocards ?

Please post lspci -k output and the contents of /etc/mkinitcpio.conf .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Online

#3 2024-04-28 11:49:42

sunzhenyu
Member
Registered: 2024-04-28
Posts: 6

Re: Kwin_wayland crash when wake up after suspended or hibernated

Lone_Wolf wrote:

Your processor comes with an integrated radeon Vega videocard which makes this a hybrid graphics system .

Did you set the nvidia card as primary in the (uefi) firmware menu ?

If not, what guide/wiki page did you follow to setup the videocards ?

Please post lspci -k output and the contents of /etc/mkinitcpio.conf .

Thanks for your reply.

Below are outputs with lspci -k

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne Root Complex
    Subsystem: Lenovo Device 3814
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne IOMMU
    Subsystem: Lenovo Device 3815
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
    Subsystem: Lenovo Device 3886
    Kernel driver in use: pcieport
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
    Subsystem: Lenovo Device 3886
    Kernel driver in use: pcieport
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:02.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
    Subsystem: Lenovo Device 3886
    Kernel driver in use: pcieport
00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
    Subsystem: Lenovo Device 3886
    Kernel driver in use: pcieport
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
    Subsystem: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
    Kernel driver in use: pcieport
00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
    Subsystem: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
    Kernel driver in use: pcieport
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 51)
    Subsystem: Lenovo Device 3842
    Kernel driver in use: piix4_smbus
    Kernel modules: i2c_piix4, sp5100_tco
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
    Subsystem: Lenovo Device 3840
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 3
    Kernel driver in use: k10temp
    Kernel modules: k10temp
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 7
01:00.0 VGA compatible controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1)
    Subsystem: Lenovo Device 3a80
    Kernel driver in use: nvidia
    Kernel modules: nouveau, nvidia_drm, nvidia
01:00.1 Audio device: NVIDIA Corporation GA106 High Definition Audio Controller (rev a1)
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel
02:00.0 Non-Volatile memory controller: SK hynix Gold P31/BC711/PC711 NVMe Solid State Drive
    Subsystem: SK hynix Gold P31/BC711/PC711 NVMe Solid State Drive
    Kernel driver in use: nvme
    Kernel modules: nvme
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller (rev 15)
    DeviceName: Realtek RTL8111E Ethernet LOM
    Subsystem: Lenovo Device 390b
    Kernel driver in use: r8169
    Kernel modules: r8169
04:00.0 Network controller: MEDIATEK Corp. MT7921 802.11ax PCI Express Wireless Network Adapter
    Subsystem: Lenovo Device e0bc
    Kernel driver in use: mt7921e
    Kernel modules: mt7921e
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] (rev c5)
    Subsystem: Lenovo Device 3a80
    Kernel driver in use: amdgpu
    Kernel modules: amdgpu
05:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
    Subsystem: Lenovo Device 382a
    Kernel driver in use: ccp
    Kernel modules: ccp
05:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1
    Subsystem: Lenovo Device 3828
    Kernel driver in use: xhci_hcd
    Kernel modules: xhci_pci
05:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1
    Subsystem: Lenovo Device 3829
    Kernel driver in use: xhci_hcd
    Kernel modules: xhci_pci
05:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 01)
    Subsystem: Lenovo Device 382c
    Kernel modules: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x, snd_acp_pci, snd_rpl_pci_acp6x, snd_pci_ps, snd_sof_amd_renoir, snd_sof_amd_rembrandt, snd_sof_amd_vangogh, snd_sof_amd_acp63
05:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller
    Subsystem: Lenovo Device 382b
    Kernel driver in use: snd_hda_intel
    Kernel modules: snd_hda_intel
06:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 81)
    Subsystem: Lenovo Device 383f
    Kernel driver in use: ahci
06:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 81)
    Subsystem: Lenovo Device 383f
    Kernel driver in use: ahci

And below are options wirtes in `/etc/mkinitcpio.conf`:

# Below only working on NVIDIA card
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
# MODULES=()
BINARIES=()
FILES=(/etc/udev/rules.d/80-nvidia-pm.rules)
HOOKS=(base udev autodetect keyboard keymap modconf block filesystems fsck)

Yes, i'm running at Hybrid mode.

Offline

#4 2024-04-28 11:57:36

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,034

Re: Kwin_wayland crash when wake up after suspended or hibernated

Please use code tags for such ouput, see https://bbs.archlinux.org/help.php#bbcode

If you're running with both cards enabled the amdgpu kernel module needs to be initialised before the nvidia card starts.
About the only way to prevent needing that is to set the nvidia card as primary in firmware .

Did you set the nvidia card as primary in the (uefi) firmware menu ?

If not, what guide/wiki page did you follow to setup the videocards ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Online

#5 2024-04-28 12:05:20

sunzhenyu
Member
Registered: 2024-04-28
Posts: 6

Re: Kwin_wayland crash when wake up after suspended or hibernated

Lone_Wolf wrote:

Your processor comes with an integrated radeon Vega videocard which makes this a hybrid graphics system .

Did you set the nvidia card as primary in the (uefi) firmware menu ?

If not, what guide/wiki page did you follow to setup the videocards ?

Please post lspci -k output and the contents of /etc/mkinitcpio.conf .

These are what i did for setups Hybrid mode with integrated video card and NVIDIA video card:

1. Enabled Hybrid in BIOS
2. Install these packages to drive on NVIDIA video card and Integrated AMD video card: mesa, nvidia
3. Set DRM for nvidia cards to make secondary monitor online: modify the `/etc/mkinitcpio.conf` and create new file at `/etc/modprobe.d/nvidia_drm.conf`.

Below are contents in /etc/modprobe.d/nvidia_drm.conf:

# Enable DRM
options nvidia_drm modset=1
# Enable NVIDIA dynamic power management
options nvidia "NVreg_DynamicPowerManagement=0x02"

4. create new file at `/etc/udev/rules.d/80-nvidia-pm.rules`

Bwlow are contents in /etc/udev/rules.d/80-nvidia-pm.rules:

# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto"
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto"
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", TEST=="power/control", ATTR{power/control}="auto"
 
# Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on"
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="on"
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", TEST=="power/control", ATTR{power/control}="on"

5. run `sudo mkinitcpio -P` and restart, connect secondary monitor and it's working, builtin monitor woking too. FYI: Wayland protocol

6. After system hibernated and suspended, try to wake up will made kwin_wayland crash.

Last edited by sunzhenyu (2024-04-28 12:06:27)

Offline

#6 2024-04-28 12:09:53

sunzhenyu
Member
Registered: 2024-04-28
Posts: 6

Re: Kwin_wayland crash when wake up after suspended or hibernated

Lone_Wolf wrote:

Please use code tags for such ouput, see https://bbs.archlinux.org/help.php#bbcode

If you're running with both cards enabled the amdgpu kernel module needs to be initialised before the nvidia card starts.
About the only way to prevent needing that is to set the nvidia card as primary in firmware .

Did you set the nvidia card as primary in the (uefi) firmware menu ?

If not, what guide/wiki page did you follow to setup the videocards ?

Thanks, but my BIOS only provide 2 options:

1. Hybrid mode
2. Discrete mode (this option will made NVIDIA work only but no AMD)

As you said, there is only discrete mode i can use to fix crash issue, that means I need to give up the integrated GPU (AMD).

Offline

#7 2024-04-28 12:31:27

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,034

Re: Kwin_wayland crash when wake up after suspended or hibernated

The crash is likely due to incorrect setup of the hybrid system .

Your best option to have both cards available is probably the prime render option .

Start with adding the amdgpu kernel module to modules= in mkinitcpio.conf .
It should be the put BEFORE the nvidia modules.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Online

#8 2024-04-28 15:13:20

sunzhenyu
Member
Registered: 2024-04-28
Posts: 6

Re: Kwin_wayland crash when wake up after suspended or hibernated

Lone_Wolf wrote:

The crash is likely due to incorrect setup of the hybrid system .

Your best option to have both cards available is probably the prime render option .

Start with adding the amdgpu kernel module to modules= in mkinitcpio.conf .
It should be the put BEFORE the nvidia modules.

Thanks bro, i tried as your said put amdgpu before the nvidia modules, but

fastfetch

told me the amd gpu is discrate gpu, that made me confused.

Just like this:

yaid@yaid-lab
-------------
OS: Arch Linux x86_64
Host: 82JQ (Lenovo Legion R9000P2021H)
Kernel: 6.8.7-arch1-2
Uptime: 5 mins
Packages: 1155 (pacman), 72 (brew)
Shell: zsh 5.9
Display (BOE0A40): 2560x1600 @ 165Hz (as 1280x800) [Built-in]
DE: KDE Plasma 6.0.4
WM: KWin (Wayland)
WM Theme: Breeze 微风
Theme: Breeze (Dark) [QT], Breeze-Dark [GTK2], Breeze [GTK3/4]
Icons: Papirus-Dark [QT], Papirus-Dark [GTK2/3/4]
Font: Sarasa UI SC (10pt) [QT], Sarasa UI SC (10pt) [GTK2/3/4]
Cursor: Breeze_Light (30px)
Terminal: konsole 24.2.2
Terminal Font: 等距更纱黑体 SC Nerd Font (11pt)
CPU: AMD Ryzen 7 5800H (16) @ 4.46 GHz
GPU 1: NVIDIA GeForce RTX 3060 Mobile / Max-Q
GPU 2: AMD Radeon Vega Series / Radeon Vega Mobile Series (678.54 MiB / 4.00 GiB, 17%) [Discrete]
Memory: 3.33 GiB / 58.72 GiB (6%)
Swap: 22.25 MiB / 64.00 GiB (0%)
Disk (/): 21.92 GiB / 78.19 GiB (28%) - ext4
Disk (/home): 64.54 GiB / 324.68 GiB (20%) - ext4
Local IP (wlan0): 192.168.31.247/24 *
Battery: 94% [Discharging]
Locale: zh_CN.UTF-8

Will that affect anything?

Offline

#9 2024-04-28 17:57:36

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,034

Re: Kwin_wayland crash when wake up after suspended or hibernated

I have no idea where neofetch/fastfench get their info from, but
the offiical specifications for your processor at https://www.amd.com/en/products/apu/amd-ryzen-7-5800h
clearly list an integrated radeon card.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Online

#10 2024-04-29 02:04:42

sunzhenyu
Member
Registered: 2024-04-28
Posts: 6

Re: Kwin_wayland crash when wake up after suspended or hibernated

Lone_Wolf wrote:

I have no idea where neofetch/fastfench get their info from, but
the offiical specifications for your processor at https://www.amd.com/en/products/apu/amd-ryzen-7-5800h
clearly list an integrated radeon card.

Thanks, i know what cause that, is fastfetch issue but not system. thanks!!

Offline

Board footer

Powered by FluxBB