  We study the first law of thermodynamics of dyonic black strings carrying a
linear momentum in type IIA string theory compactified on K3 with leading order
$\alpha'$ corrections. The low energy effective action contains mixed
Chern-Simons terms of the form $-2B_{(2)}\wedge {\rm tr}(R(\Gamma_\pm)\wedge
R(\Gamma_\pm))$ which is equivalent to $2H_{(3)}\wedge
\mathrm{CS}_{(3)}(\Gamma_\pm)$ up to a total derivative. We find that the naive
application of Wald entropy formula leads to two different answers associated
with the two formulations of the mixed Chern-Simons terms. Surprisingly,
neither of them satisfies the first law of thermodynamics for other conserved
charges computed unambiguously using the standard methods. We resolve this
problem by carefully evaluating the full infinitesimal Hamiltonian at both
infinity and horizon, including contributions from terms proportional to the
Killing vector which turn out to be nonvanishing on the horizon and
indispensable to establish the first law. We find that the infinitesimal
Hamiltionian associated with $-2B_{(2)}\wedge {\rm tr}(R(\Gamma_\pm)\wedge
R(\Gamma_\pm))$ requires an improvement via adding a closed but non-exact term,
which vanishes when the string does not carry either the magnetic charge or
linear momentum. Consequently, both formulations of the mixed Chern-Simons
terms yield the same result of the entropy that however does not agree with the
Wald entropy formula. In the case of extremal black strings, we also contrast
our result with the one obtained from Sen's approach.
