Instructions on running mcx/mcxcl/mmc on NVIDIA/Intel/AMD hybrid GPU laptops

3 views
Skip to first unread message

Qianqian Fang

unread,
Mar 12, 2024, 5:06:00 PM3/12/24
to mcx-users, mmc-...@googlegroups.com

hi everyone,

I just added additional instructions in the README file of mcx for setting up mcx/mcxcl/mmc (or any CUDA program) on a modern hybrid GPU laptops. if you happen to use a hybrid GPU laptop, check it out


https://github.com/fangq/mcx/blob/9250a0db61f42fb35c4b38ff27b7750e3532f3c6/README.md?plain=1#L303-L344


my last two laptops I used for developing mcx are both hybrid graphics - that means it has a discrete NVIDIA GPU (2060 and 4070, respectively), and an integrated GPU (iGPU) - one laptop has an AMD Ryzen CPU with Renoir AMD iGPU, another with an Intel CPU+iGPU.

I have dual boot on both laptops - for Windows, as long as you applied the TdrDelay registry fix, mcx/mcxcl/mmc should be able to run - but it won't work if you don't change the registry.

for Linux - I had Ubuntu 22.04, I noticed that the AMD iGPU+NVIDIA GPU had no trouble running mcx on the NVIDIA card - nothing need to be changed. However, when I switched to the Intel iGPU+NVIDIA GPU, in the default setting (nvidia-prime is set in the hybrid mode), mcx/mcxcl/mmc can only run for a few seconds and the screen is frozen.

the fix to this is to make nvidia to be the primary GPU in NVIDIA X settings, or run


sudo prime-select nvidia


Even running in the performance mode, nvidia driver seems to have a known bug when using the newer 6.x linux kernels - that mcx may give you an error after the machine wakeup from sleep. I found many similar reports of this issue on nvidia's forums, including mine

https://forums.developer.nvidia.com/t/dev-nvidia-uvm-io-error-on-ubuntu-22-04-520-to-535-driver-versions/262153

so far, nvidia hasn't fixed this bug yet, a workaround is to run (close matlab if it is on)


sudo rmmod /dev/nvidia-uvm
sudo modprobe nvidia-uvm


if no error, this should make the nvidia card visible again.

anyhow, I just want to share this. On my other work desktops running either standalone or hybrid mode on older Linux (ubuntu 18.04, 20.04), they have zero issue.


Qianqian

Reply all
Reply to author
Forward
0 new messages