Piotr Gabryjeluk blog

Qt 4.7 and QtWebKit 2.0 Debian packages for ARM

1280428230|%e %B %Y

Qt 4.7 beta2 and QtWebKit 2.0 beta (weekly build)] are available in Debian experimental repository, but not for all architectures. Most notably the packages are missing for ARM architecture.

It's worth noting, that libqt4-webkit is no longer a valid package in experimental, but is a transitional package to pull libqtwebkit4, so now QtWebKit and Qt versions are quite independent. You can use Qt 4.6 or 4.7 with the QtWebKit 2.0.

I needed QtWebKit 2.0 on ARM, so I built it from deb-src. It went OK with no modifications of the source package.

When it comes to Qt's 4.7 beta release I needed to patch it slightly, to disable precompiled headers (for some reason, after generating them, they were not found by installation), —fast configure flag (not sure if this is needed) and I needed to tweak src/core/io/io.pri file, because for some reason linux-* {} section of qmake file was not properly applied. Also to properly compile stuff, I added Qt3 support.

My full diff to sources downloaded with apt-get -t experimental source qt4-x11

diff -ur original/qt4-x11-4.7.0~beta2/debian/rules modified/qt4-x11-4.7.0~beta2/debian/rules
--- original/qt4-x11-4.7.0~beta2/debian/rules    2010-07-29 18:27:41.000000000 +0000
+++ modified/qt4-x11-4.7.0~beta2/debian/rules    2010-07-29 18:27:52.000000000 +0000
@@ -89,7 +89,9 @@
                 -demosdir "/usr/lib/qt4/demos" \
                 -examplesdir "/usr/lib/qt4/examples" \
                 -opensource \
-                -fast \
+                -no-fast \
+                -no-pch \
+                -qt3support \
                 -plugin-sql-mysql \
                 -plugin-sql-odbc \
                 -plugin-sql-psql \
diff -ur original/qt4-x11-4.7.0~beta2/src/corelib/io/io.pri modified/qt4-x11-4.7.0~beta2/src/corelib/io/io.pri
--- original/qt4-x11-4.7.0~beta2/src/corelib/io/io.pri    2010-07-29 18:28:09.000000000 +0000
+++ modified/qt4-x11-4.7.0~beta2/src/corelib/io/io.pri    2010-07-29 18:28:17.000000000 +0000
@@ -74,7 +74,6 @@
             SOURCES += io/qsettings_mac.cpp io/qfilesystemwatcher_fsevents.cpp
         }
 
-        linux-*:!symbian {
             SOURCES += \
                     io/qfilesystemwatcher_inotify.cpp \
                     io/qfilesystemwatcher_dnotify.cpp
@@ -82,7 +81,6 @@
             HEADERS += \
                     io/qfilesystemwatcher_inotify_p.h \
                     io/qfilesystemwatcher_dnotify_p.h
-        }
 
         freebsd-*|macx-*|darwin-*|openbsd-*:{
             SOURCES += io/qfilesystemwatcher_kqueue.cpp

You can find all of the compiled debs here:

No files attached to this page.

Manage attachments

Comments: 0, Rating: 0

Mysz Bluetooth 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.5931

to ze jest bezprzewodowa…?? pozdrawiam

Pozdrawiam wszystkich bezprzewodowych.

Comments: 0, Rating: 0

Enabling Intel VT On Sony Vaio

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

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: 1, Rating: 0

page 1 of 34123...3334next »

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License