Monday, April 30, 2012

Android and USB Tethering v2

I've cleanup my kernel settings for using USB tethering with Android.
There aren't many modules needed to make it work.

Also DHCP is fetching an IP as soon as you enable tethering on your phone when you don't manage your connections with wicd or another client.

The following modules are needed in your kernel: -> Device Drivers -> Network device support -> USB Network Adapters <*> Multi-purpose USB Networking Framework -*- CDC Ethernet support (smart devices such as cable modems) <*> Host for RNDIS and ActiveSync devices (EXPERIMENTAL)
That's actually all you need. You can also build them as modules.

To use tethering with wicd, change your wired device in wicd settings from eth0 to usb0.

If your dhcpcd doesn't fetch an IP, use the following command: dhcpcd usb0

Tuesday, April 24, 2012

Acer Aspire 5755G - 14 - Bumblebee

It was surprisingly easy to get hybrid graphics to work.
I'm using the closed source nvidia-drivers and won't cover noveau in this post.

Check if nvidia is added to your make.conf: VIDEO_CARDS="nvidia i915 intel"

Add Bumblebee Overlay: layman -a bumblebee

Emerge Bumblebee and nvidia-drivers: emerge bumblebee emerge nvidia-drivers

Check the Bumblebee config file in /etc/bumblebee/bumblebee.conf: # The Driver used by Bumblebee server. If this value is not set (or empty), # auto-detection is performed. The available drivers are nvidia and nouveau # (See also the driver-specific sections below) Driver=nvidia

Add Bumblebee to autostart: rc-update add bumblebee default

Add your user to the bumblebee group: usermod -a -G bumblebee <user>

That's it so far, but there's still a small problem.
Bumblebee will start a desktop manager as soon as you boot. I'm using slim for that and it's working well.
Install any desktop manager you like and set it up before rebooting.

To use nvidia for special tools use: optirun <tool>

Remember to rebuild bbswitch every time you update your kernel: emerge -1 bbswitch

Acer Aspire 5755G - 13 - Xorg

Some changes in make.conf and the useflags are needed for a smooth experience in Xorg with the integrated Intel Graphics.

Changes in make.conf:

Mesa comes with a i915 flag for video cards support: VIDEO_CARDS="nvidia i915 intel"

Touchpad works only with synaptics support: INPUT_DEVICES="evdev synaptics wacom keyboard mouse"

Useflag changes: # disabled useflags USE="-joystick -caps -nls" # minimal qt support with egl instead of glx USE="${USE} -qt4 -accessibility -plasma -exceptions -jit -gstreamer gtkstyle qt3support egl" # fonts USE="${USE} fontconfig corefonts truetype cleartype" # system USE="${USE} threads acpi mmx sse sse2 ssse3 sse4_1" # services USE="${USE} udev dbus policykit udisks hibernate-script" # display and graphic USE="${USE} vdpau vaapi sna X opengl cairo v4l ffmpeg xinerama gtk gtk3" # media USE="${USE} alsa jack lensfun lcms exif png svg jpeg jpeg2k svg xmp" # audio dev USE="${USE} ladspa lash" # others USE="${USE} vim-syntax cjk"
Important useflags:
egl: Make use of egl instead of glx for qt rendering, egl is smaller and fully supported by mesa
vdpau: Adds support for outsourcing video decoding to nvidia
vaapi: Adds support for intel HD Video Acceleration API for hardware decoding
sna: SandyBridge's new acceleration

Changes in /etc/portage/package.use:

### media-libs #mesa vdpau media-libs/mesa g3dvl #mesa intel media-libs/mesa gbm gles2 openvg osmesa shared-dricore xa xvmc

Build Xorg: emerge xorg-server

Changes in xorg.conf:
Xorg is starting without any xorg.conf at all, but we can add some custom stuff to it.
We need to use the modular configs for xorg because of bumblebee.
Create the directory /etc/X11/xorg.conf.d: mkdir -p /etc/X11/xorg.conf.d
The naming of the files in /etc/X11/xorg.conf.d isn't important at all, choose whichever you like.

Keyboard Layout:
/etc/X11/xorg.conf.d/01-keyboard.conf Section "InputClass" Identifier "Logitech USB Receiver" Driver "evdev" #add german and us keyboard layout Option "XkbLayout" "de,us" Option "XkbVariant" "nodeadkeys," #make them toggle by using alt+shift; add termination of xorg by using ctrl+alt+backspace Option "XkbOptions" "grp:alt_shift_toggle,terminate:ctrl_alt_bksp" MatchIsKeyboard "on" EndSection

Acer Aspire 5755G - 12 - Fixing ACPI for backlight

My Acer Aspire came with a buggy dsdt image which didn't allow me to change the backlight of my screen and minor other things.

Things which are still not working after my changes:

  • Multimedia keys are unhandled
  • Fan control

Things which are working:

  • Backlight
  • Battery Status
  • Switch off Screen
  • Switch off Wifi
  • Changing CPU Frequency with laptop mode tools and cpufreqd
  • Bumblebee
    • Turn on/off Nvidia on fly
    • Dualscreen mode

I'm still not really happy with the bugfixes and will do further updates to the dsdt file. But all I really need is working now.

I've added the dsdt files to my git: Zentoo

How to use the dsdt.hex:

Copy the hex file to /usr/src as dsdt.h: cp dsdt.hex /usr/src/dsdt.h

Include it into your Kernel: Power management and ACPI options ---> [*] ACPI (Advanced Configuration and Power Interface) Support ---> (/usr/src/dsdt.h) Custom DSDT Table file to include

Add the following kernel parameter to your grub: linux (hd0,msdos5)/vmlinuz-3.3.2-pf rootfstype=btrfs root=/dev/sda7 ro rootflags=subvol=root quiet acpi_osi=Linux acpi_backlight=vendor

Sunday, April 22, 2012

KXStudio Applications for Jack

I'm curious about the applications collection of KXStudio, but I'm still struggling with my new laptop and it's creepy ACPI support. The stupid dsdt is really messed up and totally buggy. That's also the reason why the last parts of the Aspire tutorial are still missing >.<

But well, I've found some really neat tools for Jack today. They look like they could replace the laditray stuff.

There are no ebuilds for them yet, but if somebody wants to have a look and test them, here's the link: KXStudio:Applications

Some feedback would be great though. Let me know if it's worth to test them. ^^

Friday, April 20, 2012

Sunflower Filemanager - Ebuilds

I've finally got time to update the available ebuild for sunflower from maksbotan overlay.
You can find the ebuild for the latest release and a live ebuild on the belak overlay.
layman -a belak emerge sunflower -pv
All credits go to Maxim Koltsov. I've just made some small changes for the updated version.

Wednesday, April 11, 2012

Acer Aspire 5755G - 11 - Final steps before reboot

Some final settings need to be done before rebooting.

Settings in /etc/conf.d:

/etc/conf.d/hwclock: clock="local"

Check the file /etc/conf.d/keymaps and set it to your keyboard layout. keymap="de-latin1-nodeadkeys"


Fstab:

/etc/fstab: # /etc/fstab: static file system information. # # noatime turns off atimes for increased performance (atimes normally aren't # needed); notail increases performance of ReiserFS (at the expense of storage # efficiency). It's safe to drop the noatime options if you want and to # switch between notail / tail freely. # # The root filesystem should have a pass number of either 0 or 1. # All other filesystems should have a pass number of 0 or greater than 1. # # See the manpage fstab(5) for more information. # # fs mountpoint type opts dump/pass # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts. /dev/sda5 /boot ext2 noauto,noatime 1 2 /dev/sda7 / btrfs subvol=root,defaults 0 1 /dev/sda7 /usr/portage btrfs subvol=portage,compress 0 0 /dev/sda7 /var btrfs subvol=var,compress 0 0 /dev/sda7 /home btrfs subvol=home 0 0 /dev/sda6 none swap sw 0 0


Locale:

Edit the file /etc/locale.gen and add all locale you need. en_US ISO-8859-1 en_US.UTF-8 UTF-8 de_DE ISO-8859-1 de_DE@euro ISO-8859-15 de_DE.UTF-8 UTF-8 Run locale-gen: locale-gen

If you want to change your system language (The language in which your gentoo talks to you, system messages and such things), have a look into /etc/env.d.
You have to create a file 02locale with a content similar like this: LANG="de_DE.UTF-8" LC_COLLATE="C"

Root Password:

Set your root password. You aren't able to login without setting it. passwd


Reboot:

exit umount -l /mnt/gentoo/dev{/shm,/pts,} umount -l /mnt/gentoo/usr/portage umount -l /mnt/gentoo{/proc,/boot,/var} reboot


Good Luck! ^^