We computationally study the response of zero-pressure-gradient (ZPG) turbulent boundary layers (TBLs) to streamwise step changes from a smooth wall to riblets (SM_RI), and vice versa (RI_SM). To quantify the departure from equilibrium due to the step changes, we conduct reference calculations of ZPG TBLs over an entirely smooth wall, and an entirely riblet-covered surface. To save the computational cost, we generate an optimal grid for an unstructured spectral-element code, consistent with the size of turbulent scales across the TBL. By the step change, the momentum thickness Reynolds number reaches ReI^¸0imeq680 (friction Reynolds number ReI¨0imeq283), and by the domain outlet downstream of the step change, ReI^¸imeq1000 (ReI¨imeq400). The TBL departure from equilibrium due to the step change, and its subsequent relaxation, recall previous studies on step changes in surface roughness. Downstream of the step change, growth of the internal equilibrium layer thickness I^´IEL, hence recovery to equilibrium, follows two stages. Stage I corresponds to the recovery up to the buffer region (y+imeq10), which is slower during the RI_SM step change than the SM_RI counterpart. For the RI_SM cases during Stage I, I^´IEL∝(x/k)0.6, and this stage is completed by ximeq100kimeq(5I^´0−20I^´0) downstream of the step change, where k is the riblet height. Stage II recovery i.e.\ recovery of the outer region, is quite slow. Therefore, for drag-increasing riblets with k+≥25, I^´IEL does not reach the boundary layer thickness, even up to 50I^´0 downstream of the step change, owing to the advected frozen wake from upstream. As a result, skin-friction coefficient reaches to more than 90% of its equilibrium counterpart, but does not reach its 100%.