Let $P$ be be a principal bundle over a manifold $M$ with structure group $G$, where $G$ is a Lie group. Let $E = P\times_{\rho} \mathbb{R}^{k}$ be a vector bundle associated to $P$ through a faithful representation $\rho\colon G\to Gl(k,\mathbb{R})$. Let $\mathrm{Ad}(P) = P\times_{Ad}\mathfrak{g}$ denote the adjoint bundle associated to $P$, where $\mathfrak{g}$ denotes the Lie algebra of $G$. My question is the following:
If $\mathrm{Ad}(P)$ is topologically trivial, namely $\mathrm{Ad}(P)\simeq M\times \mathfrak{g}$, does it follow then that the endomorphism bundle $\mathrm{End}(E)\simeq E\otimes E^{\ast}$ of $E$ is also topologically trivial?
If I am not mistaken, this is clearly true if $G=Gl(k,\mathbb{R})$. I am interested in the case $G\subset Gl(k,\mathbb{R})$ and $G\neq Gl(k,\mathbb{R})$, with $G$ connected, compact and semi-simple.
Thanks.