November 16, 20241 yr I am using dynamix S3 sleep plugin to make the server sleep and wake up at desired time by following spaceinvaderone’s video , but when the server sleeps wake up the docker containers which used to use gpu like example don’t recognise the gpu example jellyfin doesn’t do transcoding or any container which used to use gpu seems like cannot see the gpu and only way to make them see the gpu is rebooting the server . fixes i tried : updated nvidiadrivers , restarting the docker containers upon wake up but nothing is working, this seems to be long standing problem , looking for a possible resolution thanks
November 21, 20241 yr Community Expert The issue of Docker containers losing GPU access after waking from sleep when using the Dynamix S3 Sleep plugin is likely caused by how GPUs and associated drivers handle power states. Here are some potential causes and resolutions: Potential Causes: NVIDIA Driver Reset Issues: When the system wakes from sleep, the GPU drivers may not reinitialize properly, causing Docker containers to lose access to the GPU. Docker Container Dependency on GPU: Some containers, like Jellyfin, may require the GPU to be explicitly re-attached or reinitialized after a power state change. PCIe and Wake-Up Issues: The GPU might not fully reinitialize its PCIe connection after waking from sleep, preventing the NVIDIA drivers from detecting it properly. Dynamix S3 Sleep Plugin Behavior: The plugin might not fully handle resetting the GPU and Docker service dependencies after waking up. Suggested Fixes: Rebind the GPU After Wake-Up: Add a script to rebind the GPU's PCI devices after wake-up. You can use the following steps: Identify your GPU's PCI ID lspci | grep -i nvidia Create a script to unbind and rebind the GPU echo '0000:XX:XX.X' > /sys/bus/pci/devices/0000:XX:XX.X/remove echo '1' > /sys/bus/pci/rescan ^-Example... Replace XX:XX.X with the actual PCI ID from the lspci output. Automate this script to run after wake-up using the Dynamix S3 Sleep plugin's custom script field. Alternatively: Restart the NVIDIA Driver After Wake-Up: Add a command to reload the NVIDIA drivers after waking from sleep modprobe -r nvidia modprobe nvidia This can also be automated in the custom script field of the S3 plugin. Restart Docker After Wake-Up: Sometimes Docker needs to restart for containers to detect the GPU /etc/rc.d/rc.docker restart You can include this command in the same custom script used for the GPU reset. Prevent the GPU from Fully Powering Down: Modify the GPU's power settings to avoid being fully disabled during sleep: Edit your go file (found at /boot/config/go) to include echo 'auto' > /sys/bus/pci/devices/0000:XX:XX.X/power/control ^-Example ... Replace XX:XX.X with your GPU's PCI ID. Check for BIOS Settings: Some motherboards have specific BIOS settings related to PCIe power management. Ensure that: "Above 4G Decoding" is enabled. "PCIe ASPM" is disabled to prevent aggressive power management. Disable Sleep and Use Idle Instead (Alternative Fix): If the issue persists, consider disabling sleep and using a low-power idle mode instead. Many Unraid users find this more stable for 24/7 systems. Alternativley syslinux grub boot options needed Main > flach > add after bzroot: pci=noaer pcie_aspm=off to not breck pcie power sleep states...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.