Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Docker Containers are unable to use the gpu after wake up from sleep ( Dynamix S3 sleep plugin )

Featured Replies

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

  • 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:
image.thumb.png.c58890d6456648fe91618a33a992fa21.png

pci=noaer pcie_aspm=off

to not breck pcie power sleep states...

  • Community Expert

Otherwise ask in plugin support forum...

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.