wiki:ExperiencesWithSputnik
Last modified 4 years ago Last modified on 01/23/15 10:13:03

Experiences with Dell XPS 13 Sputnik

Recently got an Ubuntu based XPS laptop from Dell as my cloud front-end (to go along with our moves to OpenStackPlusCeph). Here are some notes about experiences with the laptop and the Ubuntu platform in no particular order or importance, just when i get time to post. I've been using openSUSE for more than a decade (remember the gnome kde split?) so some of this will be more about Ubuntu and the XPS.

I've been using the XPS for about two months and in general I think very highly of it. It's certainly a lot better than the only other laptop option, a Mac.

Update 20130712 It appears that project Sputnik kernel code has been included in the stock version of Ubuntu 13.04: https://launchpad.net/~canonical-hwe-team/+archive/sputnik-kernel

Ubunutu Annoyances

Trackpad and Typing

The large trackpad on the XPS is great, supports two finger scrolling, and is a smooth surface with the palm rest -- visually very appealing. I've been having a problem with it since I got it though. It seems I don't type the way I should and touch the trackpad often while I'm typing. This has the (sometimes disasterous) affect of causing my mouse to switch context to what ever window the pointer happens to be on. While I mostly working full screen mode, it still causes a more than occasion focus shift within the window. (Think email composition and the letters all of a sudden going to a different part of the screen :( .)

It finally annoyed me enough to find a fix.

There is a setting in System Settings->Mouse and Touchpad->Touchpad to "Disable Touchpad while typing" but this has been set since I got the laptop and clearly doesn't work or doesn't work well. This setting actually controls the on/off state for the `syndaemon` which monitors typing and turns the trackpad on and off. It has a lot of tunable features, like how long to wait after typing before turning the trackpad back on. It seems the gnome settings daemon hard codes these settings and there is no way to alter them via the UI. The only real workaround is to not use this feature and then start the syndaemon by hand (or via script). (The thread is from 2010 but this is still the case in 2013 in the current set_disable_w_typing() function. When the UI controls the feature the syndaemon is started like this

syndaemon -i 2.0 -K -R -t

That -t looks to be the real problem, it says to only disable tapping but not mouse movement. I'm currently trying out the same combo minus the -t

syndaemon -i 2.0 -K -R -d

The -d just means go to daemon mode which is what you want when gnome-settings-deamon isn't controlling it anymore.

This is working considerably better and I haven't had stray typing issues during the entire writing of this section. Will just need to get this to autostart.

Turning off the Trackpad

After playing some with the syndaemon options, I eventually opted just to turn the Trackpad off when I have my Logitech Anywhere MX mouse attached. It completely prevents stray trackpad activity an avoids all the annoyances around spurious selects, edits, and deletes that came from activating the trackpad with the side of my hand while typing.

An easy-to-use script turns off the trackpad via the X windows settings, :

cat > ~/bin/trackpad << EOF
#!/bin/sh
# turn track pad off and on
# takes args 0 for off and 1 for on
# 
# references that helped (can't find the original):
# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1103594
# https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/+bug/1092623
# 
# get device id of Cypress trackpad and disable or enable it

# Usage: $0 (0 | 1}
#  0 will disable the touchpad
#  1 will enable the touchpad

device=`xinput list | grep CyPS | sed -e 's/^.*id=\([0-9][0-9]*\).*$/\1/'`

case "$1" in

0)  echo "Disabling Cypress Trackpad : Device $device"
    ;;
1)  echo "Enabling Cypress Trackpad : Device $device"
    ;;
*) echo "Must provide single argument: 0 to disable touchpad, 1 to enable"
   exit 1
   ;;
esac

# Execute the xinput command
xinput set-prop $device "Device Enabled" $1
EOF
chmod +x ~/bin/trackpad

Then manually call trackpad 0 when you want to turn it off. I do this after plugging in the mouse. It comes on automatically after returning from suspend which is convenient or manually with trackpad 1.

References

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1103594 https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/+bug/1092623

Wireless Issues

My (MikeH) Dell XPS 13 shipped with the Atheros AR9462 wifi adapter. The card was horribly unreliable and completely useless at home when connected (or lack there of) to my Asus RT-N66U access point. Symptoms were constant disconnects or requests for access point passphrases.

After a lot of searching I discovered that:

  • The XPS has shipped with several different WIFI adapters, including the Atheros AR9462, Intel Centrino Advanced-N 6235 (rev 24) and KILLER N1202(?).
  • There are a large number of users reporting Linux issues with the wifi on the XPS running Ubuntu 12.04, 12.10 and 13.04
  • There are also users reporting that the wifi is extremely slow and eventually requires a reboot to temporarily resolve the issue. Some of these users reportedly had their wifi cards replaced under warranty, resolving the issue. Thus, in some cases, a defective card is to blame.

Atheros AR9462

The solution for the Atheros AR9462 on Ubuntu 13.04 was to create a new file under modprobe.d to disable hardware encryption via the ath9k driver and add a command to rc.local to disable power saving features. Some people report success with one or the other changes. I required both changes to get stable wifi.

  • Create or edit the ath9k.conf file
    sudo vim /etc/modprobe.d/ath9k.conf
    
    options ath9k nohwcrypt=1
    
  • Edit the rc.local file to add the command to disable power saving for the wifi card. Add the command before the final line containing "exit 0"
    sudo vim /etc/rc.local
    
    # Disable power management for the wireless card
    /sbin/iwconfig wlan0 power off
    

Intel Centrino Advanced-N 6235 (rev 24)

The resolution for laptops with the Centrino Advanced-N 6235 (rev 24) depends on which version of Ubuntu (really the kernel version). If you are running Ubuntu 12.04 LTS (version that ships with Sputnik), the fix may be as simple as installing a later kernel:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install linux-generic-lts-quantal

Other possible solutions are to disable 802.11n functionality and/or disabling IPv6.

  • Disable 802.11n: The kernel module loaded for the Intel Centrino card differs from 12.04 thru 13.04. It's either iwlagn for earlier releases or iwlwifi for later releases.
    • iwlagn: Create the modprobe.d file and add the option
      sudo vim /etc/modprobe.d/intel_wifi.conf
      
      options iwlagn 11n_disable=1
      
    • iwlwifi:
      sudo vim /etc/modprobe.d/intel_wifi.conf
      
      options iwlwifi 11n_disable=1
      
  • Disable IPv6
    echo "#disable ipv6" | sudo tee -a /etc/sysctl.conf
    echo "net.ipv6.conf.all.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
    echo "net.ipv6.conf.default.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
    echo "net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
    
    

References

Display Won't Dim

I (MikeH) experienced this issue on my XPS 13 Sputnik with Ubuntu 13.04 installed. Display dimming works fine with kernel 3.8.0-19-generic, but hasn't in all subsequent kernels (most recent at this time is 3.8.0-29-generic). Dimming doesn't work with the keyboard hot keys nor the Ubuntu display properties applet.

Andrew over at webupd8.org provides a work around for 13.04 along with this comment on the official bug #954661.

The following command will enable the dimming functionality, but the changes will not survive a suspend or reboot.

echo 0 | sudo tee /sys/class/backlight/intel_backlight/brightness

To make the changes survive suspend and reboot requires a new script in /etc/pm/sleep.d and an entry in /etc/rc.local respectively.

  • /etc/rc.local (entire file shown with the default entries)
    sudo chmod +x /etc/rc.local
    sudo vim /etc/rc.local
    
    
    #!/bin/sh -e
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    
    # Fix Dell XPS 13 backlight dimming functionality
    # https://bugs.launchpad.net/ubuntu/+source/linux/+bug/954661/comments/54
    # http://www.webupd8.org/2012/08/fix-dell-xps-13-backlight-brightness.html
    echo 0 > /sys/class/backlight/intel_backlight/brightness
    
    exit 0
    
    
  • /etc/pm/sleep.d/99-backlightfix (new script)
    sudo touch /etc/pm/sleep.d/99-backlightfix
    sudo chmod 755 /etc/pm/sleep.d/99-backlightfix
    sudo vim /etc/pm/sleep.d/99-backlightfix
    
    
    #!/bin/sh
    # to fix backlight issues on resume
    # https://bugs.launchpad.net/ubuntu/+source/linux/+bug/954661/comments/54
    # http://www.webupd8.org/2012/08/fix-dell-xps-13-backlight-brightness.html
    
    case "${1}" in
      resume)
        echo 0 > /sys/class/backlight/intel_backlight/brightness
        ;;
    esac
    
    

References

Samba and Kerberos Clients

The following configuration should allow your Sputnik client to connect to Windows (SMB) shares without being prompted for a password (assuming you already have a kerberos ticket and are accessing an AD client).

  1. Install the smb and krb5 clients
    sudo apt-get install smbclient krb5-user
    
    
  2. Configure /etc/krb5.conf
    • krb5.conf

      a b  
      11[libdefaults] 
      2         default_realm = DEFAULT 
       2        default_realm = AD.UAB.EDU 
      33 
      44# The following krb5.conf variables are only for MIT Kerberos. 
      55        krb4_config = /etc/krb.conf 
       
      3737        fcc-mit-ticketflags = true 
      3838 
      3939[realms] 
       40        AD.UAB.EDU = { 
       41                kdc = ad.uab.edu:88 
       42                admin_server = ad.uab.edu:749 
       43                default_domain = ad.uab.edu 
       44        } 
      4045        ATHENA.MIT.EDU = { 
      4146                kdc = kerberos.mit.edu:88 
      4247                kdc = kerberos-1.mit.edu:88 
       
      121126        } 
      122127 
      123128[domain_realm] 
       129        .ad.uab.edu = AD.UAB.EDU 
       130        ad.uab.edu = AD.UAB.EDU 
      124131        .mit.edu = ATHENA.MIT.EDU 
      125132        mit.edu = ATHENA.MIT.EDU 
      126133        .media.mit.edu = MEDIA-LAB.MIT.EDU 
  3. Configure /etc/samba/smb.conf
    • smb.conf

      a b  
      3535## Browsing/Identification ### 
      3636 
      3737# Change this to the workgroup/NT-domain name your Samba server will part of 
      38    workgroup = WORKGROUP 
       38   workgroup = UAB 
      3939 
      4040# server string is the equivalent of the NT Description field 
      4141   server string = %h server (Samba, Ubuntu) 
       
      100100# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html 
      101101# in the samba-doc package for details. 
      102102#   security = user 
       103   realm = AD.UAB.EDU 
       104   security = ads 
       105   password server = ad.uab.edu 
      103106 
      104107# You may wish to use password encryption.  See the section on 
      105108# 'encrypt passwords' in the smb.conf(5) manpage before enabling. 
  4. Ob
  5. Join the local workstation to Active Directory (you'll need to use an account that has the permissions to add a computer account to AD)
    sudo su -
    kinit ADAdminId@AD.UAB.EDU
    net ads join
    kdestroy
    exit
    
    
  6. At this point you should be able to get a kerberos ticket and then mount windows shares.
    • First run kinit to obtain the ticket
      kinit yourId@AD.UAB.EDU
      
      
    • The klist command will display the existing tickets
      klist
      
      Ticket cache: FILE:/tmp/krb5cc_500
      Default principal: myid@AD.UAB.EDU
      
      Valid starting    Expires           Service principal
      18/09/2013 15:31  19/09/2013 01:32  krbtgt/AD.UAB.EDU@AD.UAB.EDU
              renew until 19/09/2013 15:31
      
      
    • Next test the smbclient command to list available shares on a system that you know requires authentication (the -k switch tells the command to use kerberos)
      smbclient -k -L someserver
      
      OS=[Windows Server 2008 R2 Enterprise 7601 Service Pack 1] Server=[Windows Server 2008 R2 Enterprise 6.1]
      
              Sharename       Type      Comment
              ---------       ----      -------
              ADMIN$          Disk      Remote Admin
              C$              Disk      Default share
              D$              Disk      Default share
              IPC$            IPC       Remote IPC
              myid$           Disk      
              REMINST         Disk      Windows Deployment Services Share
      
      OS=[Windows Server 2008 R2 Enterprise 7601 Service Pack 1] Server=[Windows Server 2008 R2 Enterprise 6.1]
      
              Server               Comment
              ---------            -------
      
              Workgroup            Master
              ---------            -------
      
      
    • Up next, attempt to mount the share via Nautilus (File browser). Open the file browser, it CTRL L to display the address bar and enter the smb address, ex: smb://someserver/myid$ You should mount without a password prompt

Annotating PDF Documents

It seems annotating a PDF documents is possible with KDE's Okular PDF viewer/editor using the poppler library version 0.20 and above. Unfortunately, the stock Ubuntu 12.04 that comes with Sputnik only supports the poppler library at version 0.18. May need to wait till an upgrade to the next stable or 13.04 to get the more recent library.

$ dpkg-query -l \*poppler\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                          Version                       Description
+++-=============================-=============================-==========================================================================
ii  libpoppler-glib8              0.18.4-1ubuntu3.1             PDF rendering library (GLib-based shared library)
ii  libpoppler19                  0.18.4-1ubuntu3.1             PDF rendering library
ii  poppler-data                  0.4.5-2                       Encoding data for the poppler PDF rendering library
ii  poppler-utils                 0.18.4-1ubuntu3.1             PDF utilities (based on Poppler)

Reference

Good thread on Arch Linux site about PDF annotation: https://bbs.archlinux.org/viewtopic.php?id=164553

100% CPU Load with Firefox, Unity, and HUD

Running the stock Ubuntu 12.04.02 often leads to Firefox becoming unresponsive for 10-20secs or more on any input activity. Various reports link this to the Ubuntu extensions for global search indexing the Firefox menus when there are many bookmarks. There are some reported work arounds but no definitive fixes. Tracking my debug effort in ticket:242.

Moving Home Dirs

When I started using Ubuntu and migrated my user account home dir from my old opensuse laptop I wanted to explore what a pristine account looked like before bringing in my existing home dir. Unfortunately i didn't think far enough ahead during the initial setup and used my existing (and preferred) user name (jpr) for my initial account. Then when I migrated in my data I used a place holder user name "jpr-old" to create an account with my old data.

This all worked fine and my old openSUSE home dir migrated just fine for use under Ubuntu save for the shell initialization (more on that later). The problem has been that some of the account metadata, namely the folder shortcuts in the file browse windows and something embedded somewhere in VirtualBox's config, still point to their original /home/jpr path, which were incorrectly referring to the "test" user account.

I needed to move my jpr-old account to be the jpr account. I did this by moving jpr to jpr-new and then moving jpr-old to jpr. This was all done manually and complicated slightly by the ecryptfs setup for home dirs in use on Ubuntu 12.04.

Move jpr to jpr-new

This was needed to free up the name jpr for use by my jpr-old account, but provided a good testing ground. The steps are basically to change all references to the old home dir path to the new home dir path. This requires renaming the directories, changing entries in /etc/passwd, /etc/group, and a special ecryptfs mount file, and recreating symlinks to the corrected paths.

  1. Move the home dirs
    cd /home
    mv jpr jpr-new
    cd /home/.ecryptfs
    mv jpr jpr-new
    
  2. Update references to the new path
    vi /home/.ecryptfs/jpr-new/.ecryptfs/Private.mnt  # special ecryptfs file to tell path of home dir
    vi /etc/passwd # remember to change the user name and the home dir path
    vi /etc/group
    
  3. Correct the symlink path pointers
    cd /home/jpr-new
    rm .ecryptfs .Private 
    ln -s /home/.ecryptfs/jpr-new/.ecryptfs
    ln -s /home/.ecryptfs/jpr-new/.Private
    chown -h jpr-new.jpr-new .ecryptfs .Private
    

Move jpr-old to jpr

This was needed to free up the name jpr for use by my jpr-old account, but provided a good testing ground. The steps are basically to change all references to the old home dir path to the new home dir path. This requires renaming the directories, changing entries in /etc/passwd, /etc/group, and a special ecryptfs mount file, and recreating symlinks to the corrected paths.

  1. Move the home dirs
    cd /home
    mv jpr-old jpr
    cd /home/.ecryptfs
    mv jpr-old jpr
    
  2. Update references to the new path
    vi /home/.ecryptfs/jpr/.ecryptfs/Private.mnt  # special ecryptfs file to tell path of home dir
    vi /etc/passwd # remember to change the user name and the home dir path
    vi /etc/group
    
  3. Correct the symlink path pointers
    cd /home/jpr
    rm .ecryptfs .Private 
    ln -s /home/.ecryptfs/jpr/.ecryptfs
    ln -s /home/.ecryptfs/jpr/.Private
    chown -h jpr.jpr .ecryptfs .Private
    

It's not clear if there is some official way but the above manual steps worked and fixed the problems with folder shortcuts and the virtualbox startup of my original winxp image. Was previously getting an error about permission denied on a folder i did own, at least when the original path names are used.

References

Found the following links helpful in understanding what needed to be done.