For an automorphic L-functions, often there is a bound refereed to by Ramanujan on average, where the coefficients satisfy $$\sum_{n<x} \lambda(n) \ll x^{1+\varepsilon}$$
Why is this bound true and how does it relate to Rankin-Selberg method? Is it known in general or only for some specific/low-degree L-functions?
Let $\pi$ be an automorphic representation of $\mathrm{GL}_n(\mathbb{A}_{\mathbb{Q}})$, which I will assume for simplicity is everywhere unramified. Following Goldfeld's book (Automorphic Forms and $L$-Functions for the group $\mathrm{GL}(n,\mathbb{R})$), we write $A(m_1,\ldots,m_{n-1})$ for the Hecke eigenvalues of $\pi$, so that for $\Re(s) > 1$, $$L(s,\pi) = \sum_{m = 1}^{\infty} \frac{A(1,\ldots,1,m)}{m^s}.$$ Then for $\Re(s) > 1$, $$L(s,\pi \times \widetilde{\pi}) = \zeta(ns) \sum_{m_1,\ldots,m_{n-1} = 1}^{\infty} \frac{\left|A(m_1,\ldots,m_{n-1})\right|^2}{(m_1^{n-1} \cdots m_{n-1})^s}.$$ This has a simple pole at $s = 1$, so that (by, say, any standard Tauberian theorem) $$\sum_{m_1^{n-1} \cdots m_{n-1} \leq x} \left|A(m_1,\ldots,m_{n-1})\right|^2 \sim \operatorname*{Res}_{s=1} \frac{L(s,\pi \times \widetilde{\pi})}{\zeta(ns)} x.$$ In particular, $$\sum_{m \leq x} |A(1,\ldots,1,m)|^2 \ll x,$$ and hence via the Cauchy-Schwarz inequality, $$\sum_{m \leq x} |A(1,\ldots,1,m)| \ll x.$$