Saturday, November 11, 2017

Ubuntu 17.10 on surface pro 4

Today I tried to install Ubuntu 17.10 on my surface pro 4. At the beginning, I can't get the boot from USB to work. Later I realized in the UEFI setup page, there is a switch to enable boot from USB. Also swiping the "USB storage" item from the list can boot immediately from the USB device.

The installation itself runs smoothly since I already used the windows disk manager to shrink the volume to make some space for the linux installation.

During the installation, the typecover keyboard and mousepad works already, which means no USB hub is needed to have an external keyboard and mouse. After I've got the linux surface booted up, I find that The wifi works quite unstable. It drops the connections very frequently. I've tried to use the firmware under git://git.marvell.com/mwifiex-firmware.git. However, doesn't help much. I also tried the following suggestion from reddit

Edit /etc/NetworkManager/NetworkManager.conf and add the following lines at the bottom: [device] wifi.scan-rand-mac-address=no

Sadly, the problem still didn't seem to be completely solved. Finally, I've gone to this site https://github.com/jakeday/linux-surface, git-cloned the files and downloaded the patched kernel 4.14.0. Following the instructions, I've got the touch screen working and now the wifi is also quite stable. From time to time I still get lost typecover when the system sleeps.

Another strange issue I've got is the when connecting using openconnect to corporate network, the name can't be resolved by nds. I have to run "systemd-resolve -status" to find out the DNS used by corporate network and add the following line to /etc/network/interfaces:

dns-nameservers  [ip of coporate DNS]


Monday, July 24, 2017

Downgrade a package to fix package dependency issue

I've got the following error message when I tried to install g++ on ubuntu 17.10.

The following packages have unmet dependencies:
 build-essential : Depends: libc6-dev but it is not going to be installed or
                            libc-dev
                   Depends: g++ (>= 4:5.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.













After checking that dependency using following command:
apt-cache policy libc6-dev

It looks like it depends on an earlier version.
libc6-dev:
  Installed: (none)
  Candidate: 2.24-9ubuntu2
  Version table:
     2.24-9ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu artful/main amd64 Packages



So I went ahead to downgrade this package
sudo apt install libc6=2.24-9ubuntu2
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Suggested packages:
  glibc-doc
The following packages will be DOWNGRADED:
  libc6

...
dpkg: warning: downgrading libc6:amd64 from 2.24-9ubuntu2.2 to 2.24-9ubuntu2

After this downgrading this package, I can install the g++ again!