[patch] Support for kernel 5.11.1 (Parallels Tools 16.1.3.4960)

Discussion in 'Linux Guest OS Discussion' started by (GalaxyMaster), Feb 25, 2021.

  1. DerekE2

    DerekE2

    Messages:
    1
    This patch worked for me. I had to dust off some old linuxy cobwebs related to patching first. If anyone else is having trouble applying it without DKMS this is what I did:

    1. Mount the parallel-tools cd by going to Actions | Install Parallels Tools from the main menu on your MacOS host
    2. Copy the whole contents of the cd to your local hard drive (should be same dir where you downloaded the patch), it should be in something like /media/username/Parallels Tools
    3. go to the directory where you copied the files from Parallels Tools to
    4. go to the kmods directory
    5. extract prl_mod.tar.gz with something like tar zxf prl_mod.tar.gz
    6. apply the patch as GM originally suggested
      1. cd ..
      2. patch -p1 < parallels-tools-16.1.x.x-kernel-5.11.x.txt. (substitute the right version numbers for your specific patch)
      3. Pick the default response of [n] should you run into any parts of patch that were already applied
    7. After the patch has been applied rename prl_mod.tar.gz to something like prl_mod.tar.gz.orig
    8. Create a new tarball with the patched files
      1. cd kmods
      2. tar zcf prl_mod.tar.gz *
    9. At this point you have patched your local copy of the parallels-tools installer
    10. Go to the top level dir of the local installer, cd ..
    11. Run the install script, sudo ./install
    I hope this makes it a bit easier for the next one to run into this issue.

    And add one gripe point from me for the Parallels guys for making us go through this at all on a paid product that supposedly has support.

     
    RayR2 likes this.
  2. Mark Fine

    Mark Fine Kilo Poster

    Messages:
    280
    Ok... so that should have been 5.12.13 (vice 5.11.13) but all that is overcome by events because the most recent update is kernel 5.13.4 as of today, so naturally tools won't build against it. This is freaking futile how Parallels' Linux support staff doesn't test kernel betas. Always playing catch-up or DIY.
     
  3. Mark Fine

    Mark Fine Kilo Poster

    Messages:
    280
    First issue found with 5.13.4 is with how prl_kms_atomic* are no longer compatible pointers with drm:

    /var/lib/dkms/parallels-tools/16.5.1.49187/build/prl_vid/Video/Guest/Linux/kmod/prldrm.c:999:25: error: initialization of 'int (*)(s
    truct drm_plane *, struct drm_atomic_state *)' from incompatible pointer type 'int (*)(struct drm_plane *, struct drm_plane_state *)
    ' [-Werror=incompatible-pointer-types]
    999 | .atomic_check = prl_kms_atomic_check_plane_helper,
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /var/lib/dkms/parallels-tools/16.5.1.49187/build/prl_vid/Video/Guest/Linux/kmod/prldrm.c:999:25: note: (near initialization for 'prl
    _kms_primary_plane_helper_funcs.atomic_check')

    /var/lib/dkms/parallels-tools/16.5.1.49187/build/prl_vid/Video/Guest/Linux/kmod/prldrm.c:1000:26: error: initialization of 'void (*)
    (struct drm_plane *, struct drm_atomic_state *)' from incompatible pointer type 'void (*)(struct drm_plane *, struct drm_plane_state
    *)' [-Werror=incompatible-pointer-types]
    1000 | .atomic_update = prl_kms_atomic_update_primary_plane_helper,
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /var/lib/dkms/parallels-tools/16.5.1.49187/build/prl_vid/Video/Guest/Linux/kmod/prldrm.c:1000:26: note: (near initialization for 'pr
    l_kms_primary_plane_helper_funcs.atomic_update')

    /var/lib/dkms/parallels-tools/16.5.1.49187/build/prl_vid/Video/Guest/Linux/kmod/prldrm.c:1004:25: error: initialization of 'int (*)(
    struct drm_plane *, struct drm_atomic_state *)' from incompatible pointer type 'int (*)(struct drm_plane *, struct drm_plane_state *
    )' [-Werror=incompatible-pointer-types]
    1004 | .atomic_check = prl_kms_atomic_check_plane_helper,
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /var/lib/dkms/parallels-tools/16.5.1.49187/build/prl_vid/Video/Guest/Linux/kmod/prldrm.c:1004:25: note: (near initialization for 'pr
    l_kms_cursor_plane_helper_funcs.atomic_check')

    /var/lib/dkms/parallels-tools/16.5.1.49187/build/prl_vid/Video/Guest/Linux/kmod/prldrm.c:1005:26: error: initialization of 'void (*)
    (struct drm_plane *, struct drm_atomic_state *)' from incompatible pointer type 'void (*)(struct drm_plane *, struct drm_plane_state
    *)' [-Werror=incompatible-pointer-types]
    1005 | .atomic_update = prl_kms_atomic_update_cursor_plane_helper,
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /var/lib/dkms/parallels-tools/16.5.1.49187/build/prl_vid/Video/Guest/Linux/kmod/prldrm.c:1005:26: note: (near initialization for 'pr
    l_kms_cursor_plane_helper_funcs.atomic_update')
     
  4. (GalaxyMaster)

    (GalaxyMaster) Kilo Poster

    Messages:
    66
    The patch for 5.13 has been posted a week ago by @Evan123 in reply to your comment :). Anyhow, I just created a thread with a patch for 5.13 (my version is a bit cleaner, but essential is the same as Evan's). Additionally, I included a patch for the executable shared folders. I am writing this message from a system running 5.13.4, by the way :).
     
  5. Mark Fine

    Mark Fine Kilo Poster

    Messages:
    280
    Argh... You're right. For some reason I had 5.12.13 on the brain and have been super distracted.
     

Share This Page