Blog IndexPosts by TagHome

Dell XPS 13 (2015) Display Switch on Linux

Posted <2015-09-08 Tue 12:12> by Aaron S. Jackson.

By default, the Fn-F8 key combo on my Dell XPS didn't do anything. This was kind of annoying because if I was using it with just the external monitor, and that somehow got disconnected, it was difficult to recover the display.

F8 Display Button

I recently solved this problem by binding a script to that button which uses Xrandr to switch between the internal and external display. Kind of like the "LCD/CRT" button on older laptops.


if [ ! -e $TOGGLE ]; then
    touch $TOGGLE
    xrandr --output eDP1 --mode 1920x1080
    xrandr --output HDMI1 --off
    rm $TOGGLE
    xrandr --output eDP1 --off
    xrandr --output HDMI1 --mode 1920x1080

A simple hack that works surprisingly well. Incidentally, Fn-F8 translates to Super-P on this laptop (possibly all?), so you can call it pretty easily from your external keyboard too.

Wanting to leave a comment?

Comments and feedback are welcome by email (

Tags: hacks laptop linux

Blog IndexPosts by TagHome

Copyright 2007-2022 Aaron S. Jackson (compiled: Sun 2 Jan 00:24:10 GMT 2022)