When the value for dev.pwm.0.ratio2 is changed using sysctl there will not be any ratio update of the physical signal for the second PWM channel. Instead it will update the ratio for the first PWM channel. Because of this it is not possible to change the ratio for the second PWM channel.
Nothing wrong can be seen using sysctl. It is on the physical PWM signals this problem can be seen.
The error is in file sys/arm/broadcom/bcm2835/bcm2835_pwm.c, function bcm_pwm_ratio2_proc, line 329:
This line should be changed to the following to write to the correct address: