Linux kernel 5.8 & Desktop Video 11.6

Getting started with a Blackmagic product? Ask questions here about setup and installation.
  • Author
  • Message
Offline
User avatar

VennStone

  • Posts: 29
  • Joined: Sun Sep 29, 2019 6:50 pm
  • Location: Athens
  • Real Name: Ven Stone

Linux kernel 5.8 & Desktop Video 11.6

PostMon Aug 03, 2020 4:25 pm

Desktop Video works with kernel 5.6/7 but fails to build with with kernel 5.8.

Code: Select all
/var/lib/dkms/blackmagic/11.6a26/build/blackmagic_lib.c:674:31: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
  down_read(&current_task->mm->mmap_sem);
                               ^~~~~~~~
                               mmap_base
/var/lib/dkms/blackmagic/11.6a26/build/blackmagic_lib.c:695:29: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
  up_read(&current_task->mm->mmap_sem);
                             ^~~~~~~~
                             mmap_base


Looking forward to a fix.
Debian 9 / 10
Threadripper 1920X
NVIDIA 2060
Intensity Pro
Intensity Pro 4K
DeckLink Mini Recorder 4K
DeckLink Quad HDMI <- WARNING: Does not work with Threadripper.
Offline

nettings

  • Posts: 4
  • Joined: Wed Aug 12, 2020 5:57 pm
  • Real Name: Jörn Nettingsmeier

Re: Linux kernel 5.8 & Desktop Video 11.6

PostWed Aug 12, 2020 5:59 pm

Same here, openSUSE Tumbleweed on a Ryzen9 using a DeckLink Quad HDMI.
openSUSE Tumbleweed, Ryzen 9, DeckLink Quad HDMI, obs-studio, Ardour6
Offline

nettings

  • Posts: 4
  • Joined: Wed Aug 12, 2020 5:57 pm
  • Real Name: Jörn Nettingsmeier

Re: Linux kernel 5.8 & Desktop Video 11.6

PostWed Aug 12, 2020 9:06 pm

As per https://lkml.org/lkml/2020/6/4/180, I tried the following patch:

Code: Select all
nettings@roman:/var/lib/dkms/blackmagic/11.6a26/source> diff -urN blackmagic_lib.c~ blackmagic_lib.c
--- blackmagic_lib.c~   2020-07-09 12:08:00.000000000 +0200
+++ blackmagic_lib.c   2020-08-12 23:00:32.454094733 +0200
@@ -671,7 +671,8 @@
    else
       write = 0;
    
-   down_read(&current_task->mm->mmap_sem);
+//   down_read(&current_task->mm->mmap_sem);
+   mmap_read_lock(current_task->mm);
 #if KERNEL_VERSION_OR_LATER(4, 10, 0)
       if (current_task == current)
          ret = get_user_pages((unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL);
@@ -692,8 +693,9 @@
 #else
       ret = get_user_pages(current_task, current_task->mm, (unsigned long)ptr & PAGE_MASK, *nr_pages, write, 0, pages, NULL);
 #endif
-   up_read(&current_task->mm->mmap_sem);
-   
+//   up_read(&current_task->mm->mmap_sem);
+   mmap_read_unlock(current_task->mm);
+      
    if (ret < (long)*nr_pages)
    {
       dl_unmap_user_pages(pages, *nr_pages, 0);

The file in question now builds, but the dkms build bails out with
Code: Select all
DKMS make.log for blackmagic-11.6a26 for kernel 5.8.0-1-default (x86_64)
Wed 12 Aug 2020 11:00:37 PM CEST
make -C /lib/modules/5.8.0-1-default/build M=/var/lib/dkms/blackmagic/11.6a26/build
make[1]: Entering directory '/usr/src/linux-5.8.0-1-obj/x86_64/default'
  AR      /var/lib/dkms/blackmagic/11.6a26/build/built-in.a
  CC [M]  /var/lib/dkms/blackmagic/11.6a26/build/blackmagic_serial.o
  CC [M]  /var/lib/dkms/blackmagic/11.6a26/build/blackmagic_core.o
  CC [M]  /var/lib/dkms/blackmagic/11.6a26/build/blackmagic_lib.o
  SHIPPED /var/lib/dkms/blackmagic/11.6a26/build/bmd-support.o
  CC [M]  /var/lib/dkms/blackmagic/11.6a26/build/blackmagic_dma.o
  CC [M]  /var/lib/dkms/blackmagic/11.6a26/build/blackmagic_gate.o
  LD [M]  /var/lib/dkms/blackmagic/11.6a26/build/blackmagic.o
  MODPOST /var/lib/dkms/blackmagic/11.6a26/build/Module.symvers
/var/lib/dkms/blackmagic/11.6a26/build/.bmd-support.o.cmd: No such file or directory
make[3]: *** [/usr/src/linux-5.8.0-1/scripts/Makefile.modpost:116: /var/lib/dkms/blackmagic/11.6a26/build/Module.symvers] Error 1
make[2]: *** [/usr/src/linux-5.8.0-1/Makefile:1683: modules] Error 2
make[1]: *** [../../../linux-5.8.0-1/Makefile:185: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-5.8.0-1-obj/x86_64/default'
make: *** [Makefile:43: all] Error 2


I'm new to dkms, but I would expect the fix to be obvious to someone who isn't :) Help appreciated.

This is on a Ryzen 9 system running openSUSE Tumbleweed with Kernel 5.8.0 and a Decklink Quad HDMI.
openSUSE Tumbleweed, Ryzen 9, DeckLink Quad HDMI, obs-studio, Ardour6
Offline

nettings

  • Posts: 4
  • Joined: Wed Aug 12, 2020 5:57 pm
  • Real Name: Jörn Nettingsmeier

Re: Linux kernel 5.8 & Desktop Video 11.6

PostThu Aug 13, 2020 11:59 am

Ok, what I guess happens is that Blackmagic ships part of their modules as binary blobs named bmd-support.o_shipped and blackmagic.o_shipped.

Next guess: they are postfixed "_shipped" to protect them from "make clean".

Next gues: The kernel makefiles want to create .foo.cmd files, and somehow this fails for the binary blobs. But there is nothing to do for those pre-built files, they just make the build process barf.

Hack: create empty .foo.cmd files for all binary blobs by modifiying the Makefile for both modules, like so:

Code: Select all
roman:/usr/src/blackmagic-11.6a26 # diff -urB Makefile~ Makefile
--- Makefile~   2020-07-09 12:07:50.000000000 +0200
+++ Makefile   2020-08-13 13:41:54.660894689 +0200
@@ -40,6 +40,7 @@
 PWD       := $(shell pwd)
 
 all:
+   touch .bmd-support.o.cmd
    $(MAKE) -C $(KERNELDIR) M=$(PWD)
 
 clean:
roman:/usr/src/blackmagic-11.6a26 # cd ../blackmagic-io-11.6a26/
roman:/usr/src/blackmagic-io-11.6a26 # diff -urB Makefile~ Makefile
--- Makefile~   2020-07-09 12:07:50.000000000 +0200
+++ Makefile   2020-08-13 13:44:36.589472617 +0200
@@ -43,6 +43,7 @@
 PWD       := $(shell pwd)
 
 all:
+   touch .blackmagic.o.cmd
    $(MAKE) -C $(KERNELDIR) M=$(PWD)
 
 clean:


After this, I can successfully run
Code: Select all
sudo dkms build blackmagic/11.6a26
sudo dkms build blackmagic-io/11.6a26


The modules load ok after that. Further testing later today.
I hope that this information will enable the Blackmagic team to come up with proper support for 5.8 soon.
openSUSE Tumbleweed, Ryzen 9, DeckLink Quad HDMI, obs-studio, Ardour6
Offline

pwrzec

  • Posts: 1
  • Joined: Wed Aug 12, 2020 3:03 pm
  • Real Name: Piotr Wrzeciono

Re: Linux kernel 5.8 & Desktop Video 11.6

PostThu Aug 13, 2020 6:46 pm

I also use the openSUSE Tumbleweed with Kernel 5.8. Thank nettings - the all of your suggestions works very well!
openSUSE Tumbleweed, Ryzen 7 3700, Intensity Pro 4K, OBS Studio, Moodle, BigBlueButton, Ardour, Kdenlive
Offline

nettings

  • Posts: 4
  • Joined: Wed Aug 12, 2020 5:57 pm
  • Real Name: Jörn Nettingsmeier

Re: Linux kernel 5.8 & Desktop Video 11.6

PostThu Aug 13, 2020 7:19 pm

Should have mentioned that you can then install the successfully built modules with
Code: Select all
sudo dmks install blackmagic/11.6a26
sudo dkms install blackmagic-ui/11.6a26


Quick testing shows that the modules load ok, but for some reason I only see device 1 and 4. Will investigate further.
openSUSE Tumbleweed, Ryzen 9, DeckLink Quad HDMI, obs-studio, Ardour6
Offline
User avatar

VennStone

  • Posts: 29
  • Joined: Sun Sep 29, 2019 6:50 pm
  • Location: Athens
  • Real Name: Ven Stone

Re: Linux kernel 5.8 & Desktop Video 11.6

PostFri Aug 14, 2020 7:18 pm

Glad to see that you've made some progress on this!

Unfortunately I've had to pull the DeckLink Quad HDMI from our system since it's bugged on Threadripper sTRX4. It's a $500 brick at the moment.

No ETA on a fix but I've started switching things over to NDI.
Debian 9 / 10
Threadripper 1920X
NVIDIA 2060
Intensity Pro
Intensity Pro 4K
DeckLink Mini Recorder 4K
DeckLink Quad HDMI <- WARNING: Does not work with Threadripper.
Offline

Hoggins!

  • Posts: 5
  • Joined: Wed May 27, 2020 8:10 pm
  • Real Name: Nicolas Baron

Re: Linux kernel 5.8 & Desktop Video 11.6

PostSun Sep 06, 2020 9:24 pm

Hey,

Also experiencing issues with kernel 5.8 on Fedora boxes. Just out of curiosity: what kind of setup (hardware and software) are you using for your switch towards NDI?

Thanks!
Offline
User avatar

VennStone

  • Posts: 29
  • Joined: Sun Sep 29, 2019 6:50 pm
  • Location: Athens
  • Real Name: Ven Stone

Re: Linux kernel 5.8 & Desktop Video 11.6

PostTue Sep 08, 2020 5:21 pm

OBS NDI. Couple of Dell 3010 boxes feeding thought a CSS326-24G-2S+RM then coming into a Thread Ripper 1920X over the 10G fibre link.
Debian 9 / 10
Threadripper 1920X
NVIDIA 2060
Intensity Pro
Intensity Pro 4K
DeckLink Mini Recorder 4K
DeckLink Quad HDMI <- WARNING: Does not work with Threadripper.
Offline

wmendez

  • Posts: 16
  • Joined: Fri Dec 14, 2018 6:43 pm
  • Real Name: Will Mendez

Re: Linux kernel 5.8 & Desktop Video 11.6

PostTue Sep 08, 2020 5:28 pm

Good Day All,

Developers are aware of this issues and working on an upcoming Fix.

I suggest contacting them for official support.

I am running Fedora 32, Kernel 5.8.4-200 on a 32 Core HPZ820 160GB Ram, Intensity Pro 4K, Quadro RTX4000, 2TB HP Turbo Z Drive
For Media.


Sent from my iPhone using Tapatalk
Offline

Daniel Tufvesson

  • Posts: 200
  • Joined: Sun Sep 18, 2016 11:03 am
  • Location: Stockholm, Sweden

Re: Linux kernel 5.8 & Desktop Video 11.6

PostMon Sep 14, 2020 9:53 am

This saved me a lot of time. Suggested patches worked beautifully. Thank you!
Shoot - BMCC | BMPCC | BMPCC4K | BMVA | GH5
Edit - Resolve Studio 16.2.6 | Debian Linux 11 | i7-3930K CPU | X79 MB | 32GB RAM | GTX1080 GPU
Monitor - Decklink SDI | Decklink SDI Duo | Decklink SDI 4K | Intensity Pro
danieltufvesson.com/makeresolvedeb

Return to Getting Started

Who is online

Users browsing this forum: Google [Bot] and 9 guests