ROS RViz OpenGL Problem on Ubuntu 20.04

Discussion in 'Linux Virtual Machine' started by AlexanderK26, Nov 26, 2020.

  1. MaciejT1

    MaciejT1 Bit poster

    Messages:
    5
    The same problem here on mac m1. I can get away with Rviz by disabling the 3D acceleration option but it would be nice if Rviz worked with this feature.
    Please fix that Parallels.
     
  2. forgetlight

    forgetlight Bit poster

    Messages:
    6
    Hi everyone, it seems I found a solution to fix it! But I'm not sure it's due to I just upgraded to Mac OS 12.2 public beta since I recall I tried this command before. Anyway, enable the 3d acceleration before booting up your linux VM, then use the command
    export LIBGL_ALWAYS_SOFTWARE=1
    I then can successfully use Gazebo and Rviz with 3D acceleration enabled. I can see the fps in the application are higher than disabling the 3d acceleration and GPU utilization is also higher from mac task monitor.
    But it's a bit confusing to me since that variable should enforce all libgl rending to be software.
     
    MaciejT1 and Jean-MichelL1 like this.
  3. Jean-MichelL1

    Jean-MichelL1 Bit poster

    Messages:
    3
    Thank you! that is a first step, but I still get around 12-15 fps for widdow garage on gazebo (I use it to compare to my windows laptop) The power I have with an M1Pro should EASILY get me around 60 fps.. but I'm happy I can keep 3d acceleration enabled and still use gazebo and Rviz :)
     
  4. forgetlight

    forgetlight Bit poster

    Messages:
    6
    I also really hope that could be resolved in the lastest version. By enabling that variable, it's essentially just enforcing software rendering for any program opened in that terminal. From kernel message(dmesg), it's clearly a kernel conflict with the new graphic virgl used by parallel team.
    [drm:virtio_gpu_dequeue_ctrl_func [virtio_gpu]] *ERROR* response 0x1200 (command 0x207)
    They haven't updated the software for around 2 months and hopefully, they could come up with a solution.
     
  5. HaowenS

    HaowenS Bit poster

    Messages:
    1
    +1 please fix this. This would dramatically improve my workflow
     
  6. MaciejT1

    MaciejT1 Bit poster

    Messages:
    5
    That worded for me too! Thanks for that! I wish this was somehow internally fixed by Parallels guys.
     
    forgetlight likes this.
  7. forgetlight

    forgetlight Bit poster

    Messages:
    6
    Hi everyone,
    I finally managed to solve this issue without using the LIBGL_ALWAY_SOFTWARE which sacrifices the wonderful graphic power from M1 Pro/Max chips.
    Firstly, if you've already exported the LIBGL_ALWAY_SOFTWARE variable to 1 in the terminal or in the .bashrc file, please comment it out or set it back to 0 or unset it.
    Then either set the OGRE_RTT_MODE manually as below or put it in the .bashrc file.
    export OGRE_RTT_MODE=Copy
    It permanently solves everything, I can get pretty good fps in very complicated Gazebo simulation, stably 60fps, as compared to only 8fps with software rendering enforced.
    Cheers, and enjoy it!
    PS: I really can't believe how bad does Parallel team handles this. I raised 2 tickets about this issue to the support team but they didn't reach back to me until after 2 weeks. The reply is like nothing helpful, one of which let me re-install the Parallel tools but with the link for the Windows machine. I stated so clearly it happened on Linux Guest OS and also the kernel error message.. Really nothing to say about it.
     
    CO_ and MaciejT1 like this.
  8. MaciejT1

    MaciejT1 Bit poster

    Messages:
    5
    That works for me too. Thanks!
     
  9. serv

    serv Forum Maven

    Messages:
    817
    Black screen in ROS/rviz on ARM is fixed in Parallels Desktop 17.1.2, software renderer workaround should not be required any more.
     
  10. MaciejT1

    MaciejT1 Bit poster

    Messages:
    5
    Unfortunately, this does not work anymore. I tested RVIZ recently and displaying anything stops after a couple of secs. I had to resort to `export LIBGL_ALWAYS_SOFTWARE=1`.

    Could you Parallels guys fix that, please?
     
  11. ChristophK10

    ChristophK10 Bit poster

    Messages:
    1
    "export OGRE_RTT_MODE=Copy" with "export LIBGL_ALWAYS_SOFTWARE=0" doesn't work in Parallels 18.0.1
    Only "export LIBGL_ALWAYS_SOFTWARE=1" works but again very low fps
     
  12. MaciejT1

    MaciejT1 Bit poster

    Messages:
    5
    More specifically, displaying works well when I do not hover a mouse over the RVIZ display. However, once I move the pointer onto the display, then the display stops working immediately.
     
  13. CO_

    CO_ Bit poster

    Messages:
    1
    Same issue here unfortunately.
     

Share This Page