Tuesday, November 21, 2006

Counter-Strike: Source Ubuntu Linux WINE

Sadly I do own counter-strike source.... luckily though I can say I really dont play all that much. Tonight I decided to try and install Source on the T42, just to prove to everyone that you can game on linux and linux is the best. Well yeah and I need to pwn some Newbz! I'm writing this right now as Steam is downloading my source files... wait yea I said that, Steam is running in linux and downloading the files as we speak! So here's how I got that far, after the trial and error:
1. Download WINE
sudo apt-get install wine

2. Run WINE setup--
wine setup

3. Download Tahoma font and put it in your wine fonts folder:
cp Tahoma.ttf /home/USERNAME/.wine/drive_c/windows/fonts

4. Download Steam the go to the directory and install it
wine SteamInstaller.exe

(Note I just took a break to test out my CSS on Linux, and after a few trial and errors i figured it out and got onto a server and played it! So, IT WORKS!) 5.During the steam install just use all the same options/answers you would use in a windows environment-- at some point it will prompt you that it needs to install a Mozilla Gecko plugin? just say yes and it will do it's own thing.
6. When the installer finishes open up a terminal and do the following to launch steam:
cd /home/USER/.wine/drive_c/Program Files/Steam
WINEDEBUG="fixme-all" wine steam.exe

This will launch steam while hiding any outputs from wine, thus running your game faster.
7. When steam launched I couldnt type my name in the login/password boxes without first right clicking in the login field then left clicking. After this I could login as normal.
8. Now that you're ready to launch your game you will want to make sure that all other windows besides the steam "My Games" window are minimized or closed.
9. Double click "Counter Strike Source" and as soon as it says "preparing" click the x button on the steam window with "My Games List" or it will interfere with the game.
10. The game should be running fairly close to normal now, you ay be warned that you're video is wierd and that it's using software mode, but even on my 1.7 Ghz 512mb ram 64mb Radeon 9600 the game was more than playable.

I hope that this was helpful to some. Remember I am really doing this as a proof of concept so hopefully more people will migrate from Windows over to Ubuntu. If you have any questions feel free to comment or email me. Thanks I'm off to go play!

PCMCIA TV-Tuner

Just a quick little update-- my father has a pcmcia tv tuner based on the saa7134 chipset that he doesn't use so I took it and decided "I'm gonna make this work with ubuntu!" Basically what needed to be done was as follows: (this is after all the trial and error of course)



1. Place the pcmcia card in the slot with the cable plugged in

2. Make sure that if the modules are loaded you unload them by typing each line into terminal and hitting enter after each:

sudo rmmod saa7134_alsa

sudo rmmod saa7134



3. Load the modules with correct parameters:

sudo modprobe saa7134

sudo modprobe saa7134_alsa


4. download tvtime to watch the t.v.

sudo apt-get install tvtime


5. Now, you could run this as it stands but you will likely find that the audio does not work to fix that you must make a launcher that will point tvtime and your card to use the correct sound. to do that do as follows:

5(a) Make create launcher file:

gedit launcher.sh

5(b) Paste the following inside, save, then exit:

#!/bin/sh

sox -c 2 -s -w -r 32000 -t ossdsp /dev/dsp1 -t ossdsp -w -r 32000 /dev/dsp />tvtime --mixer=/dev/mixer:pcm

wait tvtime

t=`pidof sox`;

kill $t;

amixer -c 0 sset PCM 80%,80% unmute

to play tv you can just type:

sh launcher.sh





If you have any questions or need help just comment or email-- aesnyder@gmail.com



I am lucky enough to have a second T42 which I will be setting up as a "MythTV" using this card so check back here sometime and check out the post pertaining to that!

Tap your laptop to execute commands and more...



Knock-based commands for your Linux laptop

You probably know that the T42 comes with active protection for the hard drive. Well using that technology it's possible to simply "tap" your computer and have it respond accordingly. Example, tap your laptop and have the track change or double tap somewhere to lock the screen. I havent tried setting up all of this but when I do I'll post-- dont worry!

For the first time, you can hit your computer and get a meaningful response! Using Linux® and the Hard Drive Active Protection System (HDAPS) kernel drivers, you can access the embedded accelerometers on Lenovo (formerly IBM®) ThinkPads, then process the accelerometer data to read specific sequences of "knocking" events -- literally rapping on the laptop case with your knuckles -- and run commands based on those knocks. Double tap to lock the screen, and knock in your secret code to unlock. Tap the display lid once to move your mp3 player to the next track. The possibilities are endless.

FGLRX w/ ACPI and Flicker

Well-- all is going well on the laptop and I guess it would be false advertising if I said that everything is perfect, I have one minor bug. With the fglrx driver I have noticed that my laptop's lcd screen has a very odd flicker to it. This seems to be a common problem but I haven't dedicated any time to a solution as I've been busy and did figure out a work around. For me if the screen is flickering I can press fn+f3 and wait for the screens to shut off. Then by moving the mouse the screens come back and the laptop is no longer flickering. I've messed with the xorg.conf a little bit but havent found anything that seems to fix it. I'm fairly positive that the real issue is being caused by the settings for the acpi on the laptop. I'm going to do some more research and more trial and error tests as to how I can get this puppy purrfect. So if you get the flicker just hit fn+f3 and shake the mouse after they turn black, if this doesnt work try repeating as it always works for me in less than 3 tries usually only two. Check back here and I should have a fix up.

Monday, November 20, 2006

FGLRX single display

It dawned on me, some of you may want fglrx with just the laptop display, so here's the xorg.config for that!

Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "aticonfig-Screen[0]" 0 0
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "Synaptics Touchpad"
EndSection

Section "Files"
EndSection

Section "Module"
Load "dbe"
Load "v4l"
Load "extmod"
Load "type1"
Load "freetype"
Load "dri"
Load "glx"
EndSection

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "Emulate3Buttons" "true"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "HorizScrollDelta" "0"
EndSection

Section "Monitor"
Identifier "aticonfig-Monitor[0]"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
EndSection

Section "Device"
Identifier "aticonfig-Device[0]"
Driver "fglrx"
EndSection

Section "Screen"
Identifier "aticonfig-Screen[0]"
Device "aticonfig-Device[0]"
Monitor "aticonfig-Monitor[0]"
DefaultDepth 24
SubSection "Display"
Modes "1400x1050" "1280x1024"
Viewport 0 0
Depth 24
EndSubSection
EndSection

Section "dri"
Mode 0666
EndSection

Section "Extensions"
Option "Composite" "disable"
EndSection

Suspend and Hibernate with FGLRX

Well an easy enough method to get this all working, just open terminal and type
sudo gedit /etc/default/acpi-support

Find this:
SAVE_VBE_STATE=true

And make it this:
SAVE_VBE_STATE=false

Restart your computer and you should have your FGLRX working.

FGLRX "Pair mode" on the T42

As you may or may not know the drivers I was using were god awfully slow. Today i decided to improve my speed with the fglrx drivers by ati. My goal was to keep the same functionality as before with the improved speed. I got it all working, and damn I'm happy! Now my IBM Thinkpad T42 splitscreens between the internal display and the external display and uses the much quicker fglrx driver to do so. Note-- this is different from the crappy BigDesktop mode by ati because it allows you to drag windows across from one to the other. Well this is the xorg.config that I use now it's heavily modded from some other's I found around Google. The suspend/hibrenate don't work but I'm on my way to figuring that one out.





Section "ServerLayout"

Identifier "BigDesktop"

Screen 0 "aticonfig-Screen[0]" 0 0



InputDevice "Generic Keyboard"

InputDevice "Configured Mouse"

InputDevice "Synaptics Touchpad"









EndSection



Section "Files"

EndSection



Section "Module"

Load "dbe"

Load "v4l"

Load "extmod"

Load "type1"

Load "freetype"

Load "dri"

Load "glx"

EndSection



Section "InputDevice"

Identifier "Generic Keyboard"

Driver "kbd"

Option "CoreKeyboard"

Option "XkbRules" "xorg"

Option "XkbModel" "pc104"

Option "XkbLayout" "us"

EndSection



Section "InputDevice"

Identifier "Configured Mouse"

Driver "mouse"

Option "CorePointer"

Option "Device" "/dev/input/mice"

Option "Protocol" "ImPS/2"

Option "Emulate3Buttons" "true"

Option "ZAxisMapping" "4 5"

EndSection

Section "InputDevice"

Identifier "Synaptics Touchpad"

Driver "synaptics"

Option "SendCoreEvents" "true"

Option "Device" "/dev/psaux"

Option "Protocol" "auto-dev"

Option "HorizScrollDelta" "0"

EndSection





Section "Monitor"

Identifier "aticonfig-Monitor[0]"

Option "DPMS" "true"

EndSection



Section "Monitor"

Identifier "aticonfig-Monitor[1]"

Option "DPMS"

HorizSync 30 - 86

VertRefresh 50 - 100

EndSection









Section "Device"

Identifier "aticonfig-Device[0]"

Driver "fglrx"

## Dual Screen

Option "DesktopSetup" "horizontal"



## Direct Rendering

Option "no_accel" "no"

Option "no_dri" "no"



## Overlay Settings

Option "VideoOverlay" "on"

Option "OpenGLOverlay" "off"



## TV-Out Settings

# Option "ForceMonitors" "tmds,auto,notv"

Option "TVFormat" "PAL-B"

Option "TVStandard" "VIDEO"



## Misc Settings

Option "UseInternalAGPGART" "no"

Option "EnablePrivateBackZ" "yes"

BusID "PCI:1:0:0"

Screen 0

EndSection



Section "Device"

Identifier "aticonfig-Device[1]"

Driver "fglrx"

BusID "PCI:1:0:0" # vendor=1002, device=3154

Screen 1

EndSection



Section "Screen"

Identifier "aticonfig-Screen[0]"

Device "aticonfig-Device[0]"

Monitor "aticonfig-Monitor[0]"

DefaultDepth 24

#Option "backingstore"



Subsection "Display"

Depth 24

Modes "1400x1050" "1280x1024" "1024x768" "800x600" "640x480"

ViewPort 0 0 # initial origin if mode is smaller than desktop

EndSubsection

EndSection



Section "Screen"

Identifier "aticonfig-Screen[1]"

Device "aticonfig-Device[1]"

Monitor "aticonfig-Monitor[1]"

DefaultDepth 24

#Option "backingstore"



Subsection "Display"

Depth 24

Modes "1280x1024" "1024x768" "800x600" "640x480"

ViewPort 0 0 # initial origin if mode is smaller than desktop

EndSubsection

EndSection



Section "dri"

Mode 0666

EndSection



Section "Extensions"

Option "Composite" "disable"

EndSection