Monday, February 11, 2013

Running quakelive on GNU/Linux

After getting a decent video card, the next obvious thing to do is to at least try it with a game...

quakelive.com is a nice one! (lots of actual free games out there to try to though)

I'm using debian, so I'll use iceweasel instead of firefox.

1. run iceweasel
2. go to quakelive.com and register + get the plugin file (QuakeLivePlugin_520.xpi)
3. mkdir -p ~/temp/quakelive; cd ~/temp/quakelive; unzip QuakeLivePlugin_520.xpi; cd ./plugins
4. depeneding on your architecture, copy the file npquakelive.i386.so or npquakelive.x64.so to ~/.mozilla/plugins
5. restart iceweasel
6. go to quakelive.com again, and it'll say plugin OK and start downloading the rest of the game! After that you'll be able to play.


GEFORCE GT610 video card in dell poweredge 840 server

And, trying to ignore reality, the only thing sane to do is to try to think something else real hard. Luckily I have lots of tasks like that.

I installed a GEFORCE GT610 in my new dell poweredge 840 server (I use my server as a desktop computer).
Model name GF-GT610-LP1GH, with 1 GB of video memory, pretty fast, and the best, works with a 32 bit PCI bus! (not pci-express!)
My computer has 1 32bit PCI bus, and two PCI-X (not express, eXtended! which is like a 64 bit PCI bus), so the card fits in any of these (you can put a 32 bit PCI card into a PCI-X one).

Maker page: http://kuroutoshikou.com/modules/display/?iid=1720

Official drivers for GNU/Linux (32 and 64 architecture available): http://www.nvidia.com/Download/index.aspx?lang=en-us

I'd prefer to use free software or at least open source for this kind of thing... apparently there are some options in the repositories (sudo apt-cache search nvidia). Please check those out too, I know I will...

How it goes:
1- Install the card in the server
2- Boot. You'll hear some beeps, and it'll take a lot longer than usual depending on your kernel
3- Depending on your X settings, you'll get no output to the monitor after the POST and maybe the init scripts have run.
4- If you get no output from your monitor (I didn't!), use ssh to login to your computer, run the file you get from the official drivers download page (chmod +x NVIDIA-Linux-x86-310.32.run; ./NVIDIA-Linux-x86-310.32.run)
5- You'll get compiled the kernel modules for the video card and your /etc/X11/xorg.conf settings will be changed ( notes on that below)
6- reboot
7- Cross your fingers and after probably a lot longer than you're used to, you'll see how the init scripts run, and you get your X session looking quite pretty!

Problems:
- the grub menu screen won't show... so right now I can't choose anything but my current default kernel/initrd on startup. This probably won't be so hard to fix
- the server won't halt! (it takes a lot to shutdown!)... yes, I guess the modules aren't working perfectly or something. I guess re-compiling your kernel for multiple displays support would fix it. Or at least trying a new kernel...
- it takes so long to boot! There's a pause between the grub start menu thing, and the actual initrd scripts running. I guess this is due to the kernel as well.

But besides that, it works perfectly!! I can finally see high-resolution videos without having to scale them smaller or dropping frames, and even better, I can finally play on my computer decently! I just tried quakelive without any trouble!


Random information:
computer: dell poweredge 840
OS: Debian GNU/Linux 6.0, kernel: 2.6.26-2
added lines on /etc/X11/xorg.conf:

$ bzr diff xorg.conf|grep +
--- xorg.conf 2013-02-11 07:06:13 +0000
+++ xorg.conf 2013-02-11 07:24:07 +0000
@@ -1,57 +1,54 @@
+# nvidia-xconfig: X configuration file generated by nvidia-xconfig
+# nvidia-xconfig:  version 310.32  (buildmeister@swio-display-x86-rhel47-09)  Mon Jan 14 15:46:49 PST 2013
+
+Section "ServerLayout"
+    Identifier     "Layout0"
+    Screen      0  "Screen0"
+    InputDevice    "Keyboard0" "CoreKeyboard"
+    InputDevice    "Mouse0" "CorePointer"
+EndSection
+
+Section "Files"
+EndSection
+
+Section "InputDevice"
+    # generated from default
+    Identifier     "Mouse0"
+    Driver         "mouse"
+    Option         "Protocol" "auto"
+    Option         "Device" "/dev/psaux"
+    Option         "Emulate3Buttons" "no"
+    Option         "ZAxisMapping" "4 5"
+EndSection
+
+Section "InputDevice"
+    # generated from default
+    Identifier     "Keyboard0"
+    Driver         "kbd"
+EndSection
+
+Section "Monitor"
+    Identifier     "Monitor0"
+    VendorName     "Unknown"
+    ModelName      "Unknown"
+    HorizSync       28.0 - 33.0
+    VertRefresh     43.0 - 72.0
+    Option         "DPMS"
+    Identifier     "Device0"
+    Driver         "nvidia"
+    VendorName     "NVIDIA Corporation"
+    Identifier     "Screen0"
+    Device         "Device0"
+    Monitor        "Monitor0"
+    DefaultDepth    24
+    SubSection     "Display"
+        Depth       24
+    EndSubSection
+


Just a quick update

It stopped working in the upgrade to debian 9. It works perfectly on debian 8. I tried an ubuntu live DVD without success too.
I think X is the reason so maybe you could make it work by keeping the X server in the same version as debian 8. But it was too much of a trouble for me so I just kept it on debian 8.

Pics?

I inserted the card it in the slot_5 (the bottom one)



Sunday, August 19, 2012

How to get the usb wifi/wireless adapter "Logitech LAN-W150N" working in linux...

The Logitech LAN-W150N is an ugly yet very cheap wifi adapter sold very widely in Japan...

Here's a picture:


To get it working, you'll have to get the firmware (you can also compile it yourself, as it's open source), and recompile the linux kernel to detect it properly.

In this example I'll be using Debian (squeeze).

1. Get the linux kernel's source.
sudo apt-get install linux-source-2.6.32
2. In the kernel source, add the line with "rikijpn" to the following file:
$LINUX_SOURCE_DIR/drivers/staging/rt2860/usb_main_dev.c
{USB_DEVICE(0x0789, 0x0162)},   /* Logitec 2870 */
{USB_DEVICE(0x0789, 0x0163)},   /* Logitec 2870 */
{USB_DEVICE(0x0789, 0x0164)},   /* Logitec 2870 */
{USB_DEVICE(0x0789, 0x0168)},   /* Logitec 2870 -> rikijpn */
{USB_DEVICE(0x177f, 0x0302)},   /* lsusb */
{USB_DEVICE(0x0B05, 0x1731)},   /* Asus */
{USB_DEVICE(0x0B05, 0x1732)},   /* Asus */
{USB_DEVICE(0x0B05, 0x1742)},   /* Asus */
{USB_DEVICE(0x0DF6, 0x0017)},   /* Sitecom */

3. Compile and install the kernel (as a debian package would be great, meaning portable)
Instructions to do this in this good looking guy's (my) page : http://www.rikijpn.co.cc/en/make_kernel.php

4. Install the firmware
  1. sudo apt-get install firmware-ralink
  2. And/or get the sources for the firmware (http://www.ralinktech.com/en/04_support/support.php?sn=501, get the RT2870USB(RT2870/RT2770) drivers), and changing the variables in the following files:

    in Makefile (change as proper):
    LINUX_SRC = /usr/src/linux-source-2.6.26
    LINUX_SRC_MODULE = /lib/modules/2.6.26.custom+for+fujitsu/kernel/drivers/net/wireless/
    
    and in os/linux/config.mk:
    HAS_WPA_SUPPLICANT=y
    

    then make the usual ./configure && make && sudo make install
5. Edit your network interfaces file.
In /etc/network/interfaces, add something like:
auto wlan0
iface wlan0 inet dhcp
  wpa-ssid SSID_NAME 
  wpa-psk SSID_PASSWORD
6. Install the package "iw", for managing wireless devices.

Voila! Boot your computer the newly compiled kernel, and you'll see you'll now have a /dev/wlan0 device.
Check with the commands "iwconfig", and "iwlist wlan0 scanning" or plug out and back in the usb device and check it's detected OK in dmesg.

References

Wednesday, April 25, 2012

capoeira classes

After having done some Japanese martial arts and mountain biking as my main physical activities (the ones that don't include my girlfriend...). I never imagined I'd be doing capoeira. Especially in Japan^^.
But it's great.
I spent one year without any physical activity, I spend all day long from like 09:30 to 20:00 in front of a computer, doing a job I enjoy very much, but that makes me fat.

But since I started doing capoeira ---as I was interested in martial arts, especially if it didn't cost me much... ------ All the muscle mass I lost last year is coming back to me! I actually think I even have more! And I feel I can kick ass, which is even better...

So, what is capoeira?
It's something that let's you move like in this video (ignore the gay music and crappy roads...):



Or in a more romantic way:
Dirty Dancing 3: Capoeira Nights with Camilla Belle & Jesse Williams

Or in a more realistic, ass kicking way:


and from the movie only the strong:

I think you got the idea...

Anyway, it's absolutely great; fun, cheap (compared to karate and most martial arts I know...), and can be as physically challenging as your body wants it to be. And it's kind of popular with girls too! At least in Japan, it is... I'm so looking forward doing it with my girlfriend... (I mean, capoeira of course...).




capoeira classes near yokohama

These are some capoeira classes around the Yokohama area.
Please also check out these links if you are interested:

  1. cordao de contas yokohama area
  2. another cordao de contas link
(I'm only putting capoeira regional links, as when I went to check out the angola class it wasn't very fun... and it was long as hell... -> near Shinagawa, and the teacher of the cordao de contas thing is so damn polite!^^)


The address and details are in Japanese... please use google translate if necessary^^.

Bashamichi class

--馬車道クラス--
毎週木曜日
時間:19:00~20:45
場所:batubatu b + studio
神奈川県横浜市中区南仲通4-55 国際馬車道ビル地下1階
料金:体験レッスン・1レッスン=2000円 4レッスン=7500円
馬車道クラスは、入会金はありません。
just get down on bashamichi station, exit by exit number 5, walk straight, and it'll be like the 3th building in the left side... follow the mighty google maps...




Higashi-hakuraku class

---東白楽クラス---
毎週日曜日
時間:11:00~13:00
場所:スタジオコスモス
神奈川県神奈川区西神奈川3-2-11カヤギヤビル3F
料金:1レッスン=2000円 4レッスン=7500円 6レッスン=11000円など
東白楽クラスは入会金があり、一年に一度帯の昇段式があります。
You can go from either Higashihakuraku station, or Higashi-kanagawa station (about 12mins walking).


View Larger Map


Other

Some other related classes (please check the link on the top...):
金曜:日吉 20:30~22:30
土曜:藤沢本町 12:00~14:00
土曜:日吉 19:30~21:30
日曜:東白楽 11:00~13:00
日曜:藤沢 17:00~19:00

Tuesday, April 3, 2012

emacs23's C-n next-line annoys me...

Who guessed one of the most used functions would change like this...
Before emacs23 we used C-p and C-n to move to the previous and next lines respectively. Being the next line, the line before the "\n" character, and about the same amount of characters from the previous "\n" (the same or last column).
Now, it's visually oriented, so C-n just means whatever is below the current cursor's position... As you can guess, this is very annoying if you've used emacs for a while.
From this page, I checked this can be fixed by setting the line-move-visual variable to nil.

fix this

  1. input "line-move-visual" on any buffer in emacs23
  2. press C-h C-v RET after it
  3. press C-o, move the cursor till "customize", and RET
  4. move the cursor to "Toggle" and set it to "off"
  5. RET on "Save for future sessions"
Yay, I have my old C-n and C-p back... there's stuff that just isn't supposed to be changed I guess...

american football and baseball

The only sport I used to like was American football.


But now, thanks to the place I'm working, I also started liking Japanese baseball...


 except for that crappy music though...