You are not logged in.

#1 2024-04-08 00:11:11

jrfernandez
Member
Registered: 2024-03-24
Posts: 20

External monitor prevents logout/reboot

I’m running arch 6.7.9 on a Thinkpad Z16 gen 2 (6.8.* has a Sensel touchpad regression). When I have an external monitor plugged in (Apple Studio Display) via Thunderbolt, the system doesn’t finalize reboots and logouts. It simply stays on the black screen that you get during system startup (where you see disk/journal verification messages).

Offline

#2 2024-04-08 04:03:01

jrfernandez
Member
Registered: 2024-03-24
Posts: 20

Re: External monitor prevents logout/reboot

This is also happening with 6.8.4

Offline

#3 2024-04-08 07:37:07

seth
Member
Registered: 2012-09-03
Posts: 58,018

Re: External monitor prevents logout/reboot

After the logout, can you switch to a different TTY (ctrl+alt+F1,2,3…)?
If not, try to reboot w/ the https://wiki.archlinux.org/title/Keyboa … el_(SysRq) (nb. that you've to explicitly enable that first!)

From either location, check/post the system journal. You can upload it

sudo journalctl -b | curl -F 'file=@-' 0x0.st

or after a reboot

sudo journalctl -b -1 | curl -F 'file=@-' 0x0.st

for the journal of the previous boot.

Online

#4 2024-04-09 03:54:58

jrfernandez
Member
Registered: 2024-03-24
Posts: 20

Re: External monitor prevents logout/reboot

I couldn't get a different TTY.

Here is the journal of the previous boot: https://0x0.st/XiIN.txt

Offline

#5 2024-04-09 07:41:37

seth
Member
Registered: 2012-09-03
Posts: 58,018

Re: External monitor prevents logout/reboot

Starting

Apr 08 21:34:21 archlinux kernel: amdgpu 0000:c7:00.0: [drm] Mode Validation Warning: Viewport size failed validation.
Apr 08 21:34:21 archlinux kernel: amdgpu 0000:c7:00.0: [drm] Mode Validation Warning: Viewport size failed validation.
Apr 08 21:34:21 archlinux kernel: amdgpu 0000:c7:00.0: [drm] Mode Validation Warning: Viewport size failed validation.
Apr 08 21:34:21 archlinux kernel: amdgpu 0000:c7:00.0: [drm] Mode Validation Warning: Viewport size failed validation.
…

you get a shit-ton of those

and then, after 13 minutes

Apr 08 21:48:10 archlinux systemd[1331]: Stopping GNOME Shell on Wayland...
Apr 08 21:48:10 archlinux systemd[1331]: app-gnome-1password-1689.scope: Consumed 12.587s CPU time.
Apr 08 21:48:11 archlinux kernel: amdgpu 0000:c7:00.0: [drm] Mode Validation Warning: Viewport size failed validation.
Apr 08 21:48:11 archlinux kernel: amdgpu 0000:c7:00.0: [drm] Mode Validation Warning: Viewport size failed validation.
Apr 08 21:48:11 archlinux kernel: amdgpu 0000:c7:00.0: [drm] Mode Validation Warning: Viewport size failed validation.
Apr 08 21:48:11 archlinux kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI
Apr 08 21:48:11 archlinux kernel: CPU: 15 PID: 42664 Comm: pool-gnome-shel Tainted: G           OE      6.8.4-arch1-1-custom #1 99fe39ff5af6345b50b9c1481b91dc19a86cfc6b
Apr 08 21:48:11 archlinux kernel: Hardware name: LENOVO 21JX0027US/21JX0027US, BIOS N41ET38W (1.15 ) 01/10/2024
Apr 08 21:48:11 archlinux kernel: RIP: 0010:setup_dsc_config+0x647/0x950 [amdgpu]

Stack (for google)

Apr 08 21:48:11 archlinux kernel: amdgpu 0000:c7:00.0: [drm] Mode Validation Warning: Viewport size failed validation.
Apr 08 21:48:11 archlinux kernel: divide error: 0000 [#1] PREEMPT SMP NOPTI
Apr 08 21:48:11 archlinux kernel: CPU: 15 PID: 42664 Comm: pool-gnome-shel Tainted: G           OE      6.8.4-arch1-1-custom #1 99fe39ff5af6345b50b9c1481b91dc19a86cfc6b
Apr 08 21:48:11 archlinux kernel: Hardware name: LENOVO 21JX0027US/21JX0027US, BIOS N41ET38W (1.15 ) 01/10/2024
Apr 08 21:48:11 archlinux kernel: RIP: 0010:setup_dsc_config+0x647/0x950 [amdgpu]
Apr 08 21:48:11 archlinux kernel: Code: 16 89 c8 31 d2 41 f7 76 08 85 d2 75 0a 83 ff 04 75 15 f6 c1 01 74 10 83 c1 01 39 ce 75 da 83 ff 04 0f 84 fb 01 00 00 89 f0 99 <f7> f9 8b 4c 24 08 89 43 04 85 c9 0f 8f 65 01 00 00 0f b6 84 24 80
Apr 08 21:48:11 archlinux kernel: RSP: 0018:ffffb2250c9a75c0 EFLAGS: 00010293
Apr 08 21:48:11 archlinux kernel: RAX: 0000000000000000 RBX: ffff9b154c7b00c0 RCX: 0000000000000000
Apr 08 21:48:11 archlinux kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001
Apr 08 21:48:11 archlinux kernel: RBP: ffff9b154c7b0058 R08: 0000000000000001 R09: 00000000000004b0
Apr 08 21:48:11 archlinux kernel: R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000001
Apr 08 21:48:11 archlinux kernel: R13: ffffb2250c9a77c4 R14: ffffb2250c9a775c R15: ffff9b154c7b00f8
Apr 08 21:48:11 archlinux kernel: FS:  0000000000000000(0000) GS:ffff9b235f1c0000(0000) knlGS:0000000000000000
Apr 08 21:48:11 archlinux kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Apr 08 21:48:11 archlinux kernel: CR2: 00005f3666b78a70 CR3: 0000000673e20000 CR4: 0000000000f50ef0
Apr 08 21:48:11 archlinux kernel: PKRU: 55555554
Apr 08 21:48:11 archlinux kernel: Call Trace:
Apr 08 21:48:11 archlinux kernel:  <TASK>
Apr 08 21:48:11 archlinux kernel:  ? die+0x36/0x90
Apr 08 21:48:11 archlinux kernel:  ? do_trap+0xda/0x100
Apr 08 21:48:11 archlinux kernel:  ? setup_dsc_config+0x647/0x950 [amdgpu 98eb1eb0ef585d3d055f25d89f219517a3f6f020]
Apr 08 21:48:11 archlinux kernel:  ? do_error_trap+0x6a/0x90
Apr 08 21:48:11 archlinux kernel:  ? setup_dsc_config+0x647/0x950 [amdgpu 98eb1eb0ef585d3d055f25d89f219517a3f6f020]
Apr 08 21:48:11 archlinux kernel:  ? exc_divide_error+0x38/0x50
Apr 08 21:48:11 archlinux kernel:  ? setup_dsc_config+0x647/0x950 [amdgpu 98eb1eb0ef585d3d055f25d89f219517a3f6f020]
Apr 08 21:48:11 archlinux kernel:  ? asm_exc_divide_error+0x1a/0x20
Apr 08 21:48:11 archlinux kernel:  ? setup_dsc_config+0x647/0x950 [amdgpu 98eb1eb0ef585d3d055f25d89f219517a3f6f020]
Apr 08 21:48:11 archlinux kernel:  dc_dsc_compute_config+0x85/0xb0 [amdgpu 98eb1eb0ef585d3d055f25d89f219517a3f6f020]
Apr 08 21:48:11 archlinux kernel:  create_stream_for_sink+0xab6/0xb70 [amdgpu 98eb1eb0ef585d3d055f25d89f219517a3f6f020]
Apr 08 21:48:11 archlinux kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
Apr 08 21:48:11 archlinux kernel:  ? dcn30_internal_validate_bw+0x95a/0xa30 [amdgpu 98eb1eb0ef585d3d055f25d89f219517a3f6f020]
Apr 08 21:48:11 archlinux kernel:  create_validate_stream_for_sink+0x1eb/0x3a0 [amdgpu 98eb1eb0ef585d3d055f25d89f219517a3f6f020]
Apr 08 21:48:11 archlinux kernel:  amdgpu_dm_connector_mode_valid+0x63/0x1d0 [amdgpu 98eb1eb0ef585d3d055f25d89f219517a3f6f020]
Apr 08 21:48:11 archlinux kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
Apr 08 21:48:11 archlinux kernel:  ? drm_connector_list_update+0x15b/0x250
Apr 08 21:48:11 archlinux kernel:  drm_connector_mode_valid+0x38/0x60
Apr 08 21:48:11 archlinux kernel:  __drm_helper_update_and_validate+0xfe/0x3c0
Apr 08 21:48:11 archlinux kernel:  drm_helper_probe_single_connector_modes+0x242/0x550
Apr 08 21:48:11 archlinux kernel:  drm_client_modeset_probe+0x248/0x1520
Apr 08 21:48:11 archlinux kernel:  ? drm_modeset_drop_locks+0x51/0x80
Apr 08 21:48:11 archlinux kernel:  drm_fb_helper_hotplug_event+0xac/0x100
Apr 08 21:48:11 archlinux kernel:  amdgpu_driver_lastclose_kms+0xe/0x20 [amdgpu 98eb1eb0ef585d3d055f25d89f219517a3f6f020]
Apr 08 21:48:11 archlinux kernel:  drm_lastclose+0x38/0x90
Apr 08 21:48:11 archlinux kernel:  drm_release+0x12e/0x140
Apr 08 21:48:11 archlinux kernel:  __fput+0x8f/0x2c0
Apr 08 21:48:11 archlinux kernel:  task_work_run+0x5a/0x90
Apr 08 21:48:11 archlinux kernel:  do_exit+0x377/0xb60
Apr 08 21:48:11 archlinux kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
Apr 08 21:48:11 archlinux kernel:  ? timerqueue_del+0x2e/0x50
Apr 08 21:48:11 archlinux kernel:  do_group_exit+0x31/0x80
Apr 08 21:48:11 archlinux kernel:  get_signal+0xa98/0xab0
Apr 08 21:48:11 archlinux kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
Apr 08 21:48:11 archlinux kernel:  ? futex_wait+0x8a/0x110
Apr 08 21:48:11 archlinux kernel:  arch_do_signal_or_restart+0x3e/0x270
Apr 08 21:48:11 archlinux kernel:  syscall_exit_to_user_mode+0x1c6/0x230
Apr 08 21:48:11 archlinux kernel:  do_syscall_64+0x96/0x170
Apr 08 21:48:11 archlinux kernel:  ? __x64_sys_futex+0x129/0x1e0
Apr 08 21:48:11 archlinux kernel:  ? __count_memcg_events+0x4d/0xc0
Apr 08 21:48:11 archlinux kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
Apr 08 21:48:11 archlinux kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
Apr 08 21:48:11 archlinux kernel:  ? syscall_exit_to_user_mode+0x80/0x230
Apr 08 21:48:11 archlinux kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
Apr 08 21:48:11 archlinux kernel:  ? do_syscall_64+0x96/0x170
Apr 08 21:48:11 archlinux kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
Apr 08 21:48:11 archlinux kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
Apr 08 21:48:11 archlinux kernel:  entry_SYSCALL_64_after_hwframe+0x73/0x7b
Apr 08 21:48:11 archlinux kernel: RIP: 0033:0x739451d2488d
Apr 08 21:48:11 archlinux kernel: Code: Unable to access opcode bytes at 0x739451d24863.
Apr 08 21:48:11 archlinux kernel: RSP: 002b:00007393ef1fe7a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
Apr 08 21:48:11 archlinux kernel: RAX: fffffffffffffdfc RBX: 0000000000000001 RCX: 0000739451d2488d
Apr 08 21:48:11 archlinux kernel: RDX: 00000000000001d7 RSI: 0000000000000080 RDI: 00005f3666745120
Apr 08 21:48:11 archlinux kernel: RBP: 00005f3666745110 R08: 000000000001c7ab R09: 0000000000000000
Apr 08 21:48:11 archlinux kernel: R10: 00007393ef1fe7d0 R11: 0000000000000246 R12: 00000000000001d7
Apr 08 21:48:11 archlinux kernel: R13: 0000000000000001 R14: 00005f3666745118 R15: 00007393eea00000
Apr 08 21:48:11 archlinux kernel:  </TASK>
Apr 08 21:48:11 archlinux kernel: Modules linked in: hid_sensor_rotation hid_sensor_als hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio snd_usb_audio snd_usbmidi_lib snd_ump hid_sensor_hub snd_rawmidi apple_mfi_fastcharge ccm snd_seq_dummy rfcomm snd_hrtimer snd_seq snd_seq_device cmac algif_hash algif_skcipher af_alg xt_comment nft_compat nf_tables libcrc32c snd_ctl_led bnep btusb btrtl btintel btbcm btmtk bluetooth ecdh_generic snd_soc_dmic snd_soc_ps_mach snd_ps_pdm_dma snd_sof_amd_acp63 snd_sof_amd_vangogh snd_sof_amd_rembrandt snd_sof_amd_renoir snd_sof_amd_acp snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_sof_utils snd_soc_core snd_hda_codec_realtek snd_hda_codec_generic snd_compress ac97_bus snd_pcm_dmaengine snd_hda_codec_hdmi snd_pci_ps uvcvideo snd_rpl_pci_acp6x videobuf2_vmalloc uvc snd_acp_pci videobuf2_memops snd_hda_intel snd_acp_legacy_common snd_intel_dspcfg videobuf2_v4l2 snd_pci_acp6x snd_intel_sdw_acpi snd_pci_acp5x snd_hda_codec videodev snd_hda_core snd_rn_pci_acp3x
Apr 08 21:48:11 archlinux kernel:  videobuf2_common snd_acp_config snd_hwdep mc snd_soc_acpi snd_pcm intel_rapl_msr intel_rapl_common snd_timer snd_pci_acp3x joydev kvm_amd amdgpu ccp mousedev mt7921e kvm mt7921_common mt792x_lib irqbypass crct10dif_pclmul mt76_connac_lib crc32_pclmul polyval_clmulni polyval_generic mt76 gf128mul snd_hda_scodec_cs35l41_spi ghash_clmulni_intel amdxcp drm_exec sha512_ssse3 sha256_ssse3 gpu_sched mac80211 sha1_ssse3 drm_buddy wacom snd_hda_scodec_cs35l41_i2c aesni_intel i2c_algo_bit snd_hda_scodec_cs35l41 usbhid drm_suballoc_helper hid_multitouch drm_ttm_helper crypto_simd snd_hda_cs_dsp_ctls hid_generic ttm vfat cryptd cs_dsp ucsi_acpi libarc4 fat typec_ucsi snd_soc_cs35l41_lib cfg80211 sp5100_tco drm_display_helper typec rapl psmouse roles pcspkr thunderbolt i2c_hid_acpi cec i2c_hid amd_pmc serial_multi_instantiate i2c_piix4 mac_hid think_lmi wmi_bmof uinput firmware_attributes_class thinkpad_acpi ledtrig_audio platform_profile rfkill snd soundcore video wmi ryzen_smu(OE) pkcs8_key_parser crypto_user fuse
Apr 08 21:48:11 archlinux kernel:  dm_mod loop nfnetlink zram ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 sdhci_pci serio_raw atkbd cqhci nvme libps2 vivaldi_fmap sdhci xhci_pci crc32c_intel nvme_core i8042 mmc_core xhci_pci_renesas nvme_auth serio
Apr 08 21:48:11 archlinux kernel: ---[ end trace 0000000000000000 ]---
Apr 08 21:48:11 archlinux kernel: RIP: 0010:setup_dsc_config+0x647/0x950 [amdgpu]
Apr 08 21:48:11 archlinux kernel: Code: 16 89 c8 31 d2 41 f7 76 08 85 d2 75 0a 83 ff 04 75 15 f6 c1 01 74 10 83 c1 01 39 ce 75 da 83 ff 04 0f 84 fb 01 00 00 89 f0 99 <f7> f9 8b 4c 24 08 89 43 04 85 c9 0f 8f 65 01 00 00 0f b6 84 24 80
Apr 08 21:48:11 archlinux kernel: RSP: 0018:ffffb2250c9a75c0 EFLAGS: 00010293
Apr 08 21:48:11 archlinux kernel: RAX: 0000000000000000 RBX: ffff9b154c7b00c0 RCX: 0000000000000000
Apr 08 21:48:11 archlinux kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001
Apr 08 21:48:11 archlinux kernel: RBP: ffff9b154c7b0058 R08: 0000000000000001 R09: 00000000000004b0
Apr 08 21:48:11 archlinux kernel: R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000001
Apr 08 21:48:11 archlinux kernel: R13: ffffb2250c9a77c4 R14: ffffb2250c9a775c R15: ffff9b154c7b00f8
Apr 08 21:48:11 archlinux kernel: FS:  0000000000000000(0000) GS:ffff9b235f1c0000(0000) knlGS:0000000000000000
Apr 08 21:48:11 archlinux kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Apr 08 21:48:11 archlinux kernel: CR2: 00005f3666b78a70 CR3: 0000000673e20000 CR4: 0000000000f50ef0
Apr 08 21:48:11 archlinux kernel: PKRU: 55555554
Apr 08 21:48:11 archlinux kernel: Fixing recursive fault but reboot is needed!
Apr 08 21:48:11 archlinux kernel: BUG: scheduling while atomic: pool-gnome-shel/42664/0x00000000

Try "amdgpu.dcdebugmask=0x4", https://wiki.archlinux.org/title/Kernel_parameters
(This should disable dsc what might prevent the external output to function at all)

Also w/ the Apple display attached

for OUT in /sys/class/drm/card*; do echo $OUT; edid-decode $OUT/edid; echo "================="; done

You'll need https://aur.archlinux.org/packages/edid-decode-git

tl;dr - the problem is *likely* the high resolution of the monitor which requires display stream compression to function, the system already doesn't like the modeline and when you shut down (likely just switch to a console) the amdgpu kernel module crashes badly.

If you don't care about the resolution at the console, you can try https://wiki.archlinux.org/title/Kernel … s_and_EDID
Do not try to replace the EDID, but select a mode: https://www.kernel.org/doc/Documentation/fb/modedb.rst

Online

#6 2024-04-10 01:21:43

jrfernandez
Member
Registered: 2024-03-24
Posts: 20

Re: External monitor prevents logout/reboot

Offline

#7 2024-04-10 07:21:06

seth
Member
Registered: 2012-09-03
Posts: 58,018

Re: External monitor prevents logout/reboot

Yup, the backtrace from March 25th fits yours perfectly.

Online

#8 2024-04-10 19:28:25

jrfernandez
Member
Registered: 2024-03-24
Posts: 20

Re: External monitor prevents logout/reboot

seth, thank you for helping me track this down. I used the kernel's decode_stacktrace script to find the line number where the division by zero was happening. I submitted a patch to the amdgpu folks to guard against it. Why it was happening I'm not sure, but the code should handle it better. With this patch applied the issue went away. https://lore.kernel.org/lkml/2024041004 … tflix.com/

Offline

Board footer

Powered by FluxBB