prlvideo issues: driver does not play nice with xrandr

Discussion in 'Linux Guest OS Discussion' started by (GalaxyMaster), Apr 11, 2019.

  1. (GalaxyMaster)

    (GalaxyMaster) Kilo Poster

    I am running my work VM in a full screen mode with Retina resolution (3840x2400). However, I want my virtual screen to double the pixels, so I will get a comfortable 1920x1200 resolution.

    Sure, the first step was to use Parallels Desktop menu (View -> Retina Resulution -> Scaled), but the result is unsatisfactory since fonts are blurry and it is unpleasant to look at. OK, I looked at the processes and found that there is a service running inside the session that listens for the VM window resize and once that event is received that process does the resizing. The process is prlcc and it does quite a poor job in the HiDPI space. So, I switched it off. The rationale was that I am running this VM always in full screen and the resolution is going to be always the same.

    Now, I use the following command to actually do a proper scale up of the screen (with a recent change to xrandr it is no longer applies bicubicnor bilinear interpolation by default, so the result is supposed to be what it expected -- crisp fonts where each pixel is doubled):
    [galaxy@intruder ~]$ xrandr -d :0.0 -s 3840x2400 --output Virtual1 --scale 0.5
    to my surprise the virtual srcreen went haywire -- it was split into 4 equivalent sized areas, 2 of them were distorted, the top left was the actual view port, and the top right was a copy of the viewport, but you could not get your mouse pointer there.

    I looked at the logs and this is what I saw there:
    [  1493.145] (II) PRLVIDEO: Set Crtc screen size {3840x2400} -> {1920x1200}...
    [  1493.145] (II) PRLVIDEO: RMode: 1920x1200, dw 1920, bpp: 32, depth: 24, head=0, base=0x7f6f6b88a000
    [  1493.145] (II) PRLCONTROL: Reconfiguring virtual Heads (syncing with Xinerama)...
    [  1493.146] (II) PRLXINERAMA: Cliped Width for Virtual Screen 0 (from 3840 to 1920)
    [  1493.146] (II) PRLXINERAMA: Cliped Height for Virtual Head 0 (from 2400 to 1200)
    [  1493.146] (II) PRLXINERAMA: Xinerama Virtual Screen 0 (1920x1200, x=0, y=0)
    [  1493.146] (II) PRLCONTROL: Virtual Heads successfully configured.
    [  1493.146] (II) PRLVIDEO: VMode: 1920x1200
    [  1493.146] (II) PRLVIDEO: Set Crtc 0 video mode (3840x2400, x=0, y=0)...
    [  1493.147] (II) PRLVIDEO: Mode: 3840x2400
    [  1493.157] (II) PRLVIDEO: Set Head 0 mode 3840x2400
    The problem here is that for some reason PRLVIDEO engages PRLXINERAMA and clips the output, when the xrandr command simply said: "OK, you have 3840x2400 screen, let's render render everything double size ("--scale 0.5").

    Will it be possible to either fix the PRLVIDEO so it place nice with Xorg extensions like XRandR (which would be preferable :) ), or fix the scaling of the screen controlled by prlcc (I think the scaling is still performed inside PRLVIDEO) and do not apply any interpoltation (I suspect that PRLVIDEO does bicubic or bilinear interpolation) -- at least please make it optional, so people could switch that interpolation off.

    P.S. I think Parallels need to consider to abandon Xinerama in favour of XRandR: it is much more flexible and modern. Xinerama was replaced with XrandR in almost every setup in the last 9 years. It is so weird to see Xinerama being used in 2019 :)

  2. (GalaxyMaster)

    (GalaxyMaster) Kilo Poster

    It would be nice if Parallels at least acknowledged that they saw the reported issue. More than a month with no official comment is rather weird.
  3. (GalaxyMaster)

    (GalaxyMaster) Kilo Poster

    Please consider open sourcing the PRLVIDEO driver then community could actually improve it and provide much better support. I reverse engineered it a bit an got the configuration I wanted by binary patching the driver, but this is tedious. Your product is not cheap to commit that much time to run VMs with the modern graphics settings and if the situation does not improve by the end of my yearly subscription I will just migrate to a KVM solution, which would be a pity since I really like Parallels on macOS.
    ShawnC4 likes this.

Share This Page