For this, you should check this
which you could use also for your xrandr --output eDP1 --auto if necessary… but probably is already handled there.
xrandr --output eDP1 --auto