huan / docker-wechat

DoChat is a Dockerized WeChat (盒装微信) PC Windows Client for Linux
https://hub.docker.com/r/zixia/wechat
Apache License 2.0
2.23k stars 199 forks source link

[Ubuntu 22.04 LTS] Can't launch wechat app (load library failed: libnvidia-ml.so.1) #180

Open sakurawald opened 1 year ago

sakurawald commented 1 year ago
teeth@teeth:~$ sudo curl -sL https://gitee.com/mirrors/dochat/raw/main/dochat.sh | bash

       ____         ____ _           _
      |  _ \  ___  / ___| |__   __ _| |_
      | | | |/ _ \| |   | '_ \ / _` | __|
      | |_| | (_) | |___| | | | (_| | |_
      |____/ \___/ \____|_| |_|\__,_|\__|

      https://github.com/huan/docker-wechat

                +--------------+
               /|             /|
              / |            / |
             *--+-----------*  |
             |  |           |  |
             |  |   盒装    |  |
             |  |   微信    |  |
             |  +-----------+--+
             | /            | /
             |/             |/
             *--------------*

      DoChat /dɑɑˈtʃæt/ (Docker-weChat) is:

      📦 a Docker image
      🤐 for running PC Windows WeChat
      💻 on your Linux desktop
      💖 by one-line of command

🚀 Pulling the docker image...

3.3.0.115: Pulling from zixia/wechat
Digest: sha256:851ef44dcbdaed6f0db8f538ea2a29d713292347a54ee711225f77682417673b
Status: Image is up to date for zixia/wechat:3.3.0.115
docker.io/zixia/wechat:3.3.0.115

🚀 Pulling the docker image done.
WARNING: you should run this program as super-user.
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.
🚀 Starting DoChat /dɑɑˈtʃæt/ ...

docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown.
teeth@teeth:~$ 
teeth@teeth:~$ neofetch
            .-/+oossssoo+/-.               teeth@teeth 
        `:+ssssssssssssssssss+:`           ----------- 
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 22.04 LTS x86_64 
    .ossssssssssssssssssdMMMNysssso.       Host: 82DN Lenovo XiaoXinPro-13IML 2 
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 5.15.0-39-generic 
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 51 mins 
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 3033 (dpkg), 16 (snap) 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 5.1.16 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 1920x1080 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: GNOME 42.1 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Mutter 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Adwaita 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Yaru [GTK2/3] 
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Yaru [GTK2/3] 
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: x-terminal-emul 
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: Intel i7-10710U (12) @ 1.100GHz 
    .ossssssssssssssssssdMMMNysssso.       GPU: Intel Comet Lake UHD Graphics 
      -+sssssssssssssssssyyyssss+-         GPU: NVIDIA GeForce MX350 
        `:+ssssssssssssssssss+:`           Memory: 6931MiB / 15829MiB 
            .-/+oossssoo+/-.

teeth@teeth:~$ 
xros commented 8 months ago

I have similar issues. The error log was a little different though.

docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

Here's the settings of the system.

            .-/+oossssoo+/-.               someone@workstation 
        `:+ssssssssssssssssss+:`           --------------------- 
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 22.04.3 LTS x86_64 
    .ossssssssssssssssssdMMMNysssso.       Host: host 
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 6.2.0-36-generic 
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 19 hours, 31 mins 
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 2184 (dpkg), 14 (snap) 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 5.1.16 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 4096x1728 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: GNOME 42.9 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Mutter 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Adwaita 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Yaru [GTK2/3] 
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Yaru [GTK2/3] 
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: gnome-terminal 
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: Intel i9-9900K (16) @ 5.000GHz 
    .ossssssssssssssssssdMMMNysssso.       GPU: NVIDIA GeForce RTX 2080 Ti Rev. A 
      -+sssssssssssssssssyyyssss+-         GPU: Intel CoffeeLake-S GT2 [UHD Graphics 630] 
        `:+ssssssssssssssssss+:`           Memory: 8876MiB / 15851MiB 
            .-/+oossssoo+/-.

Is it because that the PC has 2 GPUs enabled, one Nvidia and one Integrated Intel?

sakurawald commented 8 months ago

I have similar issues. The error log was a little different though.

docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

Here's the settings of the system.

            .-/+oossssoo+/-.               someone@workstation 
        `:+ssssssssssssssssss+:`           --------------------- 
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 22.04.3 LTS x86_64 
    .ossssssssssssssssssdMMMNysssso.       Host: host 
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 6.2.0-36-generic 
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 19 hours, 31 mins 
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 2184 (dpkg), 14 (snap) 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 5.1.16 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 4096x1728 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: GNOME 42.9 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Mutter 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Adwaita 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Yaru [GTK2/3] 
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Yaru [GTK2/3] 
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: gnome-terminal 
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: Intel i9-9900K (16) @ 5.000GHz 
    .ossssssssssssssssssdMMMNysssso.       GPU: NVIDIA GeForce RTX 2080 Ti Rev. A 
      -+sssssssssssssssssyyyssss+-         GPU: Intel CoffeeLake-S GT2 [UHD Graphics 630] 
        `:+ssssssssssssssssss+:`           Memory: 8876MiB / 15851MiB 
            .-/+oossssoo+/-.

Is it because that the PC has 2 GPUs enabled, one Nvidia and one Integrated Intel?

Maybe. What I can confirm is that i am using 1 Nvidia GPU and 1 intel integrated-GPU.

Finally i solve this after i do:

  1. migrate the os from ubuntu to archlinux (maybe the gpu configs in ubuntu is too complex, so that i can't figure out what the hell is happening)
  2. I custom my X11 configuration to disable the intel integrated-GPU.
╰─ lsmod | grep nvidia                                                                                                                             ─╯
nvidia_drm            118784  20
nvidia_modeset       1585152  42 nvidia_drm
nvidia_uvm           3502080  0
nvidia              62386176  895 nvidia_uvm,nvidia_modeset
video                  77824  3 msi_wmi,i915,nvidia_modeset

/etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf

Section "OutputClass"
    Identifier "intel"
    MatchDriver "i915"
    Driver "modesetting"
EndSection

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration" "yes"
    Option "PrimaryGPU" "yes"
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
EndSection

/etc/X11/xorg.conf

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "Module"
    Load           "modesetting"
    Load           "glx"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    BusID          "PCI:1:0:0"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    Option         "DPMS"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth   24
    #Option         "nvidiaXineramaInfoOrder" "DFP-5"
    #Option         "metamodes" "3840x2160_60 +0+0"
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "Stereo" "0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    Option         "MultiGPU" "Off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection