Nvidia runtime is missing hooks

I lost the nvidia runtimes hooks (possibly after the upgrade to 4.0.1. Anyone know how to restore it.

Will going to an older version help?

When trying to edit

config:
environment.DISPLAY: :1
environment.PULSE_SERVER: unix:/home/ubuntu/pulse-native
nvidia.driver.capabilities: all
nvidia.runtime: “true”
user.user-data: |
#cloud-config
runcmd:
- ‘sed -i “s/; enable-shm = yes/enable-shm = no/g” /etc/pulse/client.conf’
packages:
- x11-apps
- mesa-utils
- pulseaudio
description: GUI LXD profile
devices:
PASocket1:
bind: container
connect: unix:/run/user/1000/pulse/native
gid: “1000”
listen: unix:/home/ubuntu/pulse-native
mode: “0777”
security.gid: “1000”
security.uid: “1000”
type: proxy
uid: “1000”
X0:
bind: container
connect: unix:@/tmp/.X11-unix/X1
listen: unix:@/tmp/.X11-unix/X0
security.gid: “1000”
security.uid: “1000”
type: proxy
mygpu:
type: gpu
name: x11
used_by:

  • /1.0/instances/u-18

When saving it I get the following error:

Initialize LXC: The NVIDIA LXC hook couldn’t be found

reverting the lxd 4.0.1 snap to rev 14804 fixed the issue.

I tried to reproduce the issue but nvidia runtime works fine here on rev 14890.

Reverted back to the new image after reinstalling. It seems to be resolved. I do not know what happen.