Commercial software makers are exploiting designed obsolescence extract wealth and when hardware is involved this comes to the detriment of hte environment by needlessly generating copious e-waste.
So new rule: when a copyright holder decides that their non-free software is no longer profitable enough to maintain and distribute despite the continued useful existence of the hardware it runs on, they shall publish the source code regardless of time left on their copyright. The copyright shall be relinquished and either converted into public domain, or reassigned under a FOSS license to a free software custodian. To the extent that the docs, SDK, and test artifacts are also owned by the copyright holder, those must also be released to the public.
Alternatively, if a copyright holder prefers to keep their code secret, they may elect to port an existing FOSS project to the hardware that their obsoleted software otherwise renders useless. They must finance the porting effort to the extent of reaching comparable functionality as the original factory state of the device.
This use-it-or-lose-it component is missing from the #rightToRepair legislation being implemented.