Fix profile not being applied when I2C bus ID changes on reboot
On Linux, the I2C bus ID is not persistent and can change between reboots. When the user tries to apply the profile (in my case on boot via startup parameter) it might fail to apply it to all devices because of the I2C bus number mismatch. This cause annoyance, because the user then has to open the OpenRGB app and manually set preferred settings to all devices which had changed bus ID (and even if they would save the profile again, it might change on next boot).
This Closes #2451 (closed).
If the I2C devices in the same group (multiple RAM sticks) are individually addressable, but reside withing the same I2C bus with different address, it should be possible to just strip the saved location of I2C bus ID and only compare the address itself. This is the implementation in merge request. This is probably the most sane option for fixing this issue while ensuring most compatibility - since relying on in I2C bus number for matching saved data to correct devices is not reliable anyway. In kernel documentation itself, it states that selecting the I2C bus should probably be dynamic, which I think hints that the bus number is not persistent.
I have looked at the location string on Windows and compared it to Linux, and it seems that on Windows the location string contains the name of the I2C controller instead of I2C bus ID. This would mean that the issue was never actually present on Windows, because the controller name is persistent (unlike the bus ID).
This also needs checking whether this breaks those individually addressable devices. I only have Patriot Viper RGB sticks on I2C bus, and they are not individually addressable, so I can not check this fully. Needless to say this shouldn't break anything, because we are still relying on matching every other parameter of the device, including its name, and as I previously said, the part before ", address:" seems that it will be same for every device on the same I2C controller on Windows anyway.
As a sidenote, I would gladly rewrite this to other approach if this would prove to be stupid, but I wanted to at least start some discussion about this issue, since the aforementioned issue is 4 months untouched and seems dead.