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

Discussion in 'Linux Virtual Machine' started by (GalaxyMaster), Feb 25, 2021.

  1. (GalaxyMaster)

    (GalaxyMaster) Hunter

    Messages:
    119
    Hi,
    Seems like that time of the year when I update to the shiny new kernel in my Arch and can no longer boot my VM came again. This time it took me quite a bit of time to fix all the incompatibilities (around 2.5 hours :( ), but I am up and running again. Attached is the patch against the latest Parallel Tools (as of this writing).
    It works for me, but I am providing this as-is, so use your own judgement.

    To apply the patch you need to unpack the "kmods/prl_mod.tar.gz" archive and then run "patch -p1 < /path/to/where/you/saved/parallels-tools-16.1.3.49160-kernel-5.11.1.diff". What to do next depends on your setup. You may repack the archive back and update using the official process (I never used it, so don't know how it works). If you are using DKMS, then you can just run "dkms add ." in that directory where you unpacked and patched files and it will add the modules to the current kernel.
     

    Attached Files:

    MikeV6, ShawnC4, Mark Fine and 2 others like this.
  2. (GalaxyMaster)

    (GalaxyMaster) Hunter

    Messages:
    119
    Just tested "suspend/resume", "copying files from/to shared folders", and "networking" -- seems to be working fine. There was a major rework in the video driver (since kernel devs cleaned up and re-did quite a few structures in DRM), so I was a bit concerned that my quick fix could affect the stability of the video driver. Well, so far it works OK (I even watched a YouTube video at the HD resolution to stress test the driver :) ).
     
    AndreyB3 likes this.
  3. SPX

    SPX Junior Member

    Messages:
    18
    @(GalaxyMaster) Does this work on the latest Kali Linux 2021.1?

    Is this the correct way:
    Install Kali 2021.1
    Install you patch
    Install Parallels tools
     
  4. (GalaxyMaster)

    (GalaxyMaster) Hunter

    Messages:
    119
    Honestly? I don't know since I am not running Kali Linux and I am not familiar what is the latest kernel over there. The distribution does not really matter, but the used kernel version does.
    Almost. The last two needs to be swapped since to patch something you need that something to be present. The patch is got Parallel Tools, hence you need to unpack them first, patch the source, repack it back, and then install.

    On my systems, I use DKMS to transparently re-install Parallel Tools each time I update the kernel, so if you are also using DKMS, then you just need to unpack the tools, patch them, and install the result through DKMS.
     
  5. MikeV6

    MikeV6 Bit poster

    Messages:
    8
    Thanks so much for this. I just got parallels and I was annoyed by the fact they won't support the video issues I'm having with Ubuntu 20.10's v5.8 kernel (getting a lot of kernel oopses surrounding drm and prl_vid).

    I imagine your patch won't work well on a 5.8 kernel (please let me know if you think otherwise), but can you offer any predictions as to how well this patch might work on Ubuntu Hirsuite Hippo (21.04)? I know Kali is a derivative and it's due to come out this month and will use 5.11, so my fingers are crossed.
     
  6. Mark Fine

    Mark Fine Pro

    Messages:
    482
    It should work on any kernel through 5.11.x and applies portions depending certain version criteria (> 5.7, > 5.8, > 5.9, etc.)
     
  7. MikeV6

    MikeV6 Bit poster

    Messages:
    8
    Oh, I skimmed the patch but maybe I did it too quickly. I saw a check was added in somewhere for 5.10, but didn't see the earlier versions checked.

    In any case, I went ahead and upgraded early to Ubuntu 21.04 last night. It doesn't seem to have fixed the video issue. I forget all the different things I tried and the outcomes, so I won't guess at them right now.

    I'll try again though and share give a better summary of what went wrong. I know this was shared as-is, but perhaps someone can point me in the right direction.

    I actually ended up just disabling loading of `prl_vid` and everything works okay now, if a little slow. (I need to check if 3D accel is working or if it's just that programs just now know that there's no 3D accel available).

    Only problem is -- strangely enough -- with my mouse cursor. I have an optical gaming mouse (though I don't game) and it seems like the mouse movements aren't being delivered fast enough or something. Anytime I move my cursor any meaningful distance, it will not be visible at all until around a second after I stop moving it. It makes it surprisingly hard to navigate through things.

    Any thoughts would be greatly appreciated
     
  8. Mark Fine

    Mark Fine Pro

    Messages:
    482
    Should have been a portion of it that checks for > 5.8 because part of it was to fix 5.9. The rest was mostly for 5.11.

    As far as disabling prl_vid... could be what's also causing the mouse problem. I thought prl_vid included hid i/o as well, so by disabling it you're not hooking any of the video, mouse, keyboard, etc. and it's all running au naturel. I could be wrong tho.

    On Fedora it works best if you use the Gnome classic setting at login, which has something to do with how it deals with the X server. I know that KDE/Plasma also works ok, but it doesn't do the Gnome/Wayland thing at all, and Cinnamon is so slow it's kind of worthless. Generally, the lighter the interface, the better. You might want to play with that and see if that helps.
     
    MikeV6 likes this.
  9. MikeV6

    MikeV6 Bit poster

    Messages:
    8
    Oops. Well in any case, I'm on 5.11 now and going back would be a pain.

    If true, that would be cosnsitent with what I'm seeing but (and granted I don't know much about Xorg's internals) a odd seeing as it's a video driver and there's a separate mouse driver file.

    So I just put back the prl_vid kernel mod and the cursor is working fine now, but I lost graphics acceleration. Unlike before I patched, I'm not seeing any kernel oopses (though I do see "
    Code:
    [    0.652044] ACPI Error: AE_NOT_FOUND, Evaluating _CRS (20201113/pci_link-259)
    " in my dmesg logs -- not sure what that's about or if it's related).

    Any thoughts on what to do now? One thing I'm seeing is this when my programs using accelerated graphics start:
    Code:
    libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
    Not sure how to resolve that though.
     
  10. (GalaxyMaster)

    (GalaxyMaster) Hunter

    Messages:
    119
    I have not tested this patch on anything below 5.11. I usually post a patch here every time I stumble on a broken Parallels Tools when I upgrade my kernels. There are threads for the patch for kernel 5.6, 5.9, and this one (for 5.11). They are covering kernels from 5.6 to the latest. So, for your 5.8 series, pick the patch from the 5.6 thread and it should work the best.
     
    MikeV6 likes this.
  11. MikeV6

    MikeV6 Bit poster

    Messages:
    8
    I got impatient and ended up just upgrading to the pre-release version of Ubuntu 21.04 that was slated for the end of the month.

    Your patch work great on that at least as far as I'm no longer getting Kernel-level errors. (So thanks!)

    The only problem I'm having now though is that hardware acceleration seems to be broken and unfortunately there isn't much to go on as for why now that the errors are gone.

    Can someone shed some light on what acceleration engine should work? (i.e. vdpau, vaapi, cuda, opencl). My VM seems to be trying vaapi a lot and failing, but not sure if that's because it fell through all other attempts.

    I'm also seeing this a ton, but it only seems to be discussed online in terms of issues with raspberry pi..
    Code:
    libEGL warning: DRI2: failed to authenticate
    In any case, can anyone tell me which engine I should be trying to get working? (And/or if it's likely to be connected to the kernel patch? I'm happy to start a new thread if not.)
     
  12. (GalaxyMaster)

    (GalaxyMaster) Hunter

    Messages:
    119
    @MikeV6, I think your issues with video are not related to the kernel modules/drivers, but are related to the way your Xorg is configured. I would double-check how Parallels Tools configured your libGL (the service script that does it is usually located at /usr/lib/parallels-tools/installer/prl-x11_sysv.sh). Also, keep in mind that, if I recall correctly, the only GUI subsystem PT supports is Xorg, so no Wayland :)
     
    MikeV6 and Mark Fine like this.
  13. (GalaxyMaster)

    (GalaxyMaster) Hunter

    Messages:
    119
    Parallels Tools 16.5.0 now support kernels 5.11, so my patch is no longer necessary. JFYI.
     
    MikeV6 and Mark Fine like this.
  14. MikeV6

    MikeV6 Bit poster

    Messages:
    8
    You're right, it seems. I tested with the new Parallel Tools as well as against a fresh install of Ubuntu 20.04 LTS (whose kernel had been supported for some time) and it didn't work even out of the box. I got this when I opened 1Password, the same issue I had on my normal VM.
    Screen Shot 2021-04-18 at 6.11.55 PM.png

    I'm not sure what to do at this point though. I've played with prl-opengl-switcher.sh to no avail, and I don't even have a working config to compare to. I'm not using Wayland either. I'm wondering at this point if it's a compatibility issue with my laptop's graphics card, because I feel like someone would have said something if it affected all Macs. (I have dual GPUs: AMD Radeon Pro 5300M 4 GB and Intel UHD Graphics 630 1536 MB.)

    I'm also learning that Parallels tech support is useless. I'll call in and I have never managed to stay on the line over 4 minutes without them disconnecting me.
     
  15. MikeV6

    MikeV6 Bit poster

    Messages:
    8
    Also, if it means anything, the issue seems to be only coming up in Electron apps thus far, but I think that's just because they expect HW acceleration to be on by default. Fortunately I can at least launch those with `--disable-gpu` but it's still annoying.

    The most frustrating part is that all the video stuff works *without* parallels tools, except then the cursor doesn't work.
     
  16. Mark Fine

    Mark Fine Pro

    Messages:
    482
    They'll just say they don't support Ubuntu 20.04 yet.
     
  17. MikeV6

    MikeV6 Bit poster

    Messages:
    8
    I mean they did that when I first contacted them re: 20.10. I haven't even gotten to the point where I tell them my OS in the support calls.

    I'm not optimistic it would get me any useful help, but they 20.04 is listed as supported.

    Unless someone here has suggestions I think I'm going to just give up and see if I can get a refund because this is kind of ridiculous.
     
  18. Mark Fine

    Mark Fine Pro

    Messages:
    482
    If I didn't have Windows (which actually gets better support) and Android VMs I'd be long gone.
    The Linux support used to be very good and this site had a guy that was very responsive to these issues. He (or she) likely left the company (or got promoted to something else) quite a while ago. It's been awful for Linux users ever since.
     
  19. MikeV6

    MikeV6 Bit poster

    Messages:
    8
    @Mark Fine that sucks. I came over from VMWare, which was fine except I was getting weird issues with USB pass thru.

    I could probably deal with just adding wrappers, around all the affected programs, but the dealbreaker is I can't even screenshot anything within the VM.

    The frustrating part is that the support is *almost* there (probably because the last person you mentioned was so good). Like I don't need the video module if only the cursor worked.

    I actually thought about getting a separate mouse to pass through directly to the VM, but I think I'm just going to switch to linux directly if I can. (This is a work laptop.)

    Parallels did give me a message back though (I sent them a really pissed off rant.) They want to schedule a time to call me. I guess I'll give that a try.

    Btw, does anyone know what their return policy is if I can't get this working? (I've only had this for maybe a month.)
     
  20. RayR2

    RayR2 Junior Member

    Messages:
    19
    I would suggest that Parallels Tools 16.5.0 does not fully work with 5.11 kernels. I can't seem to get it to install on Fedora 33 or Ubuntu 21.04 both running a 5.11 kernel. I even tried uninstalling Parallels tools from the 5.8 kernel version before upgrading and I still get an error from Parallels tools when trying to install it. Luckily I had a snapshot of Ubuntu 20.10 prior to upgrading it to 21.04. The tools seem to work with 5.8 with no issues.
     

Share This Page