You are not logged in.

#1 2017-11-08 12:44:54

stupidus
Member
Registered: 2012-02-27
Posts: 124

Nouveau causing errors with linux-4.13 on Optimus setup

I have a Thinkpad T420 with an Optimus setup. I am not actually using the discrete nvidia card, except for the fact that the DisplayPort is hardwired to it. So I am using the reverse Prime setup to be able to use the displayport. This was working well up to linux-4.12.
Ever since I upgraded to 4.13 it does not work anymore. The laptop boots without any issues if I do not connect the Displayport at boot. However, if I connect a monitor to the Displayport at boot, the dmesg output is full of nouveau related errors, and the display connected via displayport stays black. I also tried to boot without connecting the Displayport and connecting it afterwards.

This is the dmesg output after connecting a monitor to the Displayport and calling xrandr to activate it. I also have full dmesg outputs of a boot with and without the Displayport connected, but the following looks very similar to a diff of those two, so I assume it is the actually relevant part.

[  512.814696] nouveau 0000:01:00.0: DRM: resuming object tree...
[  512.988415] thinkpad_acpi: EC reports that Thermal Table has changed
[  512.989648] nouveau 0000:01:00.0: DRM: resuming fence...
[  512.989650] nouveau 0000:01:00.0: DRM: resuming display...
[  512.989673] nouveau 0000:01:00.0: DRM: resuming console...
[  518.580102] ACPI Warning: \_SB.PCI0.PEG.VID._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170531/nsarguments-95)
[  518.581042] ACPI Warning: \_SB.PCI0.PEG.VID._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20170531/nsarguments-95)
[  518.581292] nouveau 0000:01:00.0: DRM: suspending console...
[  518.581295] nouveau 0000:01:00.0: DRM: suspending display...
[  518.581307] nouveau 0000:01:00.0: DRM: evicting buffers...
[  518.581309] nouveau 0000:01:00.0: DRM: waiting for kernel channels to go idle...
[  518.581310] nouveau 0000:01:00.0: DRM: suspending fence...
[  518.581311] nouveau 0000:01:00.0: DRM: suspending object tree...
[  518.797436] thinkpad_acpi: EC reports that Thermal Table has changed
[  525.561374] thinkpad_acpi: EC reports that Thermal Table has changed
[  525.561560] nouveau 0000:01:00.0: DRM: resuming object tree...
[  525.736146] nouveau 0000:01:00.0: DRM: resuming fence...
[  525.736148] nouveau 0000:01:00.0: DRM: resuming display...
[  525.736173] nouveau 0000:01:00.0: DRM: resuming console...
[  525.858968] BUG: unable to handle kernel NULL pointer dereference at           (null)
[  525.859010] IP:           (null)
[  525.859025] PGD 0 
[  525.859026] P4D 0 

[  525.859054] Oops: 0010 [#1] PREEMPT SMP
[  525.859070] Modules linked in: ccm overlay uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core videodev media joydev mousedev zram snd_hda_codec_conexant snd_hda_codec_generic iTCO_wdt iTCO_vendor_support wmi_bmof intel_rapl x86_pkg_temp_thermal intel_powerclamp snd_hda_intel arc4 kvm_intel snd_hda_codec kvm nouveau iwldvm mac80211 irqbypass crct10dif_pclmul snd_hda_core crc32_pclmul ghash_clmulni_intel pcbc ipt_REJECT iwlwifi nf_reject_ipv4 nf_log_ipv4 nf_log_common xt_LOG aesni_intel snd_hwdep aes_x86_64 crypto_simd glue_helper cryptd intel_cstate intel_rapl_perf cfg80211 xt_limit xt_tcpudp snd_pcm psmouse input_leds xt_addrtype mxm_wmi ttm thinkpad_acpi e1000e nvram lpc_ich snd_timer ptp nf_conntrack_ipv4 pps_core nf_defrag_ipv4 shpchp i2c_i801 xt_conntrack snd soundcore
[  525.859338]  wmi rfkill tpm_tis thermal tpm_tis_core tpm ac battery evdev ip6_tables mac_hid nf_conntrack_netbios_ns nf_conntrack_broadcast nf_nat_ftp nf_nat nf_conntrack_ftp nf_conntrack libcrc32c crc32c_generic iptable_filter sch_fq_codel vboxnetadp(O) pci_stub vboxpci(O) vboxnetflt(O) vboxdrv(O) msr coretemp sg acpi_call(O) ip_tables x_tables ext4 crc16 mbcache jbd2 fscrypto sr_mod cdrom sd_mod hid_generic usbhid hid serio_raw atkbd libps2 ahci libahci crc32c_intel libata scsi_mod sdhci_pci sdhci firewire_ohci ehci_pci led_class ehci_hcd firewire_core mmc_core crc_itu_t usbcore usb_common i8042 serio i915 video button intel_gtt i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm agpgart
[  525.859586] CPU: 3 PID: 22466 Comm: kworker/u16:1 Tainted: G     U     O    4.13.11-1-ARCH #1
[  525.859616] Hardware name: LENOVO 4180PH3/4180PH3, BIOS 83ET79WW (1.49 ) 09/05/2016
[  525.859668] Workqueue: nvkm-disp gf119_disp_super [nouveau]
[  525.859690] task: ffff8eed4aa75a00 task.stack: ffffb67a4bf9c000
[  525.859712] RIP: 0010:          (null)
[  525.859727] RSP: 0018:ffffb67a4bf9fc18 EFLAGS: 00010206
[  525.859748] RAX: ffffffffc0d8bee0 RBX: 0000000000000000 RCX: 0000000000000016
[  525.859774] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8eedb2ea0a20
[  525.859801] RBP: ffffb67a4bf9fca0 R08: 0000000000000000 R09: 0000000000000000
[  525.859827] R10: 0000000000000000 R11: 0000000000001000 R12: 0000000000000000
[  525.859853] R13: 0000000000000000 R14: ffff8eedb23f7e00 R15: ffffb67a4bf9fd40
[  525.859879] FS:  0000000000000000(0000) GS:ffff8eedbe2c0000(0000) knlGS:0000000000000000
[  525.859909] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  525.859930] CR2: 0000000000000000 CR3: 0000000213a09000 CR4: 00000000000406e0
[  525.859957] Call Trace:
[  525.859986]  ? nvkm_dp_train_drive+0x183/0x2c0 [nouveau]
[  525.860022]  nvkm_dp_acquire+0x4f3/0xcd0 [nouveau]
[  525.860057]  nv50_disp_super_2_2+0x5d/0x470 [nouveau]
[  525.860091]  ? nvkm_devinit_pll_set+0xf/0x20 [nouveau]
[  525.860125]  gf119_disp_super+0x19c/0x2f0 [nouveau]
[  525.860147]  process_one_work+0x1de/0x430
[  525.860164]  worker_thread+0x48/0x400
[  525.860181]  kthread+0x125/0x140
[  525.860195]  ? process_one_work+0x430/0x430
[  525.860213]  ? kthread_create_on_node+0x70/0x70
[  525.860232]  ret_from_fork+0x25/0x30
[  525.860247] Code:  Bad RIP value.
[  525.860264] RIP:           (null) RSP: ffffb67a4bf9fc18
[  525.860284] CR2: 0000000000000000
[  525.866333] ---[ end trace 95211f42af01ac46 ]---
[  527.856887] nouveau 0000:01:00.0: DRM: EVO timeout
[  529.856885] nouveau 0000:01:00.0: DRM: base-0: timeout
[  531.866252] nouveau 0000:01:00.0: DRM: base-0: timeout

I am booting with the following parameters:

i915.enable_rc6=7 i915.lvds_downclock=1 i915.i915_enable_fbc=1 i915.semaphores=1 ipv6.disable=1 nmi_watchdog=0 intel_iommu=off nouveau.noaccel=1 quiet rw

The intel_iommu and the nouveau.noaccel parameters were added by me after updating to linux-4.13 in an attempt to fix the issue. However, it did not help.

Offline

#2 2017-11-08 13:00:05

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: Nouveau causing errors with linux-4.13 on Optimus setup

Offline

#3 2017-11-08 13:14:10

stupidus
Member
Registered: 2012-02-27
Posts: 124

Re: Nouveau causing errors with linux-4.13 on Optimus setup

Looking at the kernel log in that bug report, it seems to be related.

Offline

#4 2017-11-08 19:48:19

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: Nouveau causing errors with linux-4.13 on Optimus setup

You could verify the issue is the same by bisecting the kernel or build af85389c614ae04970c0eea7a5c50fb889c8a480 which should have the issue then build its parent which should not have the issue.

Offline

#5 2017-11-09 12:44:03

stupidus
Member
Registered: 2012-02-27
Posts: 124

Re: Nouveau causing errors with linux-4.13 on Optimus setup

I have never built a kernel before. Is it as easy as taking the linux PKGBUILD and replacing the sources with git+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git#commit=af85389c614ae04970c0eea7a5c50fb889c8a480 and then running makepkg?

Offline

#6 2017-11-10 00:05:48

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: Nouveau causing errors with linux-4.13 on Optimus setup

Almost use https://aur.archlinux.org/packages/linux-git/ then yes either use#commit=whatever or you could omit it from that step then use

makepkg -o # download the sources
cd src/linux # change directory into the cloned repo
git checkout whatever # perform the checkout here instead of the PKGBUILD
cd ../.. # change back to the PKGBUILD directory
makepkg -e # make the package using the existing sources meaning the commit that was just checked out

Offline

#7 2017-11-10 16:45:46

stupidus
Member
Registered: 2012-02-27
Posts: 124

Re: Nouveau causing errors with linux-4.13 on Optimus setup

I managed to build the kernels, and the error messages do indeed disappear using the parent of that commit. However, the output with the parent kernel is still not working correctly, there are graphics glitches, and the output does not change, as in I can't see the cursor moving or anything. However, I am not sure, if that might just be related to some mistake I could have made while building the kernel.

Last edited by stupidus (2017-11-10 16:46:01)

Offline

#8 2017-11-10 17:44:52

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: Nouveau causing errors with linux-4.13 on Optimus setup

If there was output from the displayport on the parent of the commit but not the commit itself I would say you you have confirmed that commit causes displayport output to fail.
There would appear to be other issues introduced by earlier commits that may or may not be related.  You could try bisecting between 4.12 and the parent commit to find the last commit
that does not have any issues with the display port.  https://bbs.archlinux.org/viewtopic.php … 5#p1747625  covers kernel bisecting.

Offline

Board footer

Powered by FluxBB