# Dell XPS support?



## stratacast1 (Jul 27, 2018)

I have a Dell XPS 9350 (Skylake), it does not have Nvidia graphics, and I'm contemplating putting FreeBSD on it. Before I decide to decommission my laptop for a time though, I want to ask if anyone has had success with it? I stripped out the Broadcom chip for the Intel...7265? AC wireless chip. I know it won't work over AC, that's okay I guess since my understanding is it requires some binary blob. If anyone can tell me, I would like to know:

How's the battery life? With Fedora I get around 10 hours
How reliable is sleep?
How's the trackpad?
Do all features work? Such as backlit keyboard, function keys
That's all I can really think of. Since this is a newer laptop with Intel, are there any general "gotchas" that I have to suffer with, or require extra configuration?


----------



## abishai (Jul 28, 2018)

I own this one and run FreeBSD on it.

1. Battery about 8 hours
2. You need manually remove 1 gpu binary blob or resume will fail. (dmc, I believe)
3. Huge issues with trackpad - synaptics doesn't work. Can be resolved with latest Xorg (not in ports), evdev enabled kernel and libinput. But, maybe things improved since I tried.
4. Headphone support needs some kernel patching. Backlit keyboard manages by BIOS and works. Brightness function keys don't emit anything.


----------



## k.jacker (Jul 28, 2018)

I don't have a XPS, but a Latitude 7240 business notebook. My brightness keys do not work either and the keypress *Fn+up/down* isn't recognized at all in Xorg.

I worked around that by loading acpi_video.ko on startup (`# sysrc kld_list+=acpi_video`) and than configured shortcuts in XFCE.
Now I just press *ctrl+up* or *ctrl+down* to run the following two scripts (one for brightness up, one for brightness down):

```
#!/bin/sh
# Brightness DOWN
doas sysctl hw.acpi.video.lcd0.brightness=$((`sysctl -n hw.acpi.video.lcd0.brightness`-10))
```


```
#!/bin/sh
# Brightness UP
doas sysctl hw.acpi.video.lcd0.brightness=$((`sysctl -n hw.acpi.video.lcd0.brightness`+10))
```

As you see, I use security/doas to gain write permission for sysctl.
If you like to do so as well, the following lines must be added to /usr/local/etc/doas.conf

```
permit nopass madde as root cmd sysctl args hw.acpi.video.lcd0.brightness=100
permit nopass madde as root cmd sysctl args hw.acpi.video.lcd0.brightness=90
permit nopass madde as root cmd sysctl args hw.acpi.video.lcd0.brightness=80
permit nopass madde as root cmd sysctl args hw.acpi.video.lcd0.brightness=70
permit nopass madde as root cmd sysctl args hw.acpi.video.lcd0.brightness=60
permit nopass madde as root cmd sysctl args hw.acpi.video.lcd0.brightness=50
permit nopass madde as root cmd sysctl args hw.acpi.video.lcd0.brightness=40
permit nopass madde as root cmd sysctl args hw.acpi.video.lcd0.brightness=30
permit nopass madde as root cmd sysctl args hw.acpi.video.lcd0.brightness=20
permit nopass madde as root cmd sysctl args hw.acpi.video.lcd0.brightness=10
permit nopass madde as root cmd sysctl args hw.acpi.video.lcd0.brightness=0
```
Replace madde with your username....


----------



## Chris_H (Jul 29, 2018)

As to your Broadcom wifi;
It should work with either the bwi(4), or bwn(4). Mine uses the bwn.
Setup is pretty easy. To get it acknowledged:
rc.conf(5):

```
# add any kernel modules not already in the kernel here
kld_list="if_bwn bwn_v4_ucode"

wlans_bwn0="wlan0"
ifconfig_wlan0="DHCP"
```
You'll neet to adjust according to how you authenticate, etc...
See also:
Wireless on FreeBSD (Handbood section on Wireless).

HTH, and Good luck!

--Chris


----------



## abishai (Jul 29, 2018)

k.jacker said:


> I worked around that by loading acpi_video.ko on startup


Doesn't work for XPS 13. But `intel_backlight` is OK, and it comes with suid bit.


----------



## k.jacker (Jul 29, 2018)

abishai said:


> Doesn't work for XPS 13. But  intel_backlight is OK, and it comes with suid bit.


That's less interesting for me. Why not provice the TS with some more detailed info about that.


----------



## zader (Dec 9, 2018)

Hey guys,
Just wondering in regards to the xps.. have you got power managment working? Or anything close to automatic graphics card switching to save power?


----------



## abishai (Dec 9, 2018)

XPS 9350 doesn't have dual graphics.


----------



## Beastwick (Jan 8, 2019)

abishai said:


> I own this one and run FreeBSD on it.
> 
> 1. Battery about 8 hours
> 2. You need manually remove 1 gpu binary blob or resume will fail. (dmc, I believe)
> ...



Hey there, thanks for all the info!
if I compiled all my software via ports do I still need to remove that one gpu binary blob and what does the kernel need patch wise to make the headphone jack work?


----------



## abishai (Jan 11, 2019)

No, it was fixed. 12.0 suspends and resumes out of the box. I believe jack is fixed as well.


----------



## Beastwick (Jan 30, 2019)

Unfortunately when I connect my headphones the sound is distorted. I first fixed sound auto switching between the speakers and jack and I tried the pcm 50:100 balance trick, but nothing works. Sound is distorted for all my headphones and I've noticed if I don't plug them in all the way I hear clear sound, but the second the get plugged in completely sound is inaudible and boosting the volume makes it sound but distorted.


----------



## abishai (Jan 30, 2019)

Beastwick said:


> Unfortunately when I connect my headphones the sound is distorted. I first fixed sound auto switching between the speakers and jack and I tried the pcm 50:100 balance trick, but nothing works. Sound is distorted for all my headphones and I've noticed if I don't plug them in all the way I hear clear sound, but the second the get plugged in completely sound is inaudible and boosting the volume makes it sound but distorted.


Apply this one https://reviews.freebsd.org/D19017 and recompile kernel.


----------



## Beastwick (Jan 30, 2019)

abishai said:


> Apply this one https://reviews.freebsd.org/D19017 and recompile kernel.



Thank you so much for pointing me in the right direction. I want to try this solution, but is there a handbook or wiki page detailing how I can apply a patch to the regular sources? I've used ports, but this seems like I have to patch the base system? Thanks so much!

Edit: Nevermind, guess I didn't see the whole message, looking for reference on kernel compilation.


----------



## Beastwick (Jan 30, 2019)

Ok that worked!

If anyone else is using a Dell XPS 13 9360, I applied the patch abishai posted. You must create a diff file of that commit and apply it using patch in the /usr/src and build your kernel.

For my laptop I also had to add hint.hdac.0.cad0.nid33.config="as=2 seq=15" so the headphones and speakers will auto switch.


----------

