Il blog di Gas

Solo un altro sito WordPress

Archive for the ‘English’ Category

Laptop ubuntu suspend and nvidia virtual tty

without comments

I decided to keep ubuntu even if I don’t like this new release ( hardy ) at all. When it came out it used to hang for no reason , the new kernels seem to have solved the issue.

I had two big problems, I couldn’t hibernate/suspend and I couldn’t switch to the ttys with Alt+F1 for example.

Starting from the latter I realized that the nvidia-glx package instead of the nvidia-glx-new does the job. Since I don’t know the difference between the two packages and I really don’t care to have the newest nvidia driver I consider this problem fixed.

Now suspend works and not sometimes or just one time like it used in the past, I had to change some config options in /etc/default/acpi-support

SAVE_VBE_STATE=false
POST_VIDEO=false
SAVE_VIDEO_PCI_STATE=true

Hiberating is still a problem or better waking up from hibernation is a huge deal on my laptop. It does hibernate and it tries to wake up during next boot but when X starts everything freeze. It seems a kernel or xorg problem because I can’t turn on/off the capslock led. Here’s the bug I’ve filled, hopefully someoene will look at it.

Written by gas

giugno 7th, 2008 at 5:44 pm

Posted in English,Linux

Tagged with , ,

Nokia N95 and UPNP

with 5 comments

Finally i got it….at first it was a mess, some explanations on what does what:

  • Media Server: it serves the content on the network
  • Media Renderer: it renders the content served by a media server

So I actually needed both on my gentoo linux.

Probably the easiest way to browse content served by upnp servers is djmount , it works as a FUSE file system ( that can be mounted by a normal user) and it looks for all the upnp devices in a network. It works very well even with content provided by Windows Vista (or better from the Media Player that comes with windows vista). You create a directory and simply “djmount it”, in that directory there will be other subdirectories , one for each media server you have in your network.

Easy and working but not that cool, I mean…all this new stuff and , in the end, I still have to browse directories. I’m not using these new things just because I don’t want to plug in an usb cable, I’m not that lazy. So I went searching in various forums another solution.

MediatombMy first choice as media server was ushare, somehow connected to the geexbox project but it had its limitation, one above all that it doesn’t read tags, so when you copy a music file to another device you must retag it manually. Another problem was the init script that didn’t work that well and I didn’t have time/will to fix it. Mediatomb seems the definitive choice to me, it seems a nice project, it reads metadata and has a built in sqlite backend. (you can use mysql too but i don’t have the server on my box). Mediatomb has a webserver you can connect to and you can add/delete content to your share and chose how to rescan your library , you can chose inotify on that ( if you are using beagle you should already have inotify in your kernel).

When it goes to the Media Renderer it seems that there is not much choice yet, but there is some and in particular there is gmediarenderer from the GNU guys. GmediaRender , as the names says, it’s able to render content served from a MediaServer, it needs gstreamer as a backend for all the codecs (it actually uses gstreamer to render the stream ). If you have gmediarender running you can simply go to your nokia N95 media player , chose a song and in options chose “execute on personal network” ( or something like that) and your computer (not the phone) will sound. You can do the same for videos or pictures.

RhythmboxWhat about coherence? I have it installed and the rhythmbox plugins actually works , I can see my N95 and browse its contents but you can’t (yet) make rhythmbox work as a MediaRenderer. Coherence is supposed to be a full UPNP solution with its server, renderer and controller but the people who develop it are very good in making Youtube videos but not that good to explain the world “how the hell that damn thing works”.

What is missing? On my nokia I can chose to copy or move stuff to my personal network, I can’t do it and don’t know what part of this upnp mess should provide this feature.

Written by gas

febbraio 22nd, 2008 at 11:44 pm

Posted in English,Linux

Tagged with , , , , ,

Mldonkey and conky

with one comment

In the past conky had some built in features regarding mldonkey that have been dropped later. I launch a script that uses netcat to do the same thing ( at least what I need).


#! /bin/sh
USER=user ## mldonkey user
PASS=pass ## mldonkey password for user
HOST=192.168.1.2 ## host where mldonkey is running
PORT=4000 ##port
(echo "auth $USER $PASS";echo $1;echo q) | nc $HOST $PORT

and then for conkyrc

${execi 50 ml_command bw_stats|grep Down|awk -F " " '{print $1,$2,$3,$10,$11,$12}'}

Written by gas

febbraio 14th, 2008 at 2:12 pm

Posted in English,Linux

Tagged with , , , ,

Sync: Nokia , Thunderbird and Google Calendar

with 3 comments

I need to sync many applications on different devices so the best idea for me was using a central server where I can sync too. ScheduleWolrd is a funambol based service that regardless of its ugly interface does what I want .This small howto covers my Nokia N95 , thunderbird + lightning and Google Calendar but it should work with many other devices or applications. Syncing between ScheduleWorld and Google Calendar works mostly out of the box.
Read the rest of this entry »

Written by gas

dicembre 29th, 2007 at 6:08 pm

Posted in English,Generale,Linux

Tagged with , , ,

Laptop sound working

with 2 comments

I finally have sound , nice to hear :P

My laptop is a Packard Bell Easynote MX51-B-058 and is shipped with with Realtek ALC660 HD Audio sound chip, lspci gives the following:

gas@gas-laptop:~$ sudo lspci
00:00.0 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)
00:00.1 RAM memory: nVidia Corporation C51 Memory Controller 0 (rev a2)
00:00.2 RAM memory: nVidia Corporation C51 Memory Controller 1 (rev a2)
00:00.3 RAM memory: nVidia Corporation C51 Memory Controller 5 (rev a2)
00:00.4 RAM memory: nVidia Corporation C51 Memory Controller 4 (rev a2)
00:00.5 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)
00:00.6 RAM memory: nVidia Corporation C51 Memory Controller 3 (rev a2)
00:00.7 RAM memory: nVidia Corporation C51 Memory Controller 2 (rev a2)
00:02.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)
00:03.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)
00:04.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)
00:05.0 VGA compatible controller: nVidia Corporation C51 PCI Express Bridge (rev a2)
00:09.0 RAM memory: nVidia Corporation MCP51 Host Bridge (rev a2)
00:0a.0 ISA bridge: nVidia Corporation MCP51 LPC Bridge (rev a3)
00:0a.1 SMBus: nVidia Corporation MCP51 SMBus (rev a3)
00:0b.0 USB Controller: nVidia Corporation MCP51 USB Controller (rev a3)
00:0b.1 USB Controller: nVidia Corporation MCP51 USB Controller (rev a3)
00:0d.0 IDE interface: nVidia Corporation MCP51 IDE (rev a1)
00:0e.0 IDE interface: nVidia Corporation MCP51 Serial ATA Controller (rev a1)
00:10.0 PCI bridge: nVidia Corporation MCP51 PCI Bridge (rev a2)
00:10.1 Audio device: nVidia Corporation MCP51 High Definition Audio (rev a2)
00:14.0 Bridge: nVidia Corporation MCP51 Ethernet Controller (rev a3)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/fOpteron] Miscellaneous Control
01:00.0 Ethernet controller: Atheros Communications, Inc. Unknown device 001c (rev 01)

even if it says “Audio device:nVidia” you must use the snd-hda-intel module to make it work and actually ubuntu loads it during startup but sound still doens’t come out from speakers or headphones That module supports lots of chipset and sometimes they are not recognized properly and you must tell him what kind of chip you are using.
My “real” sound chip is the ALC660 from realtek and the solution for me was having a look at:

gas@gas-laptop:~$ zless /usr/share/doc/alsa-base/driver/ALSA-Configuration.txt.gz

scroll down until you find
Module snd-hda-intel
--------------------

Module for Intel HD Audio (ICH6, ICH6M, ESB2, ICH7, ICH8),
ATI SB450, SB600, RS600,
VIA VT8251/VT8237A,
SIS966, ULI M5461

and down again until you find
ALC861/660
3stack 3-jack
3stack-dig 3-jack with SPDIF I/O
6stack-dig 6-jack with SPDIF I/O
3stack-660 3-jack (for ALC660)
uniwill-m31 Uniwill M31 laptop
auto auto-config reading BIOS (default)

as you can see the default config for those chips is “auto” and thats bad….for me the right one was 3stack-660.

Last step and we are done:
gas@gas-laptop:~$ sudo nano /etc/modprobe.d/alsa-base

and add as the last line the following:
options snd-hda-intel model=3stack-660

now, just because we mostly all come from windows,reboot.

Have fun hearing

Written by gas

luglio 9th, 2007 at 9:36 pm

Posted in English,Linux

Tagged with , ,

Ferrari parts

with 3 comments

aka: those nice days when ferrari used to win….

motore2000

albero a cammegruppo frenomotorealettonegommeferrari2000

“stolen” by nuno

Written by gas

giugno 18th, 2007 at 5:37 pm

Posted in English,Generale

Tagged with ,

Vista on PackardBell

without comments

I got a Packard Bell with Vista on it that reminded me why i don’t like windows…..

Vista is a bunch of shitty tools whose reason to exist is to drive you nuts.

As soon as I started Vista I realized that having the harddisk led blinking every often would have driven me crazy in a couple of days, then I found out that my laptop had Norton installed and it is a very well known fact that after you install something from Symantec you simply can’t get rid of it, they love you and they’ll stick with you….forever.

But you know….I have paid for a license.So the next thing was trying to shrink that smart 120Gigs partition and try to make things a little bit more clever and wow! Vista as its own partition utlity that actually is able to shrink the only filesystem it can read, for once it seemed that MS had done something almost right. Nope. That Shrink utility is (again) stupid and the best that it can do is shrinking your partition to half of what it was so I had to reboot with gparted live who actually did the job. Not completely because Vista didn’t like those changes and some repairing utility started ( by itself) that after 3 hours let me boot Vista. So as a start if Packard Bell had provided me a damn windows install cd I was done in 1 hour by instead they had to do things the cool way with their own Master DVD.( that you must make it yourself and if you lose it your fucked because you can’t make another one).

Then usability: Vista is secure , it comes with a *nix like hierarchy , in fact when you want to do operations that could potentially destroy your computer your screen turns gray and you have to click two times rather than one and in my home this is a cracker safe environment.

Software: the only software I use on windows is SolidWorks that does’t work on my Vista, no wonder why in April the solidworks guys said that they are going to make a linux version of it (maybe because they use opengl?).

Solution: format and classical winxp install on is tiny 10Gigs in NTFS and the rest in something that Virus called windows can’t understand.

P.S. btw the laptop itself as far i can tell is not bad, the Atheros wireless seems less powerful that the intel one….

Written by gas

maggio 20th, 2007 at 4:04 pm

Posted in English,Linux

Tagged with ,

Bill

with one comment

Contentone…

bill_gates_ubuntu

Written by gas

aprile 25th, 2007 at 2:31 am

Posted in English,Generale,Linux

Tagged with , ,

Me Live!

without comments

Insipired by mugshot and Matt Brubeck I’ve made a similar thing for my blog. It uses venus for all the fetching and parsing (as planetlarry does ) and then I’ve used feed2js to embed it in my blog.

Here’s the source planet that generates the feed , here’s the page of my blog that uses that feed.

Written by gas

aprile 15th, 2007 at 10:35 pm

Posted in English

Tagged with , ,

Debian 4.0 out

without comments

A few months ago Etch was freezed now it has been officially released as Debian 4.0

These are the release notes and among the new changes I found:

  • PHP5.x
  • MySQL 5.x
  • Apache 2.2.x
  • GCC v4.1
  • from XFree86 to X.org v7.1

Updating

Fist of all install aptitude
apt-get install aptitude

I used to have Debian Sarge 64 that is a semi official backport , now Etch is shipped with amd64 architecture too so the backport is not needed anymore. Updating is not difficult , one should change all “sarge” to “etch” in /etc/apt/sources.list, mine look like this


deb ftp://mirror.switch.ch/mirror/debian/ etch main contrib non-free
#deb http://www.backports.org/debian sarge-backports main contrib non-free
deb http://security.debian.org/ stable/updates main contrib non-free
deb-src http://http.us.debian.org/debian stable main contrib non-free
deb-src http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
# TOR
deb http://mirror.noreply.org/pub/tor etch main
deb-src http://mirror.noreply.org/pub/tor etch main

the “www.backports” line is comments out because etch hit stable just today. Backports are binaries compiled for etch and shipped for sarge, sometime you can’t install a package because it misses a dependency but you can run it because it doesn’t miss any dependency while it runs, hence that backports that let me use the latest mldonkey with sarge for example.

Then


apt-get update
aptitude -f --with-recommends dist-upgrade

Note that aptitude was used rather that apt-get dist upgrade because is known to be more strict on dependencies that apt-get dist-upgrade, installing aptitude here as docs say will bring in lots of other packages.
I hope that etch will be as good as sarge , for me sarge never hanged once in its life, the only problem I had was a that a couple of deamons used to exit silently after a couple of weeks running . Hopefully etch comes with a version of shorewall that is able to handle traffic shaping.

2 cents about gentoo : I love gentoo and I have no intention to change my desktop distro …but debian management is damn faster… I remeber last Gcc major upgrade , rebuilding the the system and then the world , emerge breaking during night, a couple of days compiling vs 20 min of debs fetching in debian.

Edit:
Squid and Shorewall have new configurations:

  • Squid: ( ola ola Christian )delete these lineshttpd_accel_host virtual
    httpd_accel_port 80
    httpd_accel_with_proxy on
    httpd_accel_uses_host_header on
    and add this always_direct allow all.Now look for http_port X.X.X.X and add “transparent” the result should be something like this:http_port 192.168.1.2:8080 transparent
  • Shorewall: have a look at /usr/share/doc/shorewall/examples . Now the file “zones” must contain the firewall zone, there are no comments and no display any more so in the end you should find something like this:net ipv4
    loc ipv4
    fw firewall

    ipv4 is the default for normail traffic

Written by gas

aprile 9th, 2007 at 2:19 pm

Posted in English,Generale,Linux

Tagged with , , ,