Least Action

Nontrivializing triviality..and vice versa.

Intel Skylake graphics flicker on Arch Linux

leave a comment »

Recently, I had the opportunity to install Arch Linux on a brand new laptop based on the Intel Skylake architecture. Immediately after installing Google Chrome, I began to experience intense screen flicker. I came across a post on the Arch Linux forums where someone suggested the following solution to this problem:

  1. (As root), create a file named 20-intel.conf in /etc/X11/xorg.conf.d.
  2. Open the file in your favorite editor (I use vim, so steps 1 and 2 can be combined) and enter the following lines in the file
    Section "Device"
       Identifier  "Intel Graphics"
       Driver      "intel"
       #Option      "AccelMethod"  "sna"
       Option      "TearFree"    "true" 
       Option      "DRI"    "3" 

Now, restart X Windows, and the flicker should go away.

Written by Vivek

April 10, 2016 at 10:34

Posted in Linux

Tagged with ,

Getting sound to work in Arch Linux

leave a comment »

Make the following file in your home directory (~/) and save it as .asoundrc (note the leading .)

pcm.!default {
        type hw
        card 1

ctl.!default {
        type hw
        card 0

Written by Vivek

July 16, 2015 at 11:15

Posted in Linux

Tagged with ,

~/.xinitrc and /etc/X11/xorg.conf for Arch Linux Optimus configuration

leave a comment »


xrandr –setprovideroutputsource modesetting NVIDIA-0
xrandr –auto
#xrandr –output VGA-1-0 –off
#xrandr –output VGA-1-0 –left-of VGA-I-1 –mode 1920×1080 –gamma 1.2:1.2:1.2
xrandr –output VGA-I-1 –primary –mode 1920×1080
exec startkde

/etc/X11/xorg.conf (to be used with nvidia driver, not otherwise)

Section “ServerLayout”
Identifier “layout”
Screen 0 “nvidia”
Inactive “intel”

Section “Device”
Identifier “nvidia”
Driver “nvidia”
BusID “PCI:1:0:0”
Option “ConstrainCursor” “0”
Option “nvidiaXineramaInfoOverride” “1920×1080+0, 1920×1080+0”

Section “Screen”
Identifier “nvidia”
Device “nvidia”
Option “AllowEmptyInitialConfiguration” “Yes”
Option “ConnectedMonitor” “CRT-0”
Option “CustomEDID” “CRT-0:/sys/class/drm/card0-LVDS-1/edid”
Option “IgnoreEDID” “false”
Option “UseEDID” “true”

Section “Device”
Identifier “intel”
Driver “modesetting”
BusID “PCI:0:2:0”
Option “AccelMethod” “sna”

Section “Screen”
Identifier “intel”
Device “intel”

Written by Vivek

July 15, 2015 at 02:47

Posted in Linux

Tagged with ,

Installing Cadabra in Arch Linux

leave a comment »

Cadabra is available on the AUR for Arch Linux, but one of the required libraries called conlie, has the wrong upstream URL in the default PKGBUILD.
conLiE.tar.gz is available here: http://www.filewatcher.com/m/conLiE.tar.gz.361170-0.html

A sample PKGBUILD for conlie, which you can edit while installing Cadabra, is listed below. I have changed the md5sum relative to the ones in the original (as of July 15, 2015, it hasn’t been updated).

# Contributor: Dariusz ‘quasi’ Panchyrz <quasi@aur.archlinux.org>

pkgdesc=”A Computer algebra package for Lie group computations”
arch=(‘i686’ ‘x86_64’)
source=(http://wwwmathlabo.univ-poitiers.fr/~maavl/LiE/conLiE.tar.gz lie lie.1)

build() {
cd LiE


package() {
cd LiE

install -D Lie.exe $pkgdir/usr/bin/Lie.exe
install -D $srcdir/lie $pkgdir/usr/bin/lie

mkdir -p $pkgdir/usr/lib/lie
for i in INFO.* LEARN.ind
cp $i $pkgdir/usr/lib/lie/

install -D manual/manual.dvi $pkgdir/usr/share/doc/lie/manual.dvi
install -D README $pkgdir/usr/share/doc/lie-2.2.2/README

install -D $srcdir/lie.1 $pkgdir/usr/share/man/man1/lie.1

Written by Vivek

July 15, 2015 at 01:33

Posted in Linux

Tagged with ,

Connecting to an MSCHAPV2-based wireless network in Arch Linux

leave a comment »

Arch Linux comes with “wifi-menu”, but this does not let you connect to a WPA2-based network which requires you to enter both a login-id as as well as a password. Some of these networks use MSCHAPV2, which due its vulnerabilities, is not recommended by the Arch community (see https://wiki.archlinux.org/index.php/WPA2_Enterprise). On the campus I am currently stationed in, we have a MSCHAPV2-based network known as WolfieNet-Secure, the alternative to which is an unsecured wifi connection. The university does not currently offer any Linux support and their instructions for configuring WolifeNet-Secure in Linux work only for Ubuntu (which comes with out of the box MSCHAPV2 support).

This is a quick and fast way to get such a network connection to work in Arch Linux. But this is not the best way, and I strongly suggest using it once to set up Arch Linux but switch to Network Manager once you have X Windows working. This is particularly important if you are behind such a network, cannot get access to a network cable, and must install Arch Linux off the net.

Step 1: Bring up the interface.

ip link set wlp5s0 up

Replace wlp5s0 with your wireless interface.

Step 2: As superuser, create a new file /etc/wpa_supplicant/example.conf, with the following


Step 3: Start wpa_supplicant using

wpa_supplicant -B -i wlp5s0 -c /etc/wpa_supplicant/example.conf

Step 4: Create a script which connects to the network.


wpa_cli -wlps5s0 disconnect
wpa_cli -wlp5s0 add_network
wpa_cli -wlp5s0 set_network 0 auth_alg OPEN
wpa_cli -wlp5s0 set_network 0 key_mgmt WPA-EAP
wpa_cli -wlp5s0 set_network 0 pairwise CCMP
wpa_cli -wlp5s0 set_network 0 group CCMP
wpa_cli -wlp5s0 set_network 0 proto WPA2
wpa_cli -wlp5s0 set_network 0 eap PEAP
wpa_cli -wlp5s0 set_network 0 identity “login-id
wpa_cli -wlp5s0 set_network 0 password “password
wpa_cli -wlp5s0 set_network 0 phase1 “peapver=0”
wpa_cli -wlp5s0 set_network 0 phase2 “MSCHAPV2”
wpa_cli -wlp5s0 set_network 0 mode 0
wpa_cli -wlp5s0 set_network 0 ssid “WolfieNet-Secure”
wpa_cli -wlp5s0 select_network 0
wpa_cli -wlp5s0 enable_network 0
wpa_cli -wlp5s0 reassociate
wpa_cli -wlp5s0 status

Save this file in your /usr/bin or your home folder, for instance by an unimaginative name like “wificonnect” and then make it an executable using

chmod +x wificonnect

Step 5: run dhcpcd (this may be optional in some setups)

dhcpcd wlp5s0

Finally, add the script to your system startup. I find it convenient to actually execute it by hand for now. But if you work mostly in X Windows, then doing so manually may be an annoyance.

A drawback of the above script is that your password is stored in plaintext. This is easily fixable, and one can introduce a layer of encryption. Documentation for this is easily available on the internet and is a matter of common knowledge among experienced users of Linux, so I won’t go into this in more detail.


1. dhcpcd will usually run by itself if you enabled it using

systemctl enable dhcpcd.service

Another issue is that on some laptops, due to shaky network adapter support, it may be useful to first connect to an open wifi network (if one is available) to get the interface running, before switching over to a secure wifi using the above script.

2. If you have multiple profiles, it may become necessary to change the number 0 which appears after each set_network command in the above script, to 1 or some other number. To verify this, one can run


and type each line of the above script after removing the leading “spa_ctl -wlp5s0” statements. The add_network command will return a number, which if other than 0, must be entered in the script above.

There may be additional tweaks or caveats, which I may update in future.

Written by Vivek

July 12, 2015 at 21:27

Posted in Linux

Tagged with

Trivial yet cool fact about the Lorentz algebra

leave a comment »

If you forgot how a rank-2 tensor transforms in the Lorentz algebra, specifically the commutator of T_{ab} with the Lorentz generator M_{ab}, you might think you require a long amount of algebra to reconstruct it (or some memory). But you don’t, as long as you know how a rank-1 tensor transforms.


[M_{ab}, V_c] = V_{a[}\eta_{b]c}

The way to remember this is that the left hand side is antisymmetric in a and b, so one must have an explicit antisymmetrization on these indices on the right hand side. Finally, V already had an index c to begin with on the left hand side, so it must give it up to the only other rank-2 tensor we have at hand which is \eta. Maybe there’s a better way of phrasing this, but anyway what else could it be?.

Now you want to really find [M_{ab}, T_{cd}] so the “trick” lies in realizing that T_{cd} itself, by definition of a rank-2 tensor, must transform like the product of two rank-1 tensors. This immediately gives you the answer, because now all you need to do is compute [M_{ab}, V_c V_d] and use the famous commutator identity [A, BC] = [A,B]C + B[A, C], and then identify terms like V_c V_a with T_{ca} etc. Of course,  you will want to be careful about the ordering because naively it may seem that V_c V_a = V_a V_c so you may incorrectly identify this term as T_{ac} instead. That’s the only catch in this approach, but of course if you keep the ordering (even of commuting components) as prescribed originally by the famous commutator identity, you get the correct result, namely

[M_{ab}, T_{cd}] = T_{ca}\eta_{bd} - T_{cb}\eta_{ad} + T_{ad}\eta_{bc} - T_{bd}\eta_{ac}

Written by Vivek

February 13, 2015 at 08:32

Errata for Basic Concepts of String Theory by Blumenhagen, Lüst and Theisen

leave a comment »

This is an unofficial errata for the book Basic Concepts of String Theory by Ralph Blumenhagen, Dieter Lüst and Stefan Theisen. I couldn’t find an official errata, but I’ll probably discontinue this at some point when I do run into one.

Chapter 2: The Classical Bosonic String

  • Page 8. The line below equation 2.3. There should be two dots, one each on x^\mu and x^\nu in the definition of \dot{x}^2.

Chapter 8: The Quantized Fermionic String

  • Page 213: Equation 8.56. There is only one charge conjugation matrix in odd dimension d = 2n+1, either C_+ or C_-. To find out which one it is, for odd d, determine d(d-1)/2: if this is even, C_+ exists; if it is odd, C_- exists. So, equation 8.56 is wrong: one should use C_- for odd n, and C_+ for even n.To derive this criterion, compute C \gamma_c C^{-1} and observe that it equals (-1)^{d(d-1)/2} \gamma_c in general, which determines whether C = C_+ or C = C_-. For a quick list of charge conjugation matrices in various dimensions and their symmetry properties, see page 11 of http://www.nikhef.nl/~t45/ftip/AppendixE.pdf.

Written by Vivek

December 27, 2014 at 15:05

Posted in Errata, String Theory

Tagged with


Get every new post delivered to your Inbox.