DellXPS9360
Dell XPS 9360 (and similar) Configuration
DragonFlyBSD will run on the newer Dell XPS's such as the 9360, with a little work. There are two major issues with this laptop. The first is that the BIOS ACPI appears to implode when the USB driver is loaded via the normal boot sequence. The second is that we do not yet support the Atheros 10k Wifi built into the laptop. There are two solutions to these problems. A third problem appears to be that the I2C chipset fails to probe, but it doesn't look like anything needs it.
General bootstrapping and initial configuration files
(0) BIOS Setup issues
Set the SSD controlled to AHCI.
You may have to mess with the function key mode to make the F1...F12 keys all work as expected.
Disable secure boot. Recommend EFI boot. No need to enable legacy booting. Make sure you can boot from USB for the initial bootstrap.
Bootstrap DragonFlyBSD via a usb boot. Just install normally. Note that on the Dell XPS series, Dell apparently only supports M.2 SSDs (AHCI), and does not support NVMe SSDs. We support NVMe, but Dell apparently does not.
(1) Your /boot/loader.conf should disable xhci loading and should NOT load the ig4 driver. You can preload the sound drivers, and you will also need to set a kenv variable to enable the urtwn driver's firmware loading. You can also turn on panel self refresh mode for i915, which will slightly reduce dram and cpu power consumption:
#ig4_load="YES" (commented out)
unset xhci_load
sound_load="YES"
snd_hda_load="YES"
legal.realtek.license_ack=1
drm.i915.enable_psr=1
(2) You will have to buy a USB wifi module. I use a Realtek RTL8188CUS based USB dongle. For example, the Plugable USB 2.0 Wireless Nano. Make sure it uses the correct chipset.
I suggest the RTL8188CUS based wifi usb dongle (appears to work well on the 2.4 GHz band, but doesn't seem to see 5.0 GHz).
Plug the dongle into the left port for maximum bandwidth
(3) You will want to run a few things in /etc/rc.local:
moused -p /dev/psm0
kldload xhci
cd /etc/rc.d
sleep 8
echo "starting network"
sh netif start
(4) Your /etc/rc.conf should nominally contain your network setup:
wlans_urtwn0="wlan0"
ifconfig_wlan0="DHCP WPA"
# Also recommend
sshd_enable="YES"
dbus_enable="YES"
dntpd_enable="YES"
(5) Create an /etc/wpa_supplicant.conf file for your wifi connection.
network={
ssid="ssidhere"
psk="wpapasswordhere"
}
X Setup
X should just run and see the touchpad and mouse. No touchscreen support at the moment. You will need to set up appropriate accounts and files. The following packages are useful:
pkg install xorg-apps
pkg install xorg-docs
pkg install xorg-fonts
pkg install xorg-libraries
pkg install xorg-macros
pkg install xorg-drivers
pkg install xorg-server
pkg install xdm
pkg install dbus
pkg install xbindkeys
pkg install firefox
(also install your favorite apps, GUIs, window managers, whatever)
We suggest starting X via xdm which needs a package in addition to xorg:
pkg install xdm
Further Mouse Setup
We recommend using moused and /dev/sysmouse to handle external USB mouse attachments. By using moused, mice can be plugged and unplugged without imploding X11. I usually throw in two additional moused commands in /etc/rc.local:
moused -p /dev/ums0
moused -p /dev/ums1
Volume and backlight adjustment keys
In order to use these keys make two scripts:
#!/bin/csh
#
# mute script "mute"
set curvol = "`mixer -f /dev/mixer1 -s vol`"
if ( -f ~/.savemute ) then
set lastvol = "`cat ~/.savemute`"
else
set lastvol = ""
endif
if ( "$curvol" == "vol 0:0" ) then
if ( "$lastvol" != "" ) then
eval mixer -f /dev/mixer1 $lastvol
endif
else
if ( "$lastvol" != "$curvol" ) then
echo "$curvol" > ~/.savemute
endif
mixer -f /dev/mixer1 vol 0
endif
#!/bin/csh
#
# backlight script "backlight"
set level = `sysctl -n hw.backlight_level`
@ level = $level + $argv
sysctl hw.backlight_level=${level}
add next lines to ~/.xbindkeysrc
:
# Volume
#
"/path/to/scripts/mute"
F8
"mixer -f /dev/mixer1 vol -5"
F9
"mixer -f /dev/mixer1 vol +5"
F10
# Screen
#
"/path/to/scripts/backlight -100"
F6
"/path/to/scripts/backlight 100"
F7
You must call xbindkeys somewhere in your .xinitrc
.
Hint: You can set default blacklight level by placing next line in .xinitrc
:
sysctl hw.backlight_level=7500
Home, End, Delete, ...
With Alt as modifier you can get:
Insert = Alt + \
Delete = Alt + BackSpace
Home = Alt + Left
End = Alt + Right
PageUp = Alt + Up
PageDown = Alt + Down
Create dirs for keyboard configuration
mkdir -p ${HOME}/.config/xkb/types ${HOME}/.config/xkb/symbols
Create modifiers' config file ${HOME}/.config/xkb/types/dell
which contains
xkb_types "dell" {
virtual_modifiers Alt;
type "ARROW" {
modifiers = Shift+Alt;
map[Shift] = Level2;
map[Alt] = Level3;
map[Alt+Shift] = Level3;
level_name[Level1] = "Base";
level_name[Level2] = "Caps";
level_name[Level3] = "Alt";
};
};
Create symbols' config file ${HOME}/.config/xkb/symbols/dell
which contains
xkb_symbols "dell" {
key <BKSL> {
type="ARROW",
repeat=yes,
symbol[Group1] = [backslash, bar, Insert],
symbol[Group2] = [backslash, slash, Insert],
actions[Group1] = [
NoAction(),
NoAction(),
RedirectKey(key=<INS>, clearmods=Alt)
],
actions[Group2] = [
NoAction(),
NoAction(),
RedirectKey(key=<INS>, clearmods=Alt)
]
};
key <BKSP> {
type="ARROW",
repeat=yes,
[BackSpace, BackSpace, Delete],
actions[Group1] = [
NoAction(),
NoAction(),
RedirectKey(key=<DELE>, clearmods=Alt)
]
};
key <LEFT> {
type="ARROW",
[Left, Left, Home],
actions[Group1] = [
NoAction(),
NoAction(),
RedirectKey(key=<HOME>, clearmods=Alt)
]
};
key <RGHT> {
type="ARROW",
repeat=yes,
[Right, Right, End],
actions[Group1] = [
NoAction(),
NoAction(),
RedirectKey(key=<END>, clearmods=Alt)
]
};
key <UP> {
type="ARROW",
repeat=yes,
[Up, Up, Prior],
actions[Group1] = [
NoAction(),
NoAction(),
RedirectKey(key=<PGUP>, clearmods=Alt)
]
};
key <DOWN> {
type="ARROW",
[Down, Down, Next],
actions[Group1] = [
NoAction(),
NoAction(),
RedirectKey(key=<PGDN>, clearmods=Alt)
]
};
};
Add next line to .xinitrc
(or in some autoload/autostart)
setxkbmap -layout "us+dell" -types "complete+dell" -print|xkbcomp -I"$HOME/.config/xkb" - "${DISPLAY%%.*}"
Power savings
This sysctl setting tells the Dell to automatically go to the best power state it can:
sysctl machdep.mwait.CX.idle=AUTODEEP
You can try these settings as well, put the one you want in your /etc/sysctl.conf so you don't have to run the sysctl on boot (select one). If you have lockup problems with AUTODEEP or anything C4 or higher, then use C3/1.
- machdep.mwait.CX.idle=AUTODEEP
- machdep.mwait.CX.idle=C4/3
- machdep.mwait.CX.idle=C3/1
WARNING! We have recently come to believe that this mode may cause lockups on disk I/O (AHCI), so if you get lockups please try without setting this mode.