RedPill - the new loader for 6.2.4 - Discussion


Recommended Posts

9 hours ago, dreamtek said:

Now there is a solution that can force Photo to use CPU for Face Detection. Github

Nice, and an interesting write up of how they did it (using IDA Pro), too.

 

Be sure to read the full article if you consider using this:

- it probably won't survive a DSM update

- it probably won't survive a Photos app update

- use DS3615xs if keeping Face Detection is important to you

Edited by WiteWulf
Link to post
Share on other sites

Really weird...

 

I was struggling to install DSM 6.2.4-25556 on the latest version of ESXi. I had already gone through and successful for it a couple month ago. However this time it keeps returning to DSM installation page (the blue web UI) over and over. Suspected so many things but when I add/connect serial port to vm, it boots successfully which leads to account setting page.

 

I don't know details why it happens, hope this helps for someone like me.

 

Link to post
Share on other sites
10 hours ago, man275 said:

Really weird...

 

I was struggling to install DSM 6.2.4-25556 on the latest version of ESXi. I had already gone through and successful for it a couple month ago. However this time it keeps returning to DSM installation page (the blue web UI) over and over. Suspected so many things but when I add/connect serial port to vm, it boots successfully which leads to account setting page.

 

I don't know details why it happens, hope this helps for someone like me.

 

the same as for me, thanks for the tip it works, only with Baremetal it no longer works either ...

Edited by Brunox
Link to post
Share on other sites
On 11/18/2021 at 11:37 PM, WiteWulf said:

Nice, and an interesting write up of how they did it (using IDA Pro), too.

 

Be sure to read the full article if you consider using this:

- it probably won't survive a DSM update

- it probably won't survive a Photos app update

- use DS3615xs if keeping Face Detection is important to you

confirms it works on facial.

 

Edited by mcdull
Link to post
Share on other sites

Use `LD_PRELOAD` to inject the `IsSupported` function to turn off GPU face recognition

 

Tested on DS918+ 7.0.1
Synology Photos Version: 1.1.0-0224/1.0.1-0194

 

preload.c

// preload.c

#include <stdio.h>

long long _ZN9synophoto6plugin7network9IeNetwork11IsSupportedEv() {
    printf("synophoto::plugin::network::IeNetwork::IsSupported return 0\n");
    return 0LL;
}

__attribute__((constructor)) void main() {
    printf("module inject success\n");
}

preload.so

shell

Make


CHROOT@ds.apollolake[/source]# gcc -fPIC -shared -o preload.so preload.c


Install

root@DSM:~# cp preload.so /usr/lib/preload.so
or
root@DSM:~# cp preload.so /volume1/@appstore/SynologyPhotos/lib/preload.so


root@DSM:~# systemctl edit pkg-SynologyPhotos-face-extraction


[Service]
Environment="LD_PRELOAD=preload.so"

root@DSM:~# systemctl restart pkg-SynologyPhotos-face-extraction


Uninstall


root@DSM:~# rm /usr/lib/preload.so
or
root@DSM:~# rm /volume1/@appstore/SynologyPhotos/lib/preload.so
root@DSM:~# rm /etc/systemd/system/pkg-SynologyPhotos-face-extraction.service.d/override.conf
root@DSM:~# systemctl daemon-reload
root@DSM:~# systemctl restart pkg-SynologyPhotos-face-extraction


 

Edited by jumkey
  • Like 6
  • Thanks 1
Link to post
Share on other sites
3 hours ago, jumkey said:

Use `LD_PRELOAD` to inject the `IsSupported` function to turn off GPU face recognition

 

Tested on DS918+ 7.0.1
Synology Photos Version: 1.1.0-0224/1.0.1-0194

 

preload.c


// preload.c

#include <stdio.h>

long long _ZN9synophoto6plugin7network9IeNetwork11IsSupportedEv() {
    printf("synophoto::plugin::network::IeNetwork::IsSupported return 0\n");
    return 0LL;
}

__attribute__((constructor)) void main() {
    printf("module inject success\n");
}

preload.so 6.48 kB · 8 downloads

shell


Make


CHROOT@ds.apollolake[/source]# gcc -fPIC -shared -o preload.so preload.c


Install

root@DSM:~# cp preload.so /usr/lib/preload.so
or
root@DSM:~# cp preload.so /volume1/@appstore/SynologyPhotos/lib/preload.so


root@DSM:~# systemctl edit pkg-SynologyPhotos-face-extraction


[Service]
Environment="LD_PRELOAD=preload.so"

root@DSM:~# systemctl restart pkg-SynologyPhotos-face-extraction


Uninstall


root@DSM:~# rm /usr/lib/preload.so
or
root@DSM:~# rm /volume1/@appstore/SynologyPhotos/lib/preload.so
root@DSM:~# rm /etc/systemd/system/pkg-SynologyPhotos-face-extraction.service.d/override.conf
root@DSM:~# systemctl daemon-reload
root@DSM:~# systemctl restart pkg-SynologyPhotos-face-extraction


 

Is it make sens to create RP module with your approach? 

Link to post
Share on other sites
9 minutes ago, T-REX-XP said:

Is it make sens to create RP module with your approach? 

It is not needed when Synology Photos are not installed. So I prefer to package it into spk. It is also convenient to delete these files when uninstalling.
The problem is that 7.0 does not support running spk as root.

Link to post
Share on other sites
10 hours ago, jumkey said:

Use `LD_PRELOAD` to inject the `IsSupported` function to turn off GPU face recognition

 

Tested on DS918+ 7.0.1
Synology Photos Version: 1.1.0-0224/1.0.1-0194

 

preload.c


// preload.c

#include <stdio.h>

long long _ZN9synophoto6plugin7network9IeNetwork11IsSupportedEv() {
    printf("synophoto::plugin::network::IeNetwork::IsSupported return 0\n");
    return 0LL;
}

__attribute__((constructor)) void main() {
    printf("module inject success\n");
}

preload.so 6.48 kB · 13 downloads

shell


Make


CHROOT@ds.apollolake[/source]# gcc -fPIC -shared -o preload.so preload.c


Install

root@DSM:~# cp preload.so /usr/lib/preload.so
or
root@DSM:~# cp preload.so /volume1/@appstore/SynologyPhotos/lib/preload.so


root@DSM:~# systemctl edit pkg-SynologyPhotos-face-extraction


[Service]
Environment="LD_PRELOAD=preload.so"

root@DSM:~# systemctl restart pkg-SynologyPhotos-face-extraction


Uninstall


root@DSM:~# rm /usr/lib/preload.so
or
root@DSM:~# rm /volume1/@appstore/SynologyPhotos/lib/preload.so
root@DSM:~# rm /etc/systemd/system/pkg-SynologyPhotos-face-extraction.service.d/override.conf
root@DSM:~# systemctl daemon-reload
root@DSM:~# systemctl restart pkg-SynologyPhotos-face-extraction


 

 

Nice! An SPK of this would be great, but I see what you mean about DSM 7 and running SPKs as root. I am assuming this is why there is no open-vm-tools package for DSM 7 either? Hopefully there is a workaround for that too some day.

 

23 hours ago, WiteWulf said:

Working fine on my DS918+ on ESXi:

image.thumb.png.6c2163bffbb1254714ac3c3120a6378e.png

 

What setup are you using to get 10G NIC on ESXi with redpill? Did you pass through a physical NIC or it's virtual? I can only get 1G max with an e1000e vNIC.

Link to post
Share on other sites

hi guys,

Is there any solution to resolve the reinstall pb(install -> restart -> install, loop). some of people have the same pb.

 

my config:

  ds918+ 7.0.1 42218 on berametal

  msi b560m mortar (onboard nic: 8125b)   

  i5 10400

 a PCIE nic intel x520 with two port

 a seagate enterprise disk( 16T)

 

use the loader neither only have picopoco's r8125 nor only have ixgbe nor both have the same result. Of course include  the way repack the rd.gz.

 

I have read all posts of this forum, not find a solution to mark it work. 

 

Any suggestion?

 

Thx

dmesg.txt

Link to post
Share on other sites

Hello when add more net

 

"extra_cmdline": {
    "pid": "0x0951",
    "vid": "0x1625",
"netif_num": "4",
"sn": "1710LWN023200",
"mac1": "001132410000"
"mac2": "001132410000"
"mac3": "001132410000"
"mac4": "001132410000"
},
"synoinfo": {},
"ramdisk_copy": {},
"extensions": []

the result is

[#] Checking runtime for required tools... [OK]
include/json.sh: line 16: 2: unbound variable
Makefile:29: recipe for target 'build_redpill_load' failed
make: *** [build_redpill_load] Error 1

 

 

More thanks in advantage

Link to post
Share on other sites
22 minutes ago, devid79 said:

 



"extra_cmdline": {
    "pid": "0x0951",
    "vid": "0x1625",
"netif_num": "4",
"sn": "1710LWN023200",
"mac1": "001132410000"
"mac2": "001132410000"
"mac3": "001132410000"
"mac4": "001132410000"
},
"synoinfo": {},
"ramdisk_copy": {},
"extensions": []

the result is

[#] Checking runtime for required tools... [OK]
include/json.sh: line 16: 2: unbound variable
Makefile:29: recipe for target 'build_redpill_load' failed
make: *** [build_redpill_load] Error 1

 

This one is easy to spot: your user_config.json is invalid. You need to add a comma after mac1, mac2 and mac3 in order to be a valid json. Also you need to make sure the mac addresses are unique, which they are not right now.

Edited by haydibe
  • Like 1
  • Thanks 1
Link to post
Share on other sites
21 hours ago, messica said:

hi guys,

Is there any solution to resolve the reinstall pb(install -> restart -> install, loop). some of people have the same pb.

 

my config:

  ds918+ 7.0.1 42218 on berametal

  msi b560m mortar (onboard nic: 8125b)   

  i5 10400

 a PCIE nic intel x520 with two port

 a seagate enterprise disk( 16T)

 

use the loader neither only have picopoco's r8125 nor only have ixgbe nor both have the same result. Of course include  the way repack the rd.gz.

 

I have read all posts of this forum, not find a solution to mark it work. 

 

Any suggestion?

 

Thx

dmesg.txt 279.94 kB · 3 downloads

Hi ! I'm using the same card with the Pocopico's driver (Intel X520), but with 3615xs version, on a DELL R520 and works fine (with 8x8To seagate entreprise disk).  Maybe you have to try with 3615xs? Or this is mandatory for HW transcoding to use 918+ version ? 

Link to post
Share on other sites

Hi Guys,

thx a lot and appreciate your help .

 

I resolve the problem with json and burn usb key with correct information, but another problem with sata. The system on web xxxxx:5000 disable sata port, any ideas?

 

thx a lot

i use redpill-DS3615xs_7.0.1-42218_b1637512779.img bromolow_user_config_json

i have the z230 HP and HP microserver gen8 

Edited by devid79
Link to post
Share on other sites

hi friends

i just try redpill DS918+ on local Vmware Player and all works correctly on my deskstop. Now i would like to try to install on my esxi but Syno assistant don't recognize it.

I convert img to vmdk using starwind (workstation format for player and esxi format for esxi) and configure network in e1000e.

i attached console output, the only error that i see is:

 

cname_load_conf failed:/var/tmp/nginx/avahi-aliases.conf
:: Loading module hid ... [  OK  ]
:: Loading module usbhid[   25.309204] usbcore: registered new interface driver usbhid
[   25.310028] usbhid: USB HID core driver
 ... [  OK  ]
:: Loading module syno_hddmon ... [FAILED]
Excution Error

 

but i don't undsterstand this error. could you someone help me?

serial.out

Link to post
Share on other sites
6 hours ago, devid79 said:

Hello when add more net

 



"extra_cmdline": {
    "pid": "0x0951",
    "vid": "0x1625",
"netif_num": "4",
"sn": "1710LWN023200",
"mac1": "001132410000"
"mac2": "001132410000"
"mac3": "001132410000"
"mac4": "001132410000"
},
"synoinfo": {},
"ramdisk_copy": {},
"extensions": []

the result is

[#] Checking runtime for required tools... [OK]
include/json.sh: line 16: 2: unbound variable
Makefile:29: recipe for target 'build_redpill_load' failed
make: *** [build_redpill_load] Error 1

 

 

More thanks in advantage

 

Additional to haydibe I think you mixed up the vid and pid. Check if you filled in correct order.

Edited by paro44
  • Like 1
Link to post
Share on other sites
On 11/20/2021 at 1:30 PM, jumkey said:

Use `LD_PRELOAD` to inject the `IsSupported` function to turn off GPU face recognition

 

Tested on DS918+ 7.0.1
Synology Photos Version: 1.1.0-0224/1.0.1-0194

 

preload.c


// preload.c

#include <stdio.h>

long long _ZN9synophoto6plugin7network9IeNetwork11IsSupportedEv() {
    printf("synophoto::plugin::network::IeNetwork::IsSupported return 0\n");
    return 0LL;
}

__attribute__((constructor)) void main() {
    printf("module inject success\n");
}

preload.so 6.48 kB · 17 downloads

shell


Make


CHROOT@ds.apollolake[/source]# gcc -fPIC -shared -o preload.so preload.c


Install

root@DSM:~# cp preload.so /usr/lib/preload.so
or
root@DSM:~# cp preload.so /volume1/@appstore/SynologyPhotos/lib/preload.so


root@DSM:~# systemctl edit pkg-SynologyPhotos-face-extraction


[Service]
Environment="LD_PRELOAD=preload.so"

root@DSM:~# systemctl restart pkg-SynologyPhotos-face-extraction


Uninstall


root@DSM:~# rm /usr/lib/preload.so
or
root@DSM:~# rm /volume1/@appstore/SynologyPhotos/lib/preload.so
root@DSM:~# rm /etc/systemd/system/pkg-SynologyPhotos-face-extraction.service.d/override.conf
root@DSM:~# systemctl daemon-reload
root@DSM:~# systemctl restart pkg-SynologyPhotos-face-extraction


 

 

There is a NFS mount fix for DSM6.23, it let photo/backup can use the NFS dirctory. Can you make a patch for DSM7?

 

There is no method above DSM6 to support NFS indexing, because this limitation is already dead in the system code. If the system finds that the path is a remote path such as NFS, it will directly refuse to create an index, so it can only be solved by unconventional means. Problem, bypass this part of the code through reverse analysis.
In addition, if DSM is running in a virtual machine, the system cannot read the SMART information of the hard disk, it will frantically output logs to /var/log/messages, which may eventually saturate the disk space! ! So we also need to bypass this part of the code.
After reverse analysis, you only need to modify the return value of the following function
IndexIsPathRemoteMount return 0LL;
IndexIsPathSupportEAWrite return 1LL;
SYNOFSIsRemoteFS return edi == 6;
SYNOGetFSType return 2LL;
SmartDataRead return -1;
SYNODiskTemperatureGet return -1;
SYNODiskExceedUncThrCache return -1;
These functions are located in the three files /lib/libsynoindex.so, /lib/libsynosdk.so.6 and /lib/libhwcontrol.so.1

Link to post
Share on other sites
2 hours ago, seanone said:

Can you make a patch for DSM7?

I don’t know much about reverse and ida pro

Recommend you to read the first 4 articles of this blog
This is what i found from DSM7.0.1

// IndexIsPathRemoteMount return 0LL;
// NOT FOUND

// IndexIsPathSupportEAWrite return 1LL;
// NOT FOUND

// libsynosdk.so
_Bool SYNOFSIsRemoteFS(int a1) {
  printf("arg %d\n", a1);
  return a1 == 6;
}

long SYNOGetFSType(const char *a1, int a2) {
  printf("arg %s %d\n", a1, a2);
  return 2L;
}

// libhwcontrol.so
long SmartDataRead(char *s, long a2, long a3) {
  printf("arg %s %d %d\n", s, a2, a3);
  return -1L;
}

long SYNODiskTemperatureGet(char *s) {
  printf("arg %s\n", s);
  return -1L;
}

// SYNODiskExceedUncThrCache return -1;
// NOT FOUND

 

Edited by jumkey
Link to post
Share on other sites
13 hours ago, reziel84 said:

hi friends

i just try redpill DS918+ on local Vmware Player and all works correctly on my deskstop. Now i would like to try to install on my esxi but Syno assistant don't recognize it.

I convert img to vmdk using starwind (workstation format for player and esxi format for esxi) and configure network in e1000e.

i attached console output, the only error that i see is:

 

cname_load_conf failed:/var/tmp/nginx/avahi-aliases.conf
:: Loading module hid ... [  OK  ]
:: Loading module usbhid[   25.309204] usbcore: registered new interface driver usbhid
[   25.310028] usbhid: USB HID core driver
 ... [  OK  ]
:: Loading module syno_hddmon ... [FAILED]
Excution Error

 

but i don't undsterstand this error. could you someone help me?

serial.out 319.65 kB · 1 download

 

You should assign the loader in first sata controller 0:0 and the data disk on sata controller 1:0 

 

 

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.