星期一, 12月 22, 2014

Ubuntu 14.04 issue of SDIO kernel support (sdhci-acpi)

check reference links below.

http://serverphorums2.rssing.com/browser.php?indx=20361555&item=4129

http://ubuntuhandbook.org/index.php/2014/08/install-upgrade-linux-kernel-3-16/

Simply, update your kernel up to 3.16
2. For 64-bit system:
cd /tmp/

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-headers-3.16.0-031600-generic_3.16.0-031600.201408031935_amd64.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-headers-3.16.0-031600_3.16.0-031600.201408031935_all.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-image-3.16.0-031600-generic_3.16.0-031600.201408031935_amd64.deb

sudo dpkg -i linux-headers-3.16.0-*.deb linux-image-3.16.0-*.deb
Reboot and done.
If for some reason this kernel release doesn’t work properly for you, reboot into previous kernel (Grub -> Advanced -> select previous kernel) and run this command to remove Linux Kernel 3.16:
sudo apt-get remove linux-headers-3.16.0-* linux-image-3.16.0-*
Finally update grub menu:

sudo update-grub

*********** might be useful for realtek rtl8723bs module ************
http://ubuntuforums.org/showthread.php?t=2249936


星期四, 6月 26, 2014

Install Unity8 with touch

Install Unity 8 with touch
install 14.10
apt-get update then upgrade
install unity8-desktop-session-mir
##############
- for unity8 login hangs fix
wget https://launchpad.net/~ci-train-ppa-service/+archive/landing-005/+build/6112664/+files/qtubuntu-sensors_0.6%2B14.10.20140619-0ubuntu1_amd64.deb
and install this fix for unity8
- for unity8 touch fix
mkdir /usr/idc and create a file named /usr/idc/Vendor_04f3_Product_023e.idc
add 2 lines there
device.internal = 1
touch.deviceType = touchScreen
###################
log out and in, then you will see a Unity8-Mir option in login section

Quick note of LXC on Ubuntu 14.10 with X, MIR on Unity7

Install LXC
install lxc
* sudo for all lxc command
lxc-create -t ubuntu -n project-name
## The OS installed here is very limited, only pure rootfs, so most of commands and packages need to be installed manually. And the default user and password is ubuntu.ubuntu##

configuration files
--------------------
/var/lib/lxc/project-name/config
- add mount socket config into it
#lxc.mount.entry = /dev/dri dev/dri none bind,optional,create=dir
#lxc.mount.entry = /dev/snd dev/snd none bind,optional,create=dir1

# For mount the X socket and use it
lxc.mount.entry = /tmp/.X11-unix tmp/.X11-unix none bind,optional,create=dir
lxc.mount.entry = /dev/video0 dev/video0 none bind,optional,create=file
---------------------

Run LXC under default unity7 with X socket
lxc-start -n project-name
install bash-completion
(for tab usage, and need to reboot for enable)
install firefox
$firefox --display=:0
(Or you can do "export DISPLAY=:0)
Now you can see the firefox running on the screen via LXC

Run LXC under default unity7 with MIR socket
install mir-demos
switch to console mode (tty1)
sudo mir-demo-server-shell (will create the mir on tty1)
switch to tty2
change the default socket config, /var/lib/lxc/project-name/config, to
lxc.mount.entry = /tmp/mir tmp/mir none bind,optional,create=dir
create /tmp/mir and MOVE mir_socket from /tmp to /tmp/mir
chmod 777 /tmp/mir/mir_socket
### in container ###
lxc-start -n project-name
install mir-demos
* check /tmp/mir to see if there is a "mir_socket" file.
mir_demo_client_eglplasma -m /tmp/mir/mir_socket
DONE!!!


Unprivileged LXC containers
add below 2 lines in config file
lxc.id_map = u 0 100000 65536
lxc.id_map = g 0 100000 65536

Then, assign yourself a set of uids and gids with:

sudo usermod –add-subuids 100000-165536 $USER
sudo usermod –add-subgids 100000-165536 $USER
sudo chmod +x $HOME

Now create ~/.config/lxc/default.conf with the following content:

lxc.network.type = veth
lxc.network.link = lxcbr0
lxc.network.flags = up
lxc.network.hwaddr = 00:16:3e:xx:xx:xx
lxc.id_map = u 0 100000 65536
lxc.id_map = g 0 100000 65536
And /etc/lxc/lxc-usernet with:

veth lxcbr0 10
And that’s all you need. Now let’s create our first unprivileged container with:


lxc-create -t download -n p1 -- -d ubuntu -r trusty -a amd64

chmod +x for /home/user/.local   and   /home/user/.local/share
the config file will store at $HOME/.local/share/lxc/project-name/config
DONE!!!



reference site
https://www.stgraber.org/2013/12/20/lxc-1-0-your-first-ubuntu-container/


星期三, 10月 30, 2013

Atheros 0036 on ACER Aspire V5-132 with Ubuntu 12.04.2 (issue for ath9k)

This machine has only wifi connection, no wired to connect to Internet.
The worst thing is the native ath9k driver is failed, that means you won't have any resource to connect outside the world..... :(
Thus, here is what I have done for the solution (easy job) to get my wifi back to real life.

1. need a smart phone to share network with usb connection....:)
2. if not, then you may need to have any other same ubuntu 12.04.2 device to download all the packages, then copy to your system. (apt-get download package-name)
3. apt-get update (for updating your source list)
4. apt-get install linux-headers-generic build-essential
(for compiling driver later)
5. download the compat driver from the link below
https://www.kernel.org/pub/linux/kernel/projects/backports/stable/
from the link, you need to find out the package name "compat-drivers-3.9-rc4-2-s.tar.bz2" and download to local.
6. extract file and enter the folder
7. sudo su (easier to do all jobs later)
8. ./scripts/driver-select ath9k
9. make;make install
10. you can reboot and get your wifi back now.


星期一, 5月 27, 2013

Broadcom BCM43142 on Ubuntu 13.04 64bit

download the file: http://jas.gemnetworks.com/debian/po...19-1_amd64.deb
sudo apt-get install linux-headers-generic build-essential dkms
then install the debian package
but you need to install the following stuffs for 13.04
- linux-headers-generic
- bcmwl-kernel-source
then you can use wifi!
ps: This document is just integrate some contents from the other sites.

星期二, 3月 13, 2012

My ubuntu (11.10 Oneiric) on ASUS U41S

I bought a laptop,ASUS U41S, and installed ubuntu 11.10 on it. But found out many issues and record how to fix it listed below. The solution are from my experiences, many links (googling) and references, just integrate all fixes here. Not sure can fit all people using ubuntu on asus.

1. Fan Speed control.
When I power on my laptop with Ubuntu, the fan speed always (or usually) make lots of noises. Then I find a way to make it being quieter, that's lm_sensors. (but maybe still need to refer to power consumption as item 2.)

- Install lm-sensors


2. power consumption (2.5 hrs to 6 hrs)

- Enable ACPI ASPM
edit /etc/default/grub and add pcie_aspm=force
update-grub

#The major eating-power-monster will be the nvidia and unity3D with compiz, so change to 2D first.
- About acpi_call
git clone http://github.com/mkottman/acpi_call.git
cd acpi_call
make
sudo insmod acpi_call.ko # first trying
--> then copy acpi_call.ko to /lib/module/... and depmod -a
./test_off.sh # you can use this script to find out your "parameter" of acpi_call to disable the nvidia h/w

*** build acpi_call in dkms format under 12.10 ***
apt-get install dkms
put acpi_call folder into /usr/src/acpi_call-0.1
modify Makefile and dkms.conf

Makefile
obj-m := acpi_call.o default: $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules clean: rm acpi_call.mod.o acpi_call.o acpi_call.ko
dkms.conf

PACKAGE_NAME="acpi_call"
PACKAGE_VERSION="0.1"
CLEAN="make clean"
BUILT_MODULE_NAME[0]="acpi_call"
DEST_MODULE_NAME[0]="acpi_call"
MAKE[0]="make IGNORE_CC_MISMATCH=1 KDIR=$kernel_source_dir PWD=$dkms_tree/acpi_call/0.1/build"
DEST_MODULE_LOCATION[0]="/kernel/drivers/acpi"
AUTOINSTALL="yes"

build dkms format
sudo dkms add -m acpi_call -v 0.1
sudo dkms build -m acpi_call -v 0.1
sudo dkms install -m acpi_call -v 0.1

(can check the status with "dkms status" command)
and here is the link for reference.
https://wiki.ubuntu.com/Kernel/Dev/DKMSPackaging
http://hybrid-graphics-linux.tuxfamily.org/index.php?title=Acpi_call

---- save these in /etc/rc.local -----
# remove nouveau for nvidia before X
modprobe -r nouveau
# Disable nvidia h/w
modprobe acpi_call
echo "\_SB.PCI0.PEG0.GFX0.DOFF" > /proc/acpi/call
#then reboot, you should have more than 5 hrs power consumption now.

3. Suspend issue (can't fix hibernate yet)
From the solution, looks like the issue caused by usb.
- add the contents below into /etc/pm/sleep.d/20_suspend and chmod to 755
#!/bin/sh
#inspired by http://art.ubuntuforums.org/showpost.php?p=9744970&postcount=19
#...and http://thecodecentral.com/2011/01/18/fix-ubuntu-10-10-suspendhibernate-not-working-bug
# tidied by tqzzaa :)

VERSION=1.1
DEV_LIST=/tmp/usb-dev-list
DRIVERS_DIR=/sys/bus/pci/drivers
DRIVERS="ehci xhci" # ehci_hcd, xhci_hcd
HEX="[[:xdigit:]]"
MAX_BIND_ATTEMPTS=2
BIND_WAIT=0.1

unbindDev() {
echo -n > $DEV_LIST 2>/dev/null
for driver in $DRIVERS; do
DDIR=$DRIVERS_DIR/${driver}_hcd
for dev in `ls $DDIR 2>/dev/null | egrep "^$HEX+:$HEX+:$HEX"`; do
echo -n "$dev" > $DDIR/unbind
echo "$driver $dev" >> $DEV_LIST
done
done
}

bindDev() {
if [ -s $DEV_LIST ]; then
while read driver dev; do
DDIR=$DRIVERS_DIR/${driver}_hcd
while [ $((MAX_BIND_ATTEMPTS)) -gt 0 ]; do
echo -n "$dev" > $DDIR/bind
if [ ! -L "$DDIR/$dev" ]; then
sleep $BIND_WAIT
else
break
fi
MAX_BIND_ATTEMPTS=$((MAX_BIND_ATTEMPTS-1))
done
done < $DEV_LIST
fi
rm $DEV_LIST 2>/dev/null
}

case "$1" in
hibernate|suspend) unbindDev;;
resume|thaw) bindDev;;
esac

星期二, 2月 21, 2012

好玩的,一行列出99乘法表

echo $[{1..9}*{1..9}] | xargs -n9 | column -t