- Configuring Arch Linux on Dell XPS 15
- Contents
- User management
- Arch User Repository
- X11 and Window Manager: dwm
- Terminal: xterm
- Input: Trackpad gestures (libinput)
- Sound
- Storage: NVMe SSD
- Graphics: Nvidia and Bumblebee
- Power Management
- Powertop
- Battery status
- Backlight
- Laptop mode
- Suspend/hibernate
- Debugging suspend/hibernation
- Locking screen on sleep
- Networking: netctl, Unbound
- Security
- Browser: Firefox
- Backups: rsnapshot
- Password Management: pass
- Gaming: Steam/Wine
- Gamepad
- iPhone
- Dell XPS 15 7590
- Contents
- Pre-Installation UEFI Settings
- Power Management
- Suspend
- Hibernate
- Powertop
- Discrete Graphics
- Thermal Management
- Graphics
- Intel modesetting issues
- NVIDIA Optimus
- Backlight
- Backlight function keys
- Networking
- Firmware Update
- Fingerprint reader
- Dell XPS 15
- Contents
- System Settings
- Differences between XPS 9550 & Precision 5510
- XPS 15 9560 and «early 2017» revision
- System Setup
- Power Management
- Sound
- Microphone
- No audio input through combo jack
- Graphics
- Intel only
- Intel with Nvidia
- Screen
- External Display
- Multihead
- Bluetooth
- Webcam
- Special Touch Keys
- Alternative method
- Hidden Keyboard Keys
- Touchpad Gestures
- libinput
Configuring Arch Linux on Dell XPS 15
In the previous post, we’ve successfully booted into Arch Linux from our encrypted root partition.
Let’s now configure it to our (my) liking.
Contents
User management
Arch User Repository
The Arch User Repository (AUR) contains community-driven packages. yaourt is a popular front-end for it. Enable it by:
X11 and Window Manager: dwm
Determine your 3D card:
Configure dwm to e.g. use xterm as terminal and change the modifier key to Windows key ( Mod4Mask ):
dwm should start.
Terminal: xterm
For some reason, I’m stuck on using xterm . Even its manual page says that it needs to be rewritten, so feel free to go find an alternative.
For the rest of us, at least the following tweaks are useful:
Finally, use the .Xresources from my dotfiles:
Important things for me is that Caps Lock is mapped as a Control key, and that the Alt (or whatever is left of space bar) acts as Meta. These can be found from the dotfiles , but I’ll highlight them here too:
Furthermore, I like to have my tilde character lower on the keyboard, on the right side of left-shift:
Additionally, increase the Linux console font size:
And apply it to early userspace too:
Input: Trackpad gestures (libinput)
I chose to use libinput over synaptics for the touchpad driver.
These can be found from xutils in my dotfiles (described above).
Sound
Just install alsa-utils , and use alsamixer to unmute the master channel. Should just work.
For keyboard hotkeys, add the following to xbindkeys configuration:
Storage: NVMe SSD
Trimming is an operation SSDs benefit greatly of. However, enabling it for encrypted drives is a security risk 1 . The options are to enable trim and suffer the weakened security, or at regular intervals take maintenance on the drive.
One way of minimizing writes, which can especially wear down SSD, is to use the noatime or relatime in the drives mount options. For me, this was enabled by default:
Graphics: Nvidia and Bumblebee
Let’s install bumblebee for smart switching of the integrated and dedicated graphics:
Power Management
Powertop
powertop is the best. Install it.
Run calibration as many times as you like. Eventually, powertop will start to show accurate power consumption estimates. Additionally, run it also with —auto-tune :
Also, add a systemd service for autotuning on startup:
Battery status
I use the command acpi -b for checking battery status. You need the package acpi for it.
Backlight
The display’s backlight is a huge power drain, and it is often convenient to have a hotkey to adjust it.
Now, add commands to xbindkeys for manipulating the backlight:
Laptop mode
Also, activate laptop-mode 2 :
Suspend/hibernate
Add resume to the kernel parameters:
Add the resume hook to initramfs.
Note that the resume hook should be after lvm2 !
Then, regenerate the initramfs:
Debugging suspend/hibernation
If suspend/hibernation does not work at first, debug it by setting pm_test
Go through the different stages ( freezer , devices ..) and watch the output of journalctl -r for what goes wrong.
Locking screen on sleep
I want to lock the screen ( slock ) whenever the system is put to sleep.
This can be achieved by setting systemd units that have the sleep.target activated 3 . See more examples from dotfiles/systemd :
Networking: netctl, Unbound
Use whatever network manager that rows your boat. I have experience in NetworkManager, but the default netctl in Arch Linux might be worth using too.
I’ve used dnsmasq in the past, but unbound seems like a cool caching DNS resolver that handles DNSSEC as well.
See the documentation how to configure it. Most importantly your /etc/resolv.conf should point to 127.0.0.1 to use your own DNS program.
Security
These are the basic steps I took to harden my Arch Linux.
To lockout a user for ten minutes after three failed login attempts:
Do not allow SSH login as root:
Restrict access to dmesg:
Configure firewall to drop pretty much all incoming connections, but allow outgoing and already established ones:
Do the same for IPv6 (ip6tables). You have to adjust some of the rules to IPv6.
Harden the Linux TCP/IP stack:
Browser: Firefox
I use Firefox. With a high DPI screen, however, you should increase the pixel density. Go to about:config and set the layout.css.devPixelsPerPx to 2.
Backups: rsnapshot
I use rsnapshot 4 . TODO.
Password Management: pass
This is kind of an extra section, since password management is pretty personal. I, however, have liked the utility pass , which is a simplistic bash script for linux utilities like pwgen .
pass uses your gpg-keys for encrypting/decrypting the files by default. See my earlier blog post on how to establish GPG.
Then, synchronize the
/.password-store between computers however you like.
Gaming: Steam/Wine
Because Wine uses 32-bit libraries, you have to enable the multilib repo
Setup a 32-bit wine environment:
Then, use `winetricks to install Steam:
You should be able to start Steam/Wine. Your mileage may vary. It is easy to have missed lib32 packages on a 64-bit system, so you might have to chase down dependencies.
Gamepad
My generic xbox pad just worked out-of-the-box. See the kernel docs for more info 5 .
You can test the pad:
iPhone
I like the robustness of iPhones. I tried a Sony Z5 Compact, but the first drop broke the glass. My iPhone 5 of three years has taken a substantial amount of beating and does not have a dent. Go figure.
Install libimobiledevice to access the iPhone in Linux:
Then, connect your iPhone via USB. Have the screen unlocked. It should be detected:
Источник
Dell XPS 15 7590
This article or section does not follow the Laptop page guidelines.
Device/Functionality | Status |
---|---|
Suspend | Working |
Hibernate | Working |
Integrated Graphics | Working |
Discrete Nvidia Graphics | Modify |
Backlight | Working |
WiFi | Working |
Bluetooth | Working |
rfkill | Working |
Audio | Working |
Touchpad | Working |
Touchscreen | Working |
Webcam | Working |
Card Reader | Working |
Function/Multimedia Keys | Working |
Power Management | Working |
EFI firmware updates | Working |
Fingerprint reader | Not working |
This page contains recommendations for running Arch Linux on the Dell XPS 15 7590 (2019).
Contents
Pre-Installation UEFI Settings
Before installing it is necessary to modify some UEFI Settings. They can be accessed by pressing the F2 key repeatedly when booting.
- Under ‘System Configuration’, change the SATA Mode from the default «RAID» to «AHCI». This will allow Linux to detect the NVME SSD.
- Under ‘Secure Boot’, disable secure boot to allow Linux to boot.
- Under ‘POST Behaviour’, change «Fastboot» to «Thorough». This prevents intermittent boot failures.
If you are using multiboot with an existing Windows installation, make sure that «fast startup» is disabled in Windows 8/10.
Power Management
Suspend
By default, the very inefficient s2idle suspend variant is incorrectly selected. This is probably due to the BIOS. The much more efficient deep variant should be selected instead:
To make the change permanent add mem_sleep_default=deep to your kernel parameters.
An easy way would be to add mem_sleep_default=deep to the GRUB_CMDLINE_LINUX_DEFAULT entry in /etc/default/grub:
Read more regarding the sleep variants on the kernel documentation [1].
Hibernate
Powertop
Discrete Graphics
Starting with the 460 series of the Nvidia drivers, optional advanced power management options can be enabled. See: [3]
After having set the configuration according to the Nvidia documentation, correct operation can be checked using nvidia-smi from nvidia-utils : nvidia-smi -q -d PERFORMANCE
When idle, the following state should be reported:
Reported power consumption in this state should be around 1W.
If you do not plan to use the discrete GPU at all, it can be completely disabled and powered off. See: Hybrid graphics#Fully Power Down Discrete GPU
Thermal Management
Default thermal management is not very optimized (this is my experience with the i9 processor at least).
The laptop gets hot quite often and the fans run at high speed most of the time.
One solution I found is to use powertop to get a quieter system.
See Powertop for details.
You may activate manual fans control with i8kutils. Install i8kutils AUR and dell-bios-fan-control-git AUR . Edit /etc/i8kutils/i8kmon.conf and enable services:
You may have to modify the modprobe options for dell-smm-hwmon to have the above work. See more at this reddit thread
Another solution to decrease CPU temperature by 8°C (as for i7) on average is to
This is likely to be reset though during adapter plugging and uplugging.
Graphics
Intel modesetting issues
As of early May 2021, the new kernel versions under 5.12.x are causing issues on the Precision 5540 variant of this model where the internal display goes black even before entering the tty.
The issue has been identified, but a fix is yet to be mainlined.
NVIDIA Optimus
Backlight
As of Linux kernel 5.12, the OLED backlight is fully supported and works in X11 and Wayland.
For earlier kernel versions, see Backlight#Color correction.
Backlight function keys
When using a LCD display device and in a desktop environment (KDE verified) the function key will be working out of the box for the DEs have their own key mapping. However, when in a window manager with modesetting driver (and also int the tty console), the backlight controlling function keys will not be working and will throw out errors like ACPI BIOS Error, could not resolve symbol .
Usually /sys/class/backlight/intel_backlight is symlinked to /sys/device/pci00/0000:00:02.0/drm/card0/card0-eDP-1/ , and by changing the value of backlight file inside the directory the backlight level can be controlled, but the operation needs root previliege. Establishing a udev rule and accordingly a backlight control group will help, but these steps can be done easily with the package light .
Then a mapping of function key to the command, say, light -A 3 and light -U 3 would be in need. XF86BrightnessDown and XF86BrightnessUp will not be working. The mapping of the keys can be done with acpid . Install the package, then insert these lines to the case «$1» in block
start and enable the service:
systemctl enable acpid.service , systemctl start acpid.service .
Networking
With kernel version 5.2.2 and linux-firmware 20190717.bf13a71-1, WiFi would be working out of the box.
Firmware Update
Firmware images can be found at Dell support page. Keeping an existing Windows system will make updates of BIOS much simpler. If a clean Arch Linux install is the case in order to install:
- Download the desired firmware from section «Dell XPS 15 7590 System BIOS»
- Save it in /efi/EFI/Dell/Bios/ or /boot/EFI/Dell/Bios/ (this path may vary, depending on your installation)
- Reboot the system, and enter the boot menu by pressing repeatedly F12 on Dell logo
- Choose «Bios Flash Update»
- Select the file previously saved, and start the process
The process will take about five minutes, during which the system will have some reboots and push fans at maximum speed. Finally the system will reboot normally.
Fingerprint reader
It is a Goodix fingerprint reader.
The producer does not provide any Linux driver nor documentation to implement one.
Some effort is in slow progress to reverse engineer the windows drivers (see [4]).
Источник
Dell XPS 15
This article or section is a candidate for merging with Dell XPS 15 9550.
This page is a work in progress! More info coming soon.
This article or section does not follow the Laptop page guidelines.
Device | Status |
---|---|
Network | Works |
Wireless | Works |
Sound | Works |
Bluetooth | Works |
Touchpad | Works |
Graphics | Modify |
USB 3.0 | Works |
Webcam | Works |
System info | Not tested |
Power management | Buggy |
WiDi | Not working |
Touchpad gestures | Modify |
- Works — Works out-of-the-box
- Modify — Works with modifications
- Not tested
- Not working
Contents
System Settings
Hardware settings om January 2011 model
For Sandy Bridge model (L502X)
For 2012 Model (L521X)
For 2013 Model (9350)
lspci for model 9550 (variant with touchscreen & PCIe m.2 ssd):
lsusb for model 9550 (variant with touchscreen & PCIe m.2 ssd):
lspci for model Precision 5510:
lspci for model Precision 5530 (With i9, Quadro P2000M, Hynix SSD, Intel Wireless-AC 9260):
Differences between XPS 9550 & Precision 5510
The Precision 5510 is essentially identical to the XPS 9550 variant, with the exception of an Intel Wireless NIC & Quadro 1000M Graphics Chip. Compared to the 9550’s Broadcom NIC & 960M graphics chip.
XPS 15 9560 and «early 2017» revision
There is a dedicated page for version 9560 from 2016 and 2017 (especially troubleshouting video related problems).
System Setup
Power Management
For the Sandy Bridge model (L502X): Suspend works; hibernation does not (it gets hung on a flashing cursor in text mode and does not even switch video modes).
If hibernation/resume fails, or does not consistently work, try each of the following:
- Enable early KMS for intel_agp and i915 .
- Create the following configuration file (Source):
Sound
This article or section needs language, wiki syntax or style improvements. See Help:Style for reference.
For the XPS 9550 variant, sound works out of the box with the linux kernel. If you try to plug in headphones, you will not hear any output from them. Upon restart, you will receive a Dummy Output as your sound card.
dmesg gives you this output:
aplay -l should give you this output if Arch can detect your soundcard:
aplay -l will give you this output if Arch cannot detect your soundcard:
You may or may not get sound back after a few restarts. This is a bug and has been documented here: FS#49157
- Install alsa-utils and run hdajackretask just toggle the drop down.
- Suspend and resume your computer (thank you spheenik)
- Restart your computer
- Disable sound BIOS, powerboot into Arch, enable sound in BIOS, start Arch with sound back
- Connect external sound card via USB
Regardless, for now, it is recommended that you do not/reduce hot-plugging headphones as it makes ALSA/PulseAudio break/very unstable.
Microphone
The XPS 15 provides a combo jack for audio input and output.
No audio input through combo jack
Headsets might only be recognized as headphones. Passing model=auto to the snd-hda-intel kernel module solves this issue. This can be done by creating:
Graphics
By default, both Intel and NVidia cards are active, which can consume a lot of power. Using the Intel-only setup below, you can reduce your battery usage due to disabling the Nvidia card. The Intel and Nvidia setup describes how to utilize both cards and save power using Bumblebee. See also Hybrid graphics.
Intel only
If your model comes with an nVidia card which you do not use then you can try to disable it with an ACPI command. Depending on the model, this can have a small to profound effect on the laptop’s temperature and battery life (it can more than double battery life!)
- Install the Intel video driver using the xf86-video-intel package.
- To make sure nVidia module will not load into your system:
- Remove nouveau and/or nvidia drivers
- Use acpi_call (compile acpi_call or use one of the AUR packages) to disable the nVidia card
acpi_call usage
One of the many results will be «works!». Use the value that works in the following call:
If none worked, you can try one of the other files in the /usr/share/acpi_call/examples directory.
For example, the following works on the XPS 15 9550:
You can use this command before and after to see how the battery consumption change (you need to disconnect sector first and the lower the better):
To make this permanent, just create a systemd unit file with your working command.
Intel with Nvidia
The Optimus setup consists of the integrated Intel chip connected to the laptop screen and the Nvidia card runs through this. As such, the Nvidia chip cannot be used without the Intel chip (some other laptops have the option in BIOS to turn Intel off and use just Nvidia, but not this laptop).
See the Bumblebee page set of instructions, particularly the Intel/Nvidia section which has been tested. The main thing to note is that installing both the Intel and Nvidia packages at once tends to avoid dependency issues.
Screen
9550 Flickering Screen:
To fix screen flickering issues add i915.edp_vswing=2 to your boot parameters.
External Display
Since the Display Port is controlled by the Intel driver, it tends to work quite well and will usually mirror the laptop display without configuration. Getting both the HDMI and DP adapters to display separate requires additional setup.
The Display Port can be accessed with a USB-C to Display Port adaptor, it should be a adaptor that works via «alternate mode» such as the plugable cable [1] (known to work), there are other adaptors that did not work (KiWiBiRD USB 3.1 Type C THUNDERBOLT 3 to DisplayPort 4K Adapter), though why it did not is unknown.
Multihead
The following instructions should help configure the laptop to display separate output on two external monitors. These instructions are similar in nature to the instructions [broken link: invalid section] on the Bumblebee page, though recent advancements in virtual displays on Intel reduce the number of steps and packages needed.
- First, follow the instructions in the previous section to install drivers for both Intel and Nvidia with Bumblebee.
- Run Xorg -configure to generate a xorg.conf file. It may have a different filename, so watch the output and regardless of where it generates it, copy it to /etc/X11/xorg.conf . This should generate something like the following (for two external monitors):
- Change the bumblebee.conf file to the following settings (these are scattered throughout the conf file):
- Add the following to your .xinitrc file.
- Run startx and check that your displays are working.
The modifications to .xinitrc automate the configuration of the displays. First, optirun is launched to run Bumblebee. Then, the intel-virtual-output utility (included with xf86-video-intel versions 2.99+) creates a few VIRTUAL displays; VIRTUAL2 was the display mapping to my HDMI port, run xrandr to double check this for yourself. The remaining commands may vary for your configuration, note that LVDS1 is the laptop screen and HDMI1 is actually the Display Port.
Remember that wireless_tools will be needed for using a network manager such as NetworkManager, see Wireless network configuration for more information.
Bluetooth
Some users may need to run
to get blueman working
Using power management with TLP might cause a problem. Excluding Bluetooth devices from USB autosuspend by setting:
can resolve the issue.
XPS 9550 with InfinityEdge 4K
The XPS 9550 4K, with its current state, is unstable due to its young age. A majority of the bugs stem from Dell’s BIOS.
Listed below are you may encounter with the XPS 9550 4K:
01.02.00
• Brightness works with slow fade (XF86MonBrightnessUp / xbacklight -inc:-dec)
• Sleep resume working around 80% of the time
• Resume from sleep restarts the laptop
01.02.10+
• Increased speeds (faster boot, applications feel snappier when loading, especially in 01.02.13)
• Black screen upon resume (the computer will operate as if it’s on, to get display to work, set brightness to max using keyboard shortcut)
• Brightness flickers/stutters when dimming or increasing the brightness (demonstrated in i3wm)
• Screen flickers on low brightness settings
• Possible poor fan behavior (not confirmed)
• Battery will not charge beyond 60%. The fix is to download and flash 1.2.14 BIOS or later Flashing 01.02.00 will be pointless after, as the issue carries over to this version of BIOS.
01.02.14 Download
• User report that the issue with the battery is fixed
• Still has black screen upon resume issue. To turn screen on, increase brightness to maximum using keyboard. It is not possible to decrease brightness after resume, either maximum or off.
• Increasing the brightness (eg, with xbacklight) by less than 9% does not have any effect. Decreasing by less than 9% always results in a decrease of 9%.
1.02.16 Download
• «Black screen upon resume» issue appears to have been fixed!
Many users have recommend the 01.02.00 BIOS, as it proves to be the most balanced out of all of the updates.
Webcam
If the camera seems that it does not work (black image), try to enable/disable auto-exposure (for example in Skype, the option is in the Video Settings and in guc). In reality, the camera tries to record at 0.5 fps and this is why it seems not to work, even if everything seems normal.
Special Touch Keys
The special touch keys are strangely mapped by default. One changes brightness, one does next track. They seem to be linked to the same key sequences as the Fn+F# keys that do the same job. To fix this, make this new file:
and add this to /etc/rc.local:
Alternative method
For L502x model the above method can be improved:
- No need to remap Play/Pause, Previous song, Next song keys as they are mapped correctly by default.
- For the first (leftmost) touch key: it’s wired in a weird way on the hardware level. It seems to be wired to both Super_L and x. Your best bet would be to remap this using your DE or something like xbindkeys. You may want to double-check with xev or xbindkeys -mk to see exactly what keys it is producing.
Thus the keymap file should be (I prefer standard location):
and add this to /etc/rc.local:
OR make a udev rule (the former remaps keys on boot, this lets udev take care of the remapping):
Hidden Keyboard Keys
For L502X model: there are additional Fn+ (sequences) that are not marked at all on the keyboard but underlying hardware generates them anyway. Here they are (if you find more add them to the table below):
Fn+ | Resulting key (sequence) |
---|---|
Fn+Esc | Sleep |
Fn+Super_L | Super_R |
Fn+Ins | Pause/Break |
Fn+Del | Ctrl + Pause/Break |
Fn+PrntScr | Alt + PrtSc/SysRq |
Touchpad Gestures
The 1.2.21 BIOS update has caused many users to lose mouse scrolling in Chromium. A bug report has been opened about the issue. A workaround would be to disable Smooth Scrolling in chrome://flags
libinput
XPS 9550
Working, using libinput and libinput-gestures.
Источник