Me, Myself and I

I love what I do because I do what I love.

More Common Ubuntu 7.10 problem fixes :))

Today I found solutions to two other frequent problems with Ubuntu and newer laptops.

1). When the headphone jack is plugged in the sound doesn’t stops in the internal speakers.

- The workaround to this problem is the following:

- compiling the latest alsa-driver, alsa-lib, alsa-utils and alsa-firmwire

- try adding the “options snd-hda-intel model=lenovo” line to the end of the “/etc/modprobe.d/alsa_base” file.

- and after a restart it will work as expected, or very very close to that :))

2). Getting hardware acceleration enabled with the ‘problematic’ Geforce Go 7300.

- Well in this case we could go the hard way, and re-compile our kernel and nvidia module by ourself,etc — but there is a lot more simple solution, and it will work almost 100% guaranteed.

- All we need to do is to get “envy”. Debian/Ubuntu users just type in a terminal: “sudo apt-get install envy”.use

- Now that we have envy installed we switch to the “real terminal” by pressing Ctrl+Alt+F1, and kill the GDM.

- “sudo /etc/init.d/gdm stop”

- after this we call “envy -t”, and press 1. You may have to solve some dependecies manually if the “process halts”, but that’s piece of cake especially under Debian/Ubuntu, because the problems will be listed by “apt” :)

- repeat the previous step after you solved the dependencies, and let the “envy” do his job.

When “envy” done, will ask you if you wanna let him to modify the “xorg.conf” — answer yes to this question, then it will ask if you want to reboot — chose yes again.

Now, if everything worked well, you should get to the “login” screen. If anything goes wrong just copy back the backed up “xorg.conf” and restart just X or the whole machine.

How to check if we have 3D acceleration? Well that’s quite simple … in a terminal type: “glxinfo | grep -i “direct” “

If you get “direct rendering: yes” then you can celebrate and you have 3D acceleration, if you get something else, then you may have to digg, and modify your xorg.conf, because there are big chances that the problem is in there.

Also to check the 3D in action, type “glxgears” in a terminal window. :)) Enjoy :)

Regarding to issue number two, I tried: Unreal Tournament 2003 (with all the details to maximum), OpenArena,Sauerbraten (a.k.a Cube2), just to name a few, and they all worked very very well :)

November 3, 2007 Posted by icebreaker | Games, Linux, Open Source, OpenGL, Operating System, Toughts on things, Ubuntu | | No Comments

Wireless + Ubuntu 7.10 = love

As almost everyone around here, I was waiting for the new Ubuntu mostly because it promised improved wireless support. 7.04 haven’t even recognized my wireless card, after install, and also I had sound problems, though anything else seemed to work great.The 7.10 solved these right out of the box, but I still wasn’t able to connect via WPA-TKIP and WPA2-AES to my wireless Netgear router.

So, after a few days of digging and reading, I managed to make my wireless connection working. It’s not the most elegant solution, but for me it works, and that’s all what matters.
In this guide, I assume that your wireless card is recognized by Ubuntu, and it’s functional. In 7.10 you have the wpa_supplicant installed by default, so you won’t have to worry about it.
Here is with what I came up, and making my wireless working, exactly as it works under Windows.

  1. I removed the silly network-manager by typing “sudo apt-get remove network-manager” in a terminal.
  2. Now go to System->Administration->Networking, and make sure to fill the fields with the correct info, and enable the wireless connection.
  3. To make sure that everything is right, check your /etc/network/interfaces file. Open up the file by typing “gksudo gedit /etc/network/interfaces”.

For WPA-TKIP:

iface wlan0 inet static
address 192.168.0.25
netmask 255.255.255.0
gateway <your router’s ip>
wpa-ap-scan 1
wpa-pairwise TKIP
wpa-group TKIP
wpa-psk <your long wpa key>
wpa-driver wext
wpa-key-mgmt WPA-PSK
wpa-proto WPA
wpa-ssid <your essid>

auto wlan0

For WPA2-AES:

iface wlan0 inet static
address 192.168.0.25
netmask 255.255.255.0
gateway <your router’s ip>
wpa-ap-scan 1
wpa-pairwise CCMP
wpa-group CCMP
wpa-psk <your long wpa key>
wpa-driver wext
wpa-key-mgmt WPA-PSK
wpa-proto WPA2
wpa-ssid <your essid>

auto wlan0

Make sure that these, are in the file, if not then add the lines, and save the file, then you can close the gedit window.
4. In a terminal type in the followings, exactly in this order:
“sudo killall wpa_supplicant” [enter]
“sudo /etc/init.d/networking stop” [enter]
“sudo /etc/init.d/networking start” [enter]

5. Now we should take a look at our connection status in the “Network Monitor” applet.
6. Finally we can do a “ping google.com” right from the terminal.

So, by now we should have a working wireless connection, but if you will restart your PC, you will have to type in the commands from “section 4.”.
That’s really, really annoying, so here is the solution to get wireless at startup automatically.

Type in a terminal “sudo gedit /etc/init.d/wifi” and paste the followings in the file (basically our 3 commands):

#!/bin/bash

#kill all wpa_supplicant instances
killall wpa_supplicant

#stop the network interfaces
/etc/init.d/networking stop

#start the network interfaces
/etc/init.d/networking start

Close the gedit window, and type “sudo chmod +x /etc/init.d/wifi” to make the script “executable”. When done, we must add it to be executed at every system
start-up as the last “thing”. :))

To do that type the following in a terminal window:

“sudo update-rc.d wifi defaults 99″

Later if you will like to disable this you have two choices:

1. “sudo update-rc.d -f wifi remove” OR
2. “sudo chmod -x /etc/init.d/wifi”

Too test out this, just restart your computer and you should have internet access right after boot-up, just like on a Wind0ze machine. Totally rad huh?

[Updates Sun Mar 30, 2008]

This “post” proven to be really popular, so here are a few updates, to make even more users happy :)

If you are getting your IP from your router automatically then you can replace this:

iface wlan0 inet static
address 192.168.0.25
netmask 255.255.255.0

with this

iface wlan0 inet dhcp

If you ping and you get no “reponse”, then it worth to check out your /etc/resolv.conf and make sure that it contains the following lines:

nameserver <your router’s ip>

You can edit / create this file by “sudo gedit /etc/resolv.conf”.

If it still doesn’t work, you may try changing “wlan0″ to “wifi0″,”ath0″ …

If you get disconnected you can always fire up a terminal and run “sudo /etc/init.d/wifi” to get your connection back, without any hassle …

Because the silly “network-manager” was removed you can add an “Network Monitor” to one of your Gnome Panels …

Also I’m thinking on coding a nice little GUI tool to do all this stuff, so stay tuned!

[Updates Sat Apr 26, 2008]

This works perfectly in the final release of Ubuntu 8.04 (Hardy Heron), just like Dave confirmed that it works with the beta.

[Updates Sat May 10, 2008]

The development of little GUI tool is on hold, eventually I will continue the development if there will be enough requests, but I seriously doubt it :)

Please feel free to post any comments/suggestions/experiences, etc. related to this. :))

November 3, 2007 Posted by icebreaker | Linux, Open Source, Operating System, Toughts on things, Ubuntu, Uncategorized | , , , , , , , , , , , , | 14 Comments