Mysz Bluetooth USB
tags: allegro bluetooth funny polish usb
1276175617|%e %B %Y
Grunt to dobre rozeznanie w towarze, który się sprzedaje:
Mysz USB Bluetooth 1000 DPI SCROLL na AKUMULATORKI
Oprócz tytułu aukcji nie ma słowa USB. No i nie dziwne, bo ciężko, żeby mysz Bluetooth była USB-owa (no chyba, że ładowana przez USB), stąd moje pytanie:
Treść wiadomości:
I co ta mysz na wspólnego z USB?
No i odpowiedź:
Od: "BE_TECHNOLOGY" <…>
Do: <…>
Temat: Re: Pytanie o przedmiot: Mysz USB Bluetooth 1000 DPI SCROLL na AKUMULATORKI (Numery ofert 1056342844)
Data: Thu, 10 Jun 2010 14:35:58 +0200
X-Mailer: Microsoft Outlook Express 6.00.2900.5931to ze jest bezprzewodowa…?? pozdrawiam
Pozdrawiam wszystkich bezprzewodowych.
Comments: 0, Rating: 0
Enabling Intel VT On Sony Vaio
tags: intel-vt sony vaio virtualbox
1275734756|%e %B %Y
I created a 64-bit virtual machine for testing some cool stuff on some cool machine in our office, but wanted to transfer it to my laptop. How pissed I was to realize that 64-bit machine can be only emulated by VirtualBox when VT-X (or corresponding AMD's technology) is used (Intel's extension to CPUs especially for virtualization). Without them, you can only emulate 32-bit machines even if you have 64-bit Linux running or the host.
Sony for some reason disables the virtualization technologies in their laptops and give so poor BIOS UI, that you can't enable it. I've read that after someone actually hacked their BIOS to enable the feature, Sony released BIOS update that adds the option to enable VT, but not for my model (Vaio SZ-640N).
I found one wonderful howto here, but it had a few flaws:
- link to symcmos.exe was not valid anymore (just search for that file on random FTP servers, you'll find it quickly)
- I haven't handled to run FreeDOS from USB stick, so I downloaded CD image from FreeDOS site and burnt it into a DVD (no CD in my house, but that's not a problem)
- FreeDOS when run from CD fails to initialize USB sticks I've tried (3 of them). Additionally it crashes with an error "invalid opcode" after doing "InitDisks". I needed to have the symcmos.exe file available in FreeDOS LiveCD, so I created a small FAT16 partition on my main disk and put it there. It was accessible as disk C:. It seems FreeDOS handles partitions really well, because the partition was the last partition on my quite big disk, located on a extended partition and my partition table is not straight in a way that /dev/sda2 in the extended partition, while primary one /dev/sda3 is located before it. FreeDOS handled this, I had my FAT16 partition visible and I was able to run symcmos commands :-).
So that's it. Time to do experiments on the machine.
Comments: 0, Rating: 0
Playing Unreal Tournament On Ubuntu Lucid
tags: linux tournament unreal
1274080591|%e %B %Y
I wanted to play Unreal Tournament on Ubuntu 10.04 (Lucid Lynx) 64-bit. Linux is theoretically supported by Unreal Tournament, by using custom installer. So this is how to do it:
Get Unreal Tournament
The most likely version to obtain is UT GOTY (Game Of The Year edition).
Get Installer
Go here:
http://www.liflg.org/?catid=6&gameid=51
There are two installers. Download both using BitTorrent client. For me the one witout "goty" worked.
Run installer like this:
sudo bash /path/to/unreal.tournament_436-multilanguage.run
Probably it won't run, because you don't have GTK 1.2. Bad news, GTK 1.2 isn't even available in system repository. The last Ubuntu version that shipped GTK 1.2 was Ubuntu Jaunty. My favorite trick to get packages from older distros is as follows:
sudo sed s/lucid/jaunty/g /etc/apt/sources.list -i
sudo aptitude update
sudo aptitude install -y libgtk1.2
sudo sed s/jaunty/lucid/g /etc/apt/sources.list -i
sudo aptitude update
Try to run the installer, it should work now.
Default options are generally OK, so you can keep them. Once "enter CD" dialog appears, you need to either enter the CD or mount the ISO image using the following command:
sudo mount /path/to/the/iso-file.iso /media/cdrom
Click OK, and the installer continues to run. If you're asked to enter CD2 and you don't have one, try the second installer (the one without "goty") from loki site.
Running UT
I had no luck in running UT:
quake@vaio ~ $ ut
Signal: SIGIOT [iot trap]
Aborting.
From this thread I've learned it could be solved by doing this:
cd /usr/local/games/ut/System
for i in ../Maps/*.uz ; do sudo ./ucc-bin decompress $i ; done
mv *.unr ../Maps
After doing this, you should be able, to run ut successfully.
Changing resolution
I was not able to change resolution (once I changed it, it was going back to 640x480 after a few seconds). Open file ~/.loki/ut/System/UnrealTournament.ini, locate "640" and "480" in it and change to desired resolution.
High speed
When I run UT it seemed going about 5 times faster than it should. After reading much about -cpuspeed option and playing with CPU downclocking I figured out that without sound it runs OK. After some experimenting it seems, that it's pulseaudio is causing it, once I killed it and prevented to run (it auto-respawns for some reason) UT finally worked at good speed.
sudo chmod -x /usr/bin/pulseaudio
killall pulseaudio
ut
The problem with this is that some process continuously tries to run pulseaudio, which causes CPU to be loaded and ut to run not smoothly.
So this should work:
sudo mv /usr/bin/pulseaudio /usr/bin/pulseaudio.original
echo -e "#!/bin/bash\nsleep 10000" | sudo tee /usr/bin/pulseaudio
sudo chmod +x /usr/bin/pulseaudio
killall pulseaudio
ut
Remember to do this after playing ut:
sudo mv /usr/bin/pulseaudio.original /usr/bin/pulseaudio
If you have some problems with sound after playing UT, log out and in again, and it should be OK.
NOTE: this trick should be equivalent to running pasuspender ut, but for some reason it does not work.
More tricks
When playing on LAN party we discovered more tricks:
To let UT correctly determine CPU speed, you need to set CPU frequency (using some applet or cpufrequtils) and disable additional cores (leaving one):
echo 0 | sudo tee /sys/devices/system/cpu/cpu1/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu2/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu3/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu4/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu5/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu6/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu7/online
(if you have 8 cores, cpu0 will be online, the rest offline).
Next trick is disabling desktop effects or window composing. For one person this meant much smoother graphics, for other it meant working sound (which is very weird, but yes, that's true).
Comments: 2, Rating: 0
Maj
tags: polish
1273085116|%e %B %Y
Od lutego nie pisałem nic na blogasku, więc czas przerwać milczenie.
Aktualnie zajmuję się następującymi projektami:
- praca magisterska
- Wikidot
- kilka pobocznych rzeczy
Praca magisterska
Tematem mojej pracy są mobilne przeglądarki internetowe. Celem praktycznym będzie stworzenie używalnej mobilnej przeglądarki internetowej dla Linuksa z serwerem X11. O ile istnieją dobre przeglądarki mobilne na różne inne mobilne platformy (BlackBerry, iPhone, Android), to żadnej dobrze działającej nie udało mi się uruchomić na zwykłym Linuksie.
Wyspecyfikujmy wymagania przeglądarki:
- obsługa palcem
- przewijanie przez przeciąganie po ekranie
- duże guziki
- łatwe powiększanie i pomniejszanie
- utrzymywanie odpowiedniego poziomu interakcji (czytaj: wyeliminować kilkunastosekundowe zwiechy programu)
- ma być jak najszybsza (na ile to możliwe) i być zgodna ze standardami W3C (ale możemy poświęcić jakiś mało używany wodotrysk np. z CSS3, jeśli zyskamy sporo na wydajności)
Tworzenie przeglądarki, to trudna rzecz, więc nie będę zaczynał od zera. Wezmę przeglądarkę Arora i dopasuję ją do moich wymagań. Dlaczego Arora:
- oparta na silniku WebKit, co daje sporą przewagę wydajności nad choćby Firefoksem
- w miarę dobrze napisany kod, co sprawia, że się ją łatwo modyfikuje
- z testów wydajności (które przeprowadzam w swojej pracy) nie jest wprawdzie najszybsza, ale ma bardzo dobre wyniki
- napisana w Qt, co daje możliwość skompilowania również na Symbiana, QtE, Windows Mobile i być może na Androida.
Wikidot
Z racji pracy magisterskiej nie mogę się tak bardzo skupić na Wikidocie jakbym chciał, ale obecnie zajmuję się w wolnych chwilach monitorowaniem Wikidota (wykresiki, alerty mailowe itd), a ostatnio sen z powiek spędzał mi element [[html]], który niedawno wprowadziliśmy (głównie dzięki mnie) a który czasami nieprawidłowo ustawiał swoją wysokość w przeglądarce Firefox. Okazało się to winą Firefoksa, ale udało się to jakoś obejść. W skrócie mówiąc Firefox bardzo agresywnie cache'uje iframe'y (tzn. latające ramki), co sprawia, że nie zawsze wykonuje się zawarty w nich kod JavaScript. Aby temu zapobiec dodałem coś w stylu '?' + Math.random() do URL-a ładowanego w ramce. W ten sposób (o ile mamy dobrą funkcję Math.random w przeglądarce) za każdym razem generowany jest inny URL, co wymusza ponowne pobranie go z serwera. Skrypt się wykonuje i ramka prawidłowo zmienia swój rozmiar.
Inne rzeczy
Postanowiłem stworzyć miejsce w sieci, gdzie będę zbierał projekty, które wykonuję (takie portfolio) a także, gdzie będę mógł napisać, co potrafię robić. Powstało ono pod adresem: web9.pl. Być może kiedyś ten projekt przekształci się w firmę. Póki co, jest to głównie portfolio. Mimo wszystko zapraszam :-).
Z racji tworzenia mobilnej przeglądarki internetowej, jestem właścicielem otwartego telefonu OpenMoko Neo FreeRunner (który pracuje pod kontrolą systemu Linux). Jedną z najlepiej na nim działających dystrybucji jest QtMoko, oparte na QtExtended (dawniej Qtopia). Ostatnio testuję nowe testowe wydania tej dystrybucji, głównie pod kątem działania GPRS. Zrobiłem również małego demona, który aplikuje workaround na bug w kernelu i trzyma otwarte urządzenie ALSA-y, a wszystko po to, by umożliwić rozmawianie przez Neo za pomocą zestawu słuchawkowego Bluetooth (niestety rozmawianie bez zestawu jest bardzo trudne, bo mikrofon jest zbyt czuły, a głośnik za cichy).
Warto powiedzieć, że dzięki GPRS i GSM oraz fajnej aplikacji o nazwie NeronGPS, można używać Neo jako aplikacji do orientowania się na drogach. Niestety nie ma funkcji nawigacji, więc nie jest absolutnie świetna. Jednak lepiej z mapą i bez nawigacji, niż bez mapy i bez nawigacji.
Oprócz napisania pracy magisterskiej muszę powiedzieć, że sporo obowiązków nakładają na mnie studia. Muszę zaliczyć dwa przedmioty do wyboru, z czego na jeden aktualnie chodzę, a co do drugiego, to muszę się umówić na egzamin. Niestety i piąty rok musi czasem coś pozdawać.
Tak właśnie upływa mój maj. I szybko się to pewnie nie zmieni ;-)


