Well these are two very different topics.
case A: your manager asks you to do a super trivial and no value
tasks. He compares you with Jim who did a similar job but actually not
You do the task because he is your manager and its your job to do assigned tasks, even if they might seem beneath you.
case B: when you think you deserve a promotion, your manager say,
"look, Jim works harder, but he doesn't even get a promotion yet".
This is a version of the No True Scotsman fallacy. The implication is if you were a good team member(a true scotsman) then you would wait in line behind Jim. It also falls into the False Equivalence, Ignoratio elenchi, McNamara, and Appeal to self-evident truth fallacies.
Regardless the most effective way to handle this situation, is to get your manager to commit to some set of SMART goals that he needs to see from you to promote you to your desired position.
Your manager has already decided he is not promoting you right now. There is no argument you can make that you can also realistically expect a rational decision to change his mind. However if you can get him to commit to a promotion if you achieve some Specific, Measurable, Achievable, Relevant, Time bound goals then you know what the bar is to achieve your goal of being promoted.
It is also possible that you have some deficiencies that you will need to correct before he will be willing consider setting promotion goals. It seems like from his from his response he may feel that you are not committed enough, or working hard enough for a promotion. In this case you need to understand what his expectations are in this manner. I had a manager that expected vacation time to be used in chunks. I have always preferred to take long weekends with one week of my vacation. Many managers do not have a problem with this but my one manager did. Understanding her expectation allowed me to correct myself, and in the end I ended up with a good review. You need to understand what his measurement is. It could be he is looking around at who is still there at 5:15, and if you always leave at 5:10 (already 10 min over) he may think you are not committed. The best thing you can do for this is get him to set a measureable bar for you in this regard.
It is possible that you will find the goals far too onerous for you to bother trying to achieve them. In that case you will have to decide if you are content with your current position or if you need to find a place that will better align with what you are looking for.