Some years ago I set to be able to control my smart TV via my laptop. Unfortunately, the graphics card (integrated or discrete) must also support the CEC spec in order to be able to send commands to the TV. Having a HDMI cable is not enough. My laptop did not ship with that requirement.
Also, I don’t know if it changed since I no more have a TV but on my last TV, HDMI CEC was both disabled by default but also renamed with some stupid marketing feature name TV manufacturers are capable of like SmartLink or some shit like this. BTW, it was a LG TV before WebOS.