Does income from vested “Restricted Stock Units” qualify as earned income and thus allow me to contribute to a Roth IRA?

I am retired but I still get vested “restricted stock units” every year. When they vest, the company withholds payroll taxes and I get a W-2. Would this qualify as earned compensation and allow me to contribute to a Roth IRA? My other earnings are from dividends, interest and capital gains which would do not qualify as earned income.

When I read IRS Bulletin 590-A,  it says anything on a W-2,  box 1 is earned income and then later says that deferred compensation is excluded from the definition of earned income.  I can not find the IRS definition of deferred compensation as used in Bulletin 590-A.