Neither one nor Many
Software engineering blog about my projects, geometry, visualization and music.
This is not going to be a really great blog post, but it consists of some notes that may be helpful to other people trying similar stuff, also for me; should I upgrade to a future version I can read here what I did the last time regarding customization/tuning of my laptop.
Most of my stuff is checked into git (.
-files in my home directory). That stuff really works out of the box and results in immediately having the right terminal fonts, settings, i3 configurations, vimrc, helper programs, and so on.
I'm not going to talk about that kind of configuration.
Slightly irrelevant, but I run Ubuntu Server so it is kind of minimal and run i3 on top of it. This Intel Skylake Notebook comes with two GPU's which is quite cool:
Ubuntu versions <= 17.04 I used to have issues with my Intel driver. I don't know why exactly, but I had to boot with nomodeset
during boot with grub to disable graphics altogether, and then install the NVidia propiatory drivers, and explicitly disable the Intel GPU.
The commandline tools I use for that are software-properties-gtk
and for disabling the Intel driver nvidia-settings
.
So the NVidia card was always used, this has the downside that the laptop on battery drains faster. Luckily with Ubuntu 17.10 it seems to work with the Intel driver. Maybe installing a newer kernel on an older Ubuntu version might help.
systemctl isolate multi-user.target
- switch to non graphical modesystemctl isolate graphical.target
- switch to graphical again
I don't think you'll need those commands much, you can also CTRL
+ALT
+F1
etc. to go to a console and run stuff there.
For example upgrading to a newer distribution can result in i3 restarting, if you started apt
in a terminal within i3
it can be annoying .I would switch to a newer kernel, better yet maybe choose the newest kernel. At the time of writing for me that was Linux zenbook 4.16.11-041611-generic #201805221331 SMP Tue May 22 17:34:25 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Got my commands from here, and this seems to be the official repo for that tool.
TL;DR
$ ukuu --list
$ xhost +
$ sudo ukuu --install v4.16.11
Stupidly enough I haven't tried it before until today, so I haven't tested the NVidia solution yet. But for Intel it seems to work. Oh man I've always hated the flickering / weird horizontal (sometimes diagonal) lines while playing any stupid youtube video, apparently super easy to fix:
sudo mkdir /etc/X11/xorg.conf.d
sudo vim /etc/X11/xorg.conf.d/20-intel.conf
Put this there:
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "TearFree" "true"
EndSection
Reboot. Awesome!
For NVidia the instructions are in the YouTube video, but I'll copy & paste them here, just in case the video gets deleted and I need to use it some day:
nvidia-settings
xrandr
# Template:
# nvidia-settings --assign CurrentMetaMode="CONNECTION:RESOLUTION_RATE +0+0 { ForceFullCompositionPipeline = On }"
# Example of the command:
nvidia-settings --assign CurrentMetaMode="DVI-D-0:1280x1024_60 +0+0 { ForceFullCompositionPipeline = On }"
Lines to add in the "xorg.conf":
Section "Device"
Option "NoLogo" "1"
Option "RenderAccel" "1"
Option "TripleBuffer" "true"
Option "MigrationHeuristic" "greedy"
Option "AccelMethod" "sna"
Option "TearFree" "true"
EndSection
Section "Screen"
Option "metamodes" "CONNECTION:RESOLUTION_RATE +0+0 { ForceFullCompositionPipeline = On }"
EndSection
(backup the old xorg.conf if you already have it):
sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.old
(then run):
sudo cp /home/linuxtrend/Desktop/xorg.conf /etc/X11/xorg.conf
Source: youtube for Intel, youtube for NVidia.
Ubuntu 17.04 I got it working, then upgrading to 17.10 it broke, everything worked, but after it resumed I got a blank screen and nothing worked, apparently that was a regression. Easily solved by updating the kernel to the newest version (for me), see discussion in comments in the bug report. The rest of these notes are from memory from a long time ago, so might be incomplete...
First of all, I couldn't manage to get it working with btrfs
, but that as quite a few kernel versions ago, so nowadays it might as well work (haven't tried it recently).
Either way I switched to ext4
since.
I also recall that I needed to switch to a non-encrypted swap partition, also maybe nowadays it works with encrypted swap.
root@zenbook:~# fdisk -l
Disk /dev/nvme0n1: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: FF45D748-1985-494A-84BA-F920256E4BDD
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 534527 532480 260M EFI System
/dev/nvme0n1p2 534528 567295 32768 16M Microsoft reserved
/dev/nvme0n1p3 567296 163441490 162874195 77.7G Microsoft basic data
/dev/nvme0n1p4 163442688 165429247 1986560 970M Windows recovery environment
/dev/nvme0n1p5 165429248 949882879 784453632 374.1G Microsoft basic data
/dev/nvme0n1p6 949882880 1000214527 50331648 24G Linux swap
Make sure that the swap partition is enabled:
trigen@zenbook:~> swapon -s
Filename Type Size Used Priority
/dev/nvme0n1p6 partition 25165820 0 -2
I placed this in /etc/fstab
:
/dev/nvme0n1p6 none swap sw 0 0
My laptop has less than 24GiB ram (16GiB), obviously it needs to be able to store a dump of your entire flash memory. One small caveat in my case, I had to instruct grub that /dev/nvme0n1p6 is the partitionto
Finally, edit /etc/default/grub
, edit something like this:
GRUB_CMDLINE_LINUX_DEFAULT="resume=/dev/nvme0n1p6"
You might as well change that annoying 10s timeout to something like 2s while you're at it . sudo grub-update
.
Will type this out tomorrow, right now I'm tired!
From: https://www.reddit.com/r/i3wm/comments/516e8c/tap_to_click_touchpad/
Check out the xinput command. xinput list will give you a list of input devices; find the ID of the one which looks like a touchpad. Then do xinput list-props
To make the change permanent, find a way to run that command on startup. One way would be to add exec xinput set-prop
Install lxinput