gaoxiang12/slam_in_autonomous_driving

When the code enables UI, the system freezes.

UAVlover opened this issue · 10 comments

Recently, I got a new computer installed with the latest version of Ubuntu 20.04.6. When running a program that includes "tools/ui/pangolin_window.h" to draw the UI interface, the system freezes. If the UI is disabled in the program, the program can run normally and print output in the terminal. Programs that directly call the Pangolin library for visualization can visualize and run normally, and it is currently unclear what the reason is.

@UAVlover Yeah, same for my Yoga Pro 14s. I wonder if should be some hardware problems with OpenGL in the recent GPU cards.

@gaoxiang12 Thank you for your response, Dr. Gao. My new PC is a ThinkBook 16+ 2022, and I'm hoping that other guys who have same problem can write down their PC model here, which may help.

@gaoxiang12 Hello, Dr.Gao. I have found a useful way to deal with this problem.

  1. sudo vim /etc/default/grub
  2. find GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
  3. Then add "nomodeset" at the end, save, and exit. for example, GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
  4. sudo update-grub
  5. reboot
    After these operations, all programs can be executed well on my PC. You can check it on your PC. If it works well, maybe you can add this tip to the document, which could be helpful.

Hi, you can export LIBGL_ALWAYS_SOFTWARE=1, instead of adding "nomodeset" in /etc/default/grub. Hope it will help you.

@ForLoveandPeace Thanks. In fact, I have tested this method, as you mentioned. But, it didn't work on my PC.

I think I installed NVIDIA GPU for DL previously. Adding "nomodeset" does not work for me. export LIBGL_ALWAYS_SOFTWARE=1 solve the problem.

I think I installed NVIDIA GPU for DL previously. Adding "nomodeset" does not work for me. export LIBGL_ALWAYS_SOFTWARE=1 solve the problem.

@DrZhongCH Thanks for your comment. It's wired , I installed nvidia driver too. Anyway, your problem has been solved ! Our discussion would be helpful for other guys!

fongpd commented

My PC is colorful yx p16,when I run the first program of the book,my system was freezed.

I tried expoert LIBGL_ALWAYS_SOFTWARE =1 but failed,I wonder how....

I was running the program in a virtual machine, and neither of the above solutions worked