Kernel – 5.5-rc1 is Out. Breaks NVIDIA, but e1000e Finally Fixed?
Kernel 5.5-rc1 has been released, and brief details are here: http://lkml.iu.edu/hypermail/linux/kernel/1912.1/00242.html
From limited tests so far, the Intel e1000e driver now seems to be working for all Intel NICs that use it, on my various systems.
Patched VMware W/S 15.5.1 compiles OK, but NVIDIA 440.36 fails:
............
In file included from /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-440.36/kernel/nvidia-drm/nvidia-drm-drv.c:30:
/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-440.36/kernel/nvidia-drm/nvidia-drm-connector.h:30:10: fatal error: drm/drmP.h: No such file or directory
30 | #include <drm/drmP.h>
drmP.h has – finally – been removed in Kernel 5.5-rc1, but is still included in NV source:
nvidia-drm]$ grep drmP.h *
nvidia-drm-connector.h:#include <drm/drmP.h>
nvidia-drm-crtc.h:#include <drm/drmP.h>
nvidia-drm-drv.c:#include <drm/drmP.h>
nvidia-drm-encoder.h:#include <drm/drmP.h>
nvidia-drm-fb.h:#include <drm/drmP.h>
nvidia-drm-gem.h:#include <drm/drmP.h>
nvidia-drm-helper.c:#include <drm/drmP.h>
nvidia-drm-helper.h:#include <drm/drmP.h>
nvidia-drm-modeset.h:#include <drm/drmP.h>
nvidia-drm-os-interface.h:#include <drm/drmP.h>
nvidia-drm-prime-fence.h:#include <drm/drmP.h>
nvidia-drm-priv.h:#include <drm/drmP.h>
nvidia-drm-utils.h:#include <drm/drmP.h>
Tried a simple fix: removed all references, but then:
................
CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-440.36-55/kernel/nvidia-drm/nvidia-drm.o
In file included from /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-440.36-55/kernel/nvidia-drm/nvidia-drm.c:27:
/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-440.36-55/kernel/nvidia-drm/nvidia-drm-priv.h: In function ‘to_nv_device’:
/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-440.36-55/kernel/nvidia-drm/nvidia-drm-priv.h:114:15: error: dereferencing pointer to incomplete type ‘struct drm_device’
114 | return dev->dev_private;
| ^~
make[2]: *** [scripts/Makefile.build:266: /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-440.36-55/kernel/nvidia-drm/nvidia-drm.o] Error 1
make[1]: *** [Makefile:1692: /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-440.36-55/kernel] Error 2
make[1]: Leaving directory '/usr/src/linux-5.5-rc1'
make: *** [Makefile:81: modules] Error 2
So.. a proper patch will be needed!
Robert Gadsdon December 8th, 2019.
Yes, module for vmware 15.5.1 building against linux-5.5, but wmware is not working at all, because the service can’t start.
I briefly tested patched VMware 15.5.1 on a non-NVIDIA system, with kernel 5.5-rc1, and it appears to be working OK (tested with Windows client VM)
RG.
I’ve made an _experimental_ patch. However, please note that I’ve not actually booted with it yet, and I probably won’t be until later on. I’ve got some other kinks I need to work out before that. Still, the driver at least compiles fine on my end.
The patch assumes you’ve got DRM support, as well as atomic modeset. That’s because it — the removal of the checks in conftest.sh — was the faster way of fixing a few of the compilation errors.
Patch: https://gitlab.com/snippets/1921156
Thanks. I applied the patch to NV 440.36, on kernel 5.5-rc1, but the compile failed:
In file included from /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-440.36/kernel/common/inc/nv-drm.h:7,
from /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-440.36/kernel/nvidia-drm/nvidia-drm-priv.h:30,
from /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-440.36/kernel/nvidia-drm/nvidia-drm.c:27:
./include/drm/drmP.h:72:10: fatal error: drm/drm_os_linux.h: No such file or directory
72 | #include
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
RG
It looks like you’ve got a stray copy of “drm/drmP.h” in your Linux headers. There’s no references to the “drm_os_linux.h” header, at all, on my end, including the sources for the 5.5-rc1 tree.
The conftest.sh script checks for the presence of the “drm/drmP.h” header, and if it finds it, includes it via the new “nv-drm.h” header. Either remove the header (drmP.h) from your headers, or comment out the relevant part in the NVIDIA “kernel/common/inc/nv-drm.h” header. Though that approach might cause other things to break instead.
My apologies, I had forgotten I had a copy of /drm/drmP.h in the tree from earlier testing (which failed..). After removal, the compile completed OK.
I was able to get the usual Plasma/KDE desktop, and VMware worked OK, during a brief test.
I did get a ‘tombstone’ on the console:
————[ cut here ]————
refcount_t: underflow; use-after-free.
WARNING: CPU: 1 PID: 14474 at lib/refcount.c:28 refcount_warn_saturate+0xa6/0xf0
Modules linked in: rfcomm cmac bnep btusb btrtl btbcm btintel bluetooth uvcvideo snd_usb_audio videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common ecdh_generic snd_usbmidi_lib ecc snd_rawmidi videodev mc hid_logitech_hidpp joydev hid_logitech_dj nvidia_drm(PO) nvidia_modeset(PO) nvidia(PO) drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm vmnet(O) vmw_vsock_vmci_transport vsock vmw_vmci vmmon(O) sunrpc vfat fat snd_hda_codec_hdmi iTCO_wdt x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass iTCO_vendor_support snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio crct10dif_pclmul crc32_pclmul snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hda_core snd_hwdep ghash_clmulni_intel intel_cstate hp_wmi snd_seq snd_seq_device intel_uncore sparse_keymap rfkill i2c_i801 snd_pcm pcspkr intel_rapl_perf wmi_bmof snd_timer lpc_ich snd soundcore tpm_infineon binfmt_misc crc32c_intel serio_raw e1000e wmi video fuse
CPU: 1 PID: 14474 Comm: Xorg.wrap Tainted: P O 5.5.0-rc1 #1
Hardware name: Hewlett-Packard HP Compaq Elite 8300 CMT/3396, BIOS K01 v03.07 05/10/2018
RIP: 0010:refcount_warn_saturate+0xa6/0xf0
Code: 05 d4 82 cf 00 01 e8 c7 04 d1 ff 0f 0b c3 80 3d c2 82 cf 00 00 75 95 48 c7 c7 70 b1 db a1 c6 05 b2 82 cf 00 01 e8 a8 04 d1 ff <0f> 0b c3 80 3d a1 82 cf 00 00 0f 85 72 ff ff ff 48 c7 c7 c8 b1 db
RSP: 0018:ffff9fba436f3da0 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff8ec10dc9d300 RSI: ffff8ec10dc98748 RDI: ffff8ec10dc98748
RBP: ffff8ec109658ce8 R08: 0000000000000000 R09: 000000000000040b
R10: 0000000000aaaaaa R11: 0000000000000000 R12: ffff8ec1062ec2e8
R13: ffff8ec1062ec000 R14: 0000000000000008 R15: 0000000000000000
FS: 00007f3fadf6e740(0000) GS:ffff8ec10dc80000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3fadfc2e20 CR3: 000000036e38c001 CR4: 00000000001606e0
Call Trace:
nv_drm_atomic_helper_disable_all+0xe7/0x280 [nvidia_drm]
nv_drm_master_drop+0x1d/0x60 [nvidia_drm]
drm_drop_master+0x19/0x30 [drm]
drm_master_release+0x8c/0xb0 [drm]
drm_file_free.part.0+0x24a/0x2c0 [drm]
drm_release+0x46/0x80 [drm]
__fput+0xbc/0x250
task_work_run+0x84/0xa0
exit_to_usermode_loop+0x95/0xa0
do_syscall_64+0x1bc/0x210
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f3fae14d8e7
Code: 64 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 41 c3 48 83 ec 18 89 7c 24 0c e8 e3 fb ff ff
RSP: 002b:00007ffe6c5ea898 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 00007f3fae14d8e7
RDX: 00007ffe6c5ea8b0 RSI: 00000000c04064a0 RDI: 0000000000000003
RBP: 00007ffe6c5ea990 R08: 0000000000000000 R09: 00007ffe6c5ea720
R10: 000055d64daf8731 R11: 0000000000000246 R12: 0000000000000003
R13: 0000000000000001 R14: 0000000000000000 R15: 00007ffe6c5ea8b0
—[ end trace 8771f4b59639bc56 ]—
– but the desktop still seemed to be working..
RG.
The patch also works with the new nvidia 440.44 but, of course, you have to apply the changes manually because the lines don’t match. Now that I’ve tested it maybe it could be adjusted?
I’ve still not booted a system with the 5.5 release candidate myself, but I’m glad the patch seems to work.
The patch _should_ apply without any problems, just some “Hunk #x succeeded at y (offset z lines).” messages. That said, I have an updated patch (See “Update #2” on the original link) that I’ve simply rebased onto the 440.44 version of the driver.
Also, using the original patch, do you also get the same underflow warning that RG got?
I haven’t had any warnings once I got the full patch applied. With the 440.36 I applied the patch to the .run file but it wouldn’t load the nv-drm.h file so I had to extract the .run and add the nv-drm.h manually.
The 440.44 worked perfectly once I got the manual changes made correctly. I tried about 3 times and kept finding parts of the patch I’d missed.
I’ve been working on a patch at the moment but I’m not quite there so I’ll leave it if you’ve got it going. I haven’t actually created a patch on this scale before so I’m not totally confident of success any time soon.
I was able to apply your new patch directly to the nvidia.run file and it works without a hitch on 5.5-rc2. I discovered that if I removed the a/ and the b/ in the patch everything including the new file (nv-derm.h) applies. I don’t know why I hadn’t worked that out before!
Thanks for your patch-work.