My boyfriend seems to becoming less enthusiastic when he's around me

We go to the same uni. We've been together since before going there. Before, he would find time to be with me during breaks and we'd study together, and we'd take every opportunity we can just to talk or see each other. We both have respect for each other's time. I make sure that I give him time alone when he needs to do a project or study for a test because he's very conscious about his grades, so I respect that. But lately, he'd sometimes forget checking up on me or forget messaging me. When I ask him out to grab lunch together it always appears as if he's bored around me. He also stopped walking me back to my dorm and would prefer to leave right after the classes we take together (we only have 2 classes together). What bothered me just today was when he bought me lunch and just when he was about to leave, I asked him for a hug and kiss and I caught him rolling his eyes. I honestly don't know what I'm doing wrong and I'm scared things might end between us.