SeanGoneWild Posted August 18, 2019 Share Posted August 18, 2019 Hey everyone, Basically I am trying to pass through the graphic driver to a docker to enable emby to access hardware accelleration. I have found some instuctions for plex that run a treat to get the driver to appear so it can be passed through, except it is does not retain after a reboot of the server. The instructions I had followed were: https://forums.unraid.net/topic/77943-guide-plex-hardware-acceleration-using-intel-quick-sync/ There was a step to update the /boot/config/go file with the following at the end: modprobe i915 chmod -R 777 /dev/dri My go file is as following: #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & #Setup drivers for hardware transcoding in Emby modprobe i915 chmod -R 777 /dev/dri/ However this appear to not be running as the /dev/dri folder does not appear but sometimes does when the steps are running manually. Has this changes with the latest release of unraid 6.7.2? Cheers, Sean Quote Link to comment
Frank1940 Posted August 18, 2019 Share Posted August 18, 2019 20 minutes ago, SeanGoneWild said: However this appear to not be running as the /dev/dri folder does not appear but sometimes does when the steps are running manually. What do you mean by this "sometimes"? IF it does not always work when you run it manually, why would you expect it to work in a script environment? Quote Link to comment
SeanGoneWild Posted August 19, 2019 Author Share Posted August 19, 2019 (edited) By sometimes I mean modprobe gives me a fatal error, this happends liturally once every 20 times I reboot. So I am unable to provide the error message. But my question still remains into why the go script is not executing the script on boot? Edited August 19, 2019 by SeanGoneWild Quote Link to comment
Frank1940 Posted August 19, 2019 Share Posted August 19, 2019 First thing, you need to trap the error code on exit. (All proper behaving Linux commands will have an exit code on completion which 'tells' if it completed successfully. A properly written BASH script should 'trap' this code and test it for proper execution if there is any possibility of failure. OF course, it is up to the script writer to figure out a way to gracefully handle this.) What I also can't remember is exactly where the 'go' file executes in the boot process. It could be that you are executing the modprobe command before the OS is fully installed. There is a plugin called 'CA User Scripts' which can be used to run user scripts. It might be the solution to your problem. You might also have to learn a bit of programing. The shell used by Unraid is named BASH (Bourne Again Shell) and, if you google it, you can find tutorials to help you write a script for your use. It is very powerful scripting language! (The preclear script is written in BASH!) These tutorials could also provide you with the knowledge of a way to integrate your commands (or call another 'script' from it) into the 'go' script and have it work. Now for the disclaimer. It has been forty years since I had a course in Shell language and it was for the Bourne Shell. (BASH came along in the late 1980's.) I forgotten so much that I would be starting over in attempting to provide assistance in helping you write one. Quote Link to comment
Frank1940 Posted August 19, 2019 Share Posted August 19, 2019 Here is a instruction course in Bash: https://en.wikiversity.org/wiki/Bash_programming Quote Link to comment
itimpi Posted August 19, 2019 Share Posted August 19, 2019 Just now, Frank1940 said: Here is a instruction course in Bash: https://en.wikiversity.org/wiki/Bash_programming It is worth pointing out that you can also write scripts in Unraid using PHP. I have started using this in preference to bash as it provides far more facilities and is closer to traditional programming languages from a syntax perspective. Quote Link to comment
ken-ji Posted August 20, 2019 Share Posted August 20, 2019 On 8/18/2019 at 8:57 AM, SeanGoneWild said: Hey everyone, Basically I am trying to pass through the graphic driver to a docker to enable emby to access hardware accelleration. I have found some instuctions for plex that run a treat to get the driver to appear so it can be passed through, except it is does not retain after a reboot of the server. The instructions I had followed were: https://forums.unraid.net/topic/77943-guide-plex-hardware-acceleration-using-intel-quick-sync/ There was a step to update the /boot/config/go file with the following at the end: modprobe i915 chmod -R 777 /dev/dri My go file is as following: #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & #Setup drivers for hardware transcoding in Emby modprobe i915 chmod -R 777 /dev/dri/ However this appear to not be running as the /dev/dri folder does not appear but sometimes does when the steps are running manually. Has this changes with the latest release of unraid 6.7.2? Cheers, Sean It should be like this. You want modules loaded (and permissions changed) before the array is started (which will then start dockers and VMs) #!/bin/bash # enable iGPU for docker use /sbin/modprobe i915 chmod -R 0777 /dev/dri # Start the Management Utility /usr/local/sbin/emhttp & These are discussed in the varius plex/emby support threads 1 Quote Link to comment
jang430 Posted August 25, 2019 Share Posted August 25, 2019 @ken-ji, did a fresh setup of another unraid box. Can't get the emby gpu transcoding to work. Using Intel Celeron G3930. Already did the following: #!/bin/bash # enable iGPU for docker use /sbin/modprobe i915 chmod -R 0777 /dev/dri # Start the Management Utility /usr/local/sbin/emhttp & Does anything have to be done with Emby server? Thanks in advance. Quote Link to comment
SeanGoneWild Posted September 7, 2019 Author Share Posted September 7, 2019 On 8/20/2019 at 3:49 PM, ken-ji said: It should be like this. You want modules loaded (and permissions changed) before the array is started (which will then start dockers and VMs) #!/bin/bash # enable iGPU for docker use /sbin/modprobe i915 chmod -R 0777 /dev/dri # Start the Management Utility /usr/local/sbin/emhttp & These are discussed in the varius plex/emby support threads Cheers @ken-ji. Ammended my go file and rebooted my unraid server, it is now working correctly. Thanks, Sean Quote Link to comment
ken-ji Posted September 7, 2019 Share Posted September 7, 2019 On 8/25/2019 at 9:25 AM, jang430 said: @ken-ji, did a fresh setup of another unraid box. Can't get the emby gpu transcoding to work. Using Intel Celeron G3930. Already did the following: #!/bin/bash # enable iGPU for docker use /sbin/modprobe i915 chmod -R 0777 /dev/dri # Start the Management Utility /usr/local/sbin/emhttp & Does anything have to be done with Emby server? Thanks in advance. Yes, have Emby Premiere and turn on Hardware Transcoding in Emby. Set it to Advanced to see if the iGPU is correctly setup Quote Link to comment
Recommended Posts
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.