Bug#1042753: nouveau: Screen remains black.
On Wednesday, 2 August 2023 18:26:32 CEST Olaf Skibbe wrote: > I gave it a shot and ran > > # apt install /home/olaf/Patches/*.deb Just linux-image-6.1.0-0.a.test-amd64-unsigned_6.1.38-2a~test_amd64.deb would've been enough, but this works too ;-) > Result: Booted in the new kernel. > > # uname -r > 6.1.0-0.a.test-amd64 > > Graphics works now. This is fantastic \o/ > I guess I am supposed to build some more kernels with subsets of > patches? Any hint where to start? I looked at them, but there wasn't one that stood out for me. You could try them one by one, but that'll take quite a while. So I suggest we move on the the next step/phase: contact the upstream developers, who are also the ones who'd make the actual fix. So I want to ask you to write an email and send that: To: dri-de...@lists.freedesktop.org To: nouv...@lists.freedesktop.org CC: 1042...@bugs.debian.org (optionally) And then 'paste' in the text of your initial bug report until this part: [3.561131] ---[ end trace ]--- I suggest to also include the output of `lspci -v -s $(lspci | grep -i vga | awk '{ print $1 }') Tell them that you found out that it was a regression between upstream kernel version 6.1.27 and 6.1.38. Then explain that you build a new 6.1.38 kernel with these commits reverted: 62aecf23f3d1 drm/nouveau: add nv_encoder pointer check for NULL fb725beca62d drm/nouveau/dp: check for NULL nv_connector->native_mode 90748be0f4f3 drm/nouveau: don't detect DSM for non-NVIDIA device 5a144bad3e75 nouveau: fix client work fence deletion race And that that made graphics work again. Referencing https://bugs.debian.org/1042753 for full context may also be useful. They may ask you to only revert a specific commit as they should be able to make a proper guess. Or they already know by the context. With a bit of luck they'll also ask you to try a potential fix. They should be able to provide such a fix/patch as one which cleanly applies to 6.1.38. Or otherwise I can probably help with that. And you can pass that patch (file) as argument to the `test-patches` script :-) If you have any questions, feel free to ask them. Cheers, Diederik signature.asc Description: This is a digitally signed message part.
Bug#1042753: nouveau: Screen remains black.
On Wed, 2 Aug 2023 at 01:09, Diederik de Haas wrote: On Wednesday, 2 August 2023 00:23:16 CEST Olaf Skibbe wrote: But now I am a little clueless: how do I install this kernel? Any hint? It should have produced one or more .deb files and you can install a .deb file like this: `apt install ./.deb` If you share the output of `ls -lh *.deb` (and/or `ls -lh ../*.deb`) then I can probably give you more precise instructions. Sorry, my fault. I searched for .deb files in the subdirectory when I thought I searched the home directory. I am familiar with installing a .deb file. So we have: ~/Patches$ l *.deb -rw-r--r-- 1 olaf olaf 647K 2. Aug 00:02 linux-compiler-gcc-12-x86_6.1.38-2a~test_amd64.deb -rw-r--r-- 1 olaf olaf 1,2M 1. Aug 23:59 linux-headers-6.1.0-0.a.test-amd64_6.1.38-2a~test_amd64.deb -rw-r--r-- 1 olaf olaf 9,4M 1. Aug 21:34 linux-headers-6.1.0-0.a.test-common_6.1.38-2a~test_all.deb -rw-r--r-- 1 olaf olaf 7,8M 1. Aug 21:34 linux-headers-6.1.0-0.a.test-common-rt_6.1.38-2a~test_all.deb -rw-r--r-- 1 olaf olaf 56M 2. Aug 00:01 linux-image-6.1.0-0.a.test-amd64-unsigned_6.1.38-2a~test_amd64.deb -rw-r--r-- 1 olaf olaf 1,2M 2. Aug 00:02 linux-image-amd64-signed-template_6.1.38-2a~test_amd64.deb -rw-r--r-- 1 olaf olaf 898K 2. Aug 00:01 linux-kbuild-6.1_6.1.38-2a~test_amd64.deb -rw-r--r-- 1 olaf olaf 1001K 2. Aug 00:01 linux-kbuild-6.1-dbgsym_6.1.38-2a~test_amd64.deb -rw-r--r-- 1 olaf olaf 1,8M 2. Aug 00:02 linux-libc-dev_6.1.38-2a~test_amd64.deb -rw-r--r-- 1 olaf olaf 694K 1. Aug 21:34 linux-support-6.1.0-0.a.test_6.1.38-2a~test_all.deb I gave it a shot and ran # apt install /home/olaf/Patches/*.deb Result: # aptitude search linux-image | grep ^i i linux-image-6.1.0-0.a.test-amd64-unsigned - Linux 6.1 for 64-bit PCs i A linux-image-6.1.0-10-amd64 - Linux 6.1 for 64-bit PCs (signed) i linux-image-6.1.0-9-amd64 - Linux 6.1 for 64-bit PCs (signed) i linux-image-amd64 - Linux für 64-Bit-PCs (Metapaket) i linux-image-amd64-signed-template - Template for signed linux-image packages for amd64 Booted in the new kernel. # uname -r 6.1.0-0.a.test-amd64 Graphics works now. I guess I am supposed to build some more kernels with subsets of patches? Any hint where to start? Cheers, Olaf
Bug#1042753: nouveau: Screen remains black.
On Wednesday, 2 August 2023 00:23:16 CEST Olaf Skibbe wrote: > Finally I managed to compile the kernel via > > debian/bin/test-patches > ../0001-Revert-drm-nouveau-add-nv_encoder-pointer-check-for-.patch > ../0002-Revert-drm-nouveau-dp-check-for-NULL-nv_connector-na.patch > ../0003-Revert-drm-nouveau-don-t-detect-DSM-for-non-NVIDIA-d.patch > ../0004-Revert-nouveau-fix-client-work-fence-deletion-race.patch > > (apparently successfully, but it took several hours). Awesome \o/ Depending on the speed of the machine, it can indeed take several hours. > But now I am a little clueless: how do I install this kernel? Any hint? It should have produced one or more .deb files and you can install a .deb file like this: `apt install ./.deb` If you share the output of `ls -lh *.deb` (and/or `ls -lh ../*.deb`) then I can probably give you more precise instructions. Cheers, Diederik signature.asc Description: This is a digitally signed message part.
Bug#1042753: nouveau: Screen remains black.
Finally I managed to compile the kernel via debian/bin/test-patches ../0001-Revert-drm-nouveau-add-nv_encoder-pointer-check-for-.patch ../0002-Revert-drm-nouveau-dp-check-for-NULL-nv_connector-na.patch ../0003-Revert-drm-nouveau-don-t-detect-DSM-for-non-NVIDIA-d.patch ../0004-Revert-nouveau-fix-client-work-fence-deletion-race.patch (apparently successfully, but it took several hours). But now I am a little clueless: how do I install this kernel? Any hint? Cheers, Olaf On Mon, 31 Jul 2023 at 22:42, Diederik de Haas wrote: On Monday, 31 July 2023 21:52:44 CEST Olaf Skibbe wrote: Yep, now we know it's a regression between 6.1.27-1 and 6.1.38-2. https://wiki.debian.org/DebianKernel/GitBisect describes the best way as it would identify the exact (upstream) commit which introduced the problem. If you can do that, great. I'd love to contribute here, but I am afraid this would be a bit beyond my capabilities. I now have only remote access to the computer in question (I have to ask somebody to verify whether the display is working) and I am not very experienced. Sorry. That's ok, I (kind of) expected that a `git bisect` would be too difficult. That's why I also described a simpler procedure which is specifically meant for people who aren't experienced. It will result in a new kernel being build, but all the complexity should be hidden for you. It probably sounds daunting/scary, but it shouldn't be. There is a subsequent step, but that is (far) more likely to succeed if we'd have more detailed data which the above procedure would provide. So it would be great if you could try it. If it turns out to be too difficult, don't worry about it :-) Cheers, Diederik
Bug#1042753: nouveau: Screen remains black.
On Monday, 31 July 2023 21:52:44 CEST Olaf Skibbe wrote: > > Yep, now we know it's a regression between 6.1.27-1 and 6.1.38-2. > > > > https://wiki.debian.org/DebianKernel/GitBisect describes the best way as > > it would identify the exact (upstream) commit which introduced the > > problem. If you can do that, great. > > I'd love to contribute here, but I am afraid this would be a bit beyond > my capabilities. I now have only remote access to the computer in > question (I have to ask somebody to verify whether the display is > working) and I am not very experienced. Sorry. That's ok, I (kind of) expected that a `git bisect` would be too difficult. That's why I also described a simpler procedure which is specifically meant for people who aren't experienced. It will result in a new kernel being build, but all the complexity should be hidden for you. It probably sounds daunting/scary, but it shouldn't be. There is a subsequent step, but that is (far) more likely to succeed if we'd have more detailed data which the above procedure would provide. So it would be great if you could try it. If it turns out to be too difficult, don't worry about it :-) Cheers, Diederik signature.asc Description: This is a digitally signed message part.
Bug#1042753: nouveau: Screen remains black.
On Mon, 31 Jul 2023 at 20:28, Diederik de Haas wrote: On Monday, 31 July 2023 18:20:12 CEST Olaf Skibbe wrote: I installed 6.1.0-9-amd64 now from the standard repositories and graphics works. Hope this is sufficient to narrow it down Yep, now we know it's a regression between 6.1.27-1 and 6.1.38-2. https://wiki.debian.org/DebianKernel/GitBisect describes the best way as it would identify the exact (upstream) commit which introduced the problem. If you can do that, great. I'd love to contribute here, but I am afraid this would be a bit beyond my capabilities. I now have only remote access to the computer in question (I have to ask somebody to verify whether the display is working) and I am not very experienced. Sorry. Cheers, Olaf
Bug#1042753: nouveau: Screen remains black.
On Monday, 31 July 2023 18:20:12 CEST Olaf Skibbe wrote: > > If there is a 6.1 kernel that does work, then it helps if you can find the > > latest 6.1 kernel which works and (thus) the first kernel version where it > > stopped working. > > I installed 6.1.0-9-amd64 now from the standard repositories and > graphics works. Hope this is sufficient to narrow it down Yep, now we know it's a regression between 6.1.27-1 and 6.1.38-2. https://wiki.debian.org/DebianKernel/GitBisect describes the best way as it would identify the exact (upstream) commit which introduced the problem. If you can do that, great. If not, we can try to make an educated guess me@pc:~/dev/kernel.org/linux$ git log --oneline v6.1.27..v6.1.38 -- drivers/gpu/drm/nouveau/ 62aecf23f3d1 drm/nouveau: add nv_encoder pointer check for NULL fb725beca62d drm/nouveau/dp: check for NULL nv_connector->native_mode 90748be0f4f3 drm/nouveau: don't detect DSM for non-NVIDIA device 5a144bad3e75 nouveau: fix client work fence deletion race This is the list of commits to the nouveau driver between those versions. I've attached 4 patches created with `git revert ` https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#id-1.6.6.4 describes a procedure for "Simple patching and building" and the idea is to pass these 4 patches as argument to `test-patches`. The idea is to build a new 6.1.38 kernel, but with the 4 above mentioned commits reverted and then boot into your new kernel and see if that resolves the issue (too). If that's the case, then it's 1 of those 4 commits that's causing the problem. Ideally that would be reduced to 1 specific patch, but there isn't one that jumps out for me. @Ben/Salvatore (=actual Debian kernel maintainers): Did I describe it correctly? And does `test-patches` need to be run when booted into the 6.1.38 kernel or does that not matter? Does 1 of those 4 patches/commits stand out for you as the most likely cause? Cheers, Diederik>From ffd112759014915ce769cb37ed1ce6e3184dde2a Mon Sep 17 00:00:00 2001 From: Diederik de Haas Date: Mon, 31 Jul 2023 19:55:33 +0200 Subject: [PATCH 1/4] Revert "drm/nouveau: add nv_encoder pointer check for NULL" This reverts commit 62aecf23f3d12f0a1b170bfd2174fd58d0d1bf50. --- drivers/gpu/drm/nouveau/nouveau_connector.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index f40310559d13..fd984733b8e6 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -730,8 +730,7 @@ nouveau_connector_detect_lvds(struct drm_connector *connector, bool force) #endif nouveau_connector_set_edid(nv_connector, edid); - if (nv_encoder) - nouveau_connector_set_encoder(connector, nv_encoder); + nouveau_connector_set_encoder(connector, nv_encoder); return status; } -- 2.40.1 >From 47c0e938beef7335ffa179f1006754f9664c6c4d Mon Sep 17 00:00:00 2001 From: Diederik de Haas Date: Mon, 31 Jul 2023 19:55:54 +0200 Subject: [PATCH 2/4] Revert "drm/nouveau/dp: check for NULL nv_connector->native_mode" This reverts commit fb725beca62d175c02ca619c27037c14f7ab8e7c. --- drivers/gpu/drm/nouveau/nouveau_connector.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index fd984733b8e6..1991bbb1d05c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -966,7 +966,7 @@ nouveau_connector_get_modes(struct drm_connector *connector) /* Determine display colour depth for everything except LVDS now, * DP requires this before mode_valid() is called. */ - if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS && nv_connector->native_mode) + if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS) nouveau_connector_detect_depth(connector); /* Find the native mode if this is a digital panel, if we didn't @@ -987,7 +987,7 @@ nouveau_connector_get_modes(struct drm_connector *connector) * "native" mode as some VBIOS tables require us to use the * pixel clock as part of the lookup... */ - if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS && nv_connector->native_mode) + if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS) nouveau_connector_detect_depth(connector); if (nv_encoder->dcb->type == DCB_OUTPUT_TV) -- 2.40.1 >From 07a2576f9fb4bb3ebb93593a4831b092105e622e Mon Sep 17 00:00:00 2001 From: Diederik de Haas Date: Mon, 31 Jul 2023 19:56:12 +0200 Subject: [PATCH 3/4] Revert "drm/nouveau: don't detect DSM for non-NVIDIA device" This reverts commit 90748be0f4f386ad3143cd7538ef37647e1f6260. --- drivers/gpu/drm/nouveau/nouveau_acpi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c index a2ae8c21e4dc..8cf096f841a9 100644 ---
Bug#1042753: nouveau: Screen remains black.
On Mon, 31 Jul 2023 at 13:09, Diederik de Haas wrote: On Monday, 31 July 2023 12:44:07 CEST Olaf Skibbe wrote: After upgrading to bookworm on a Dell Latitude E6510 with a "NVIDIA Corporation GT218M" graphic card, the screen remains black. Also switching to a console (Strg-Alt-F2) shows a black screen. Access via ssh is possible. When booting to the old kernel, the screen works as before. The old kernel is 5.10.X? Yes, the kernel referred to as "old" is 5.10.x. On https://snapshot.debian.org/binary/linux-image-amd64/ you can find a whole bunch of older 6.1 kernels. Can you try to see if one of them does work? If there is a 6.1 kernel that does work, then it helps if you can find the latest 6.1 kernel which works and (thus) the first kernel version where it stopped working. I installed 6.1.0-9-amd64 now from the standard repositories and graphics works. Hope this is sufficient to narrow it down, otherwise I'd test more kernels. (Would there be a simple way to add the snapshots to the repositories?) Thanks for taking care. Cheers, Olaf
Bug#1042753: nouveau: Screen remains black.
Control: tag -1 moreinfo On Monday, 31 July 2023 12:44:07 CEST Olaf Skibbe wrote: > Package: src:linux > Version: 6.1.38-2 > Severity: important > File: nouveau > > After upgrading to bookworm on a Dell Latitude E6510 with a "NVIDIA > Corporation GT218M" graphic card, the screen remains black. Also switching > to a console (Strg-Alt-F2) shows a black screen. Access via ssh is > possible. When booting to the old kernel, the screen works as before. The old kernel is 5.10.X? On https://snapshot.debian.org/binary/linux-image-amd64/ you can find a whole bunch of older 6.1 kernels. Can you try to see if one of them does work? If there is a 6.1 kernel that does work, then it helps if you can find the latest 6.1 kernel which works and (thus) the first kernel version where it stopped working. signature.asc Description: This is a digitally signed message part.
Bug#1042753: nouveau: Screen remains black.
Package: src:linux Version: 6.1.38-2 Severity: important File: nouveau X-Debbugs-Cc: n...@kravcenko.com Dear Maintainer, After upgrading to bookworm on a Dell Latitude E6510 with a "NVIDIA Corporation GT218M" graphic card, the screen remains black. Also switching to a console (Strg-Alt-F2) shows a black screen. Access via ssh is possible. When booting to the old kernel, the screen works as before. ~# uname -r 6.1.0-10-amd64 >From dmesg: ~# dmesg | grep -A 36 "cut here" [3.560151] [ cut here ] [3.560153] WARNING: CPU: 0 PID: 176 at drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c:460 nvkm_dp_acquire+0x26a/0x490 [nouveau] [3.560287] Modules linked in: sd_mod t10_pi sr_mod crc64_rocksoft cdrom crc64 crc_t10dif crct10dif_generic nouveau(+) ahci libahci mxm_wmi i2c_algo_bit drm_display_helper libata cec rc_core drm_ttm_helper ttm scsi_mod e1000e drm_kms_helper ptp firewire_ohci sdhci_pci cqhci ehci_pci sdhci ehci_hcd firewire_core i2c_i801 crct10dif_pclmul crct10dif_common drm crc32_pclmul crc32c_intel psmouse usbcore mmc_core crc_itu_t pps_core scsi_common i2c_smbus lpc_ich usb_common battery video wmi button [3.560322] CPU: 0 PID: 176 Comm: kworker/u16:5 Not tainted 6.1.0-10-amd64 #1 Debian 6.1.38-2 [3.560325] Hardware name: Dell Inc. Latitude E6510/0N5KHN, BIOS A17 05/12/2017 [3.560327] Workqueue: nvkm-disp nv50_disp_super [nouveau] [3.560433] RIP: 0010:nvkm_dp_acquire+0x26a/0x490 [nouveau] [3.560538] Code: 48 8b 44 24 58 65 48 2b 04 25 28 00 00 00 0f 85 37 02 00 00 48 83 c4 60 44 89 e0 5b 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc <0f> 0b c1 e8 03 41 88 6d 62 44 89 fe 48 89 df 48 69 c0 cf 0d d6 26 [3.560541] RSP: 0018:9899c048bd60 EFLAGS: 00010246 [3.560542] RAX: 00041eb0 RBX: 88e0209d2600 RCX: 00041eb0 [3.560544] RDX: c079f760 RSI: RDI: 9899c048bcf0 [3.560545] RBP: 0001 R08: 9899c048bc64 R09: 5b76 [3.560546] R10: 000d R11: 9899c048bde0 R12: ffea [3.560548] R13: 88e00b39e480 R14: 00044d45 R15: [3.560549] FS: () GS:88e123c0() knlGS: [3.560551] CS: 0010 DS: ES: CR0: 80050033 [3.560552] CR2: 7f57f4e90451 CR3: 00018141 CR4: 06f0 [3.560554] Call Trace: [3.560558] [3.560560] ? __warn+0x7d/0xc0 [3.560566] ? nvkm_dp_acquire+0x26a/0x490 [nouveau] [3.560671] ? report_bug+0xe6/0x170 [3.560675] ? handle_bug+0x41/0x70 [3.560679] ? exc_invalid_op+0x13/0x60 [3.560681] ? asm_exc_invalid_op+0x16/0x20 [3.560685] ? init_reset_begun+0x20/0x20 [nouveau] [3.560769] ? nvkm_dp_acquire+0x26a/0x490 [nouveau] [3.560888] nv50_disp_super_2_2+0x70/0x430 [nouveau] [3.560997] nv50_disp_super+0x113/0x210 [nouveau] [3.561103] process_one_work+0x1c7/0x380 [3.561109] worker_thread+0x4d/0x380 [3.561113] ? rescuer_thread+0x3a0/0x3a0 [3.561116] kthread+0xe9/0x110 [3.561120] ? kthread_complete_and_exit+0x20/0x20 [3.561122] ret_from_fork+0x22/0x30 [3.561130] [3.561131] ---[ end trace ]--- Cheers, Olaf -- Package-specific info: ** Version: Linux version 6.1.0-10-amd64 (debian-ker...@lists.debian.org) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-2 (2023-07-27) ** Command line: BOOT_IMAGE=/boot/vmlinuz-6.1.0-10-amd64 root=UUID=2024bc00-f8a8-4d97-a79d-f7840ae196e5 ro quiet ** Tainted: W (512) * kernel issued warning ** Kernel log: Unable to read kernel log; any relevant messages should be attached ** Model information sys_vendor: Dell Inc. product_name: Latitude E6510 product_version: 0001 chassis_vendor: Dell Inc. chassis_version: bios_vendor: Dell Inc. bios_version: A17 board_vendor: Dell Inc. board_name: 0N5KHN board_version: A02 ** Loaded modules: ctr ccm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device bnep btusb btrtl btbcm btintel btmtk bluetooth jitterentropy_rng drbg ansi_cprng ecdh_generic ecc uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc qrtr intel_powerclamp coretemp kvm_intel kvm irqbypass ghash_clmulni_intel sha512_ssse3 sha512_generic binfmt_misc iwldvm snd_hda_codec_idt mac80211 snd_hda_codec_generic snd_hda_codec_hdmi snd_hda_intel libarc4 dell_rbtn aesni_intel crypto_simd snd_intel_dspcfg cryptd snd_intel_sdw_acpi dell_laptop pcmcia ledtrig_audio snd_hda_codec iwlwifi dell_wmi snd_hda_core dell_smm_hwmon snd_hwdep sparse_keymap intel_cstate intel_uncore cfg80211 snd_pcm yenta_socket iTCO_wdt dell_smbios dcdbas intel_pmc_bxt wmi_bmof dell_wmi_descriptor at24 snd_timer pcmcia_rsrc iTCO_vendor_support pcspkr rfkill pcmcia_core watchdog snd soundcore dell_smo8800 ac acpi_cpufreq joydev evdev serio_raw sg firewire_sbp2 parport_pc ppdev lp parport fuse dm_mod efi_pstore