cronjob and/or rc.local command not running

stooovie

Member
May 16, 2023
56
8
8
Hi, my Jellyfin LXC install requires this command in order for HW encoding/decoding to work:

Code:
/bin/chgrp video /dev/dri/renderD128

I tried to add this to /etc/rc.local and cron (as
Code:
* * * * * root /bin/chgrp video /dev/dri/renderD128
) but none of these work. In order to get the acceleration running, I have to manually run this as root in the LXC shell on every restart of the LXC or the host.

Why is this? Any clues? Thanks!
 
I have, it doesn't work. Running
Code:
systemctl start rc-local

returns this:

Code:
Job for rc-local.service failed because the control process exited with error code.
See "systemctl status rc-local.service" and "journalctl -xe" for details.
You have new mail in /var/mail/root

And systemctl status rc-local.service returns this:

Code:
* rc-local.service - /etc/rc.local Compatibility
     Loaded: loaded (/lib/systemd/system/rc-local.service; enabled-runtime; vendor preset: enabled)
    Drop-In: /usr/lib/systemd/system/rc-local.service.d
             `-debian.conf
     Active: failed (Result: exit-code) since Tue 2023-05-23 11:32:55 UTC; 42s ago
       Docs: man:systemd-rc-local-generator(8)
    Process: 679 ExecStart=/etc/rc.local start (code=exited, status=203/EXEC)
        CPU: 4ms


May 23 11:32:55 jelly systemd[1]: Starting /etc/rc.local Compatibility...
May 23 11:32:55 jelly systemd[679]: rc-local.service: Failed to execute /etc/rc.local: Exec format error
May 23 11:32:55 jelly systemd[679]: rc-local.service: Failed at step EXEC spawning /etc/rc.local: Exec format >
May 23 11:32:55 jelly systemd[1]: rc-local.service: Control process exited, code=exited, status=203/EXEC
May 23 11:32:55 jelly systemd[1]: rc-local.service: Failed with result 'exit-code'.
May 23 11:32:55 jelly systemd[1]: Failed to start /etc/rc.local Compatibility.
 
Last edited:
Oh boy, there was an extra empty line at the beginning of the file... Linux should be more resilient to tiny errors like this,

Thanks! Seems to do the job.
 
You could also make a systemd job:

/etc/systemd/system/change-render-group.service:
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/chgrp video /dev/dri/renderD128

[Install]
WantedBy=multi-user.target


systemctl daemon-reload

systemctl enable --now change-render-group.service
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!