Sony Vaio Z21X9E/B (CEP) and Fedora 15 (x86_64)

November 26th, 2011 ntavares Posted in dri, en_US, fedora, hardware, linux driver No Comments »

Ouvir com webReader

Well, I’m one of the recent owners of a Sony Vaio VPC Z21X9E - who the heck is giving these brand model names at Sony?? - so, as everyone does when they get a new computer, I went to install my operating system - Linux. And, despite having said that it would probably not be Fedora again, well….. it was. And, yes, I was still using a 2-year-old distribution…

Installation

It worths mentioning that this laptop does not have a CD-ROM drive, so you either plug in an external one, use an USB pen or just kickstart it.

You might want to pass the following options on installation if you’re getting a blank screen:

i915.modesetting=0

If you want to preserve the Windows installation you will probably have to resize the “big” partition manually: I couldn’t get anaconda, nor Ubuntu installer, nor SuSE’s, so in the end, I gave up and went using the resizentfs tools.

Also, if you plan to wipe off the Windows partitions completely, you might want to try to tune the disk first by aligning the SSD. I didn’t: I was hungry for having it installed, and I already spent much time trying to install Linux without blowing Windows (it may become handy to debug some USB… :-)

Hardware

Networking

Ethernet (Wired)

Although the Ethernet NIC was correctly detected, the base kernel driver r8169 had some stability problems. My first yum update brought kernel 2.6.41.1 with the problem fixed. But it worths mentioning that first I had installed the Realtek’s official driver (donwload link) and it performed pretty well.

If you’re dealing with recent kernels, you may have noticed about Consistent Network Device Naming. Well, in short, I don’t like it :) So I told udev to get my ‘eth0′ back - can you imagine? It was called p3p1! :)


cat > /etc/udev/rules.d/80-compatibility-net.rules << EOF
# PCI device 0×10ec:0×8168 (r8169)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”54:42:49:97:75:22″, ATTR{dev_id}==”0×0″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″
EOF

This is a two line file (first line is a comment), but Wordpress breaks it.

Wireless

Although the wireless card (Intel Corporation Centrino Advanced-N 6230) was detected, the driver iwlagn needs firmware (you’ll notice that on ‘dmesg’):

yum install iwl6000g2b-firmware.noarch

Broadband internal modem (Gobi 3000)

I’m still wandering around on a good approach to this one. Many many info scattered around the web, with different results, with different models. For now, let me just reference to the Gobi drivers project page. I’ll get back on this as soon as I have something similar to an understandable approach.

Touchpad / Clickpad

You will quickly notice that the touchpad (actually, a Clickpad, I learned) will misbehave, leading to cursor jumps when you try to click, ignoring drag&drop, etc. It seems the synaptics x.org driver is pending some clickpad awareness changes - for a long time now, I must say - and that’s why you will find the problem solved in (and by) many (other) distributions. Not in Fedora, though, at least in this case. In Bugzilla #590835, comment35, thanks to Alexander Gryanko, you will find a source RPM for a workaround. After recompiling and installing over your current xorg-x11-drv-synaptics driver, the clickpad won’t perform as well as in Windows, yet, but it will fix the annoying pointer-jump and will allow you to drag&drop and select text, which was impossible.

I’ve also read about using “i8042.nomux=1″ as kernel arguments, or Sony Jogdial overlapping the default touchpad (noticeable on the logs) but didn’t go that way. I’d like to hear from your experience about this, though.

Also, installing gpointing-device-settings might become handy later on…

yum install gpointing-device-settings

Keyboard Fn keys

They all seem to perform well, except for brightness control. I’ve seen many people complaining about this. Loading the sony_laptop module seems to do the trick.

modprobe sony_laptop

Display

While you had to run the installation without modesetting, after the forementioned update (to kernel 2.6.41.1), the system now runs with modesetting, thus giving you the graphical boot.

Other hardware

  • Webcam - out of the box;
  • Audio - out of the box;

Software

Frequently used applications

I found a lot of good suggestions here, although I always go installing the software along the way, as I need it. So this section is mainly targetting some special care needed for specific apps.

Java

I like to (I actually have to) use both a legacy most stable version (1.6x) and a most updated stable version (1.7.x) due to professional reasons, so I like to have alternatives properly setup so I can switch between them easily. This is something that the Java RPM distribution should be doing automatically (for some years now), but they still don’t:

alternatives –install /usr/bin/javaws javaws /usr/java/default/bin/javaws 10
alternatives –install /usr/bin/java java /usr/java/default/bin/java 10
alternatives –config java
rm /usr/java/default
ln -s /usr/java/jdk1.6.0_29 /usr/java/default

Tweaking the environment

Fallback mode (ignore gnome-shell)

I hated gnome-shell. I understand the distribution maintainers want to push new stuff into the audience, but I still feel most of the changes happened on Gnome 3 are pretty unfair for a desktop user. My computers are not a tablet, I can’t point with the finger, so this gnome-shell thing (Unity in Ubuntu, and alike) is just garbage for me. I don’t like them because they make me loose more time to find my things - which I had somehow inconsciently automated. So, obviously, I’m running in the “fallback mode“, which you can set using the gnome-control-center, on a unobvious “System Info” icon.

Delete key behaviour

After that, I spent some time trying to get back to the old behaviour, like using the DELETE key for what it used to do: delete stuff. Through the following command, you’ll be able to mouseover menu options and set the accelerator (shortcut) by pressing DELETE twice on the option “Move to Trash”. Learn more here.

gsettings set org.gnome.desktop.interface can-change-accels true

Desktop area management and icons

I believe this has been forgotten about the fallback mode: we used to have icons and be able to create folders and other nautilus operations, so I want that…. again. You can use dconf-editor to edit the configuration visually or using gsettings, again:

yum install dconf-editor
gsettings set org.gnome.desktop.background show-desktop-icons true

Adding menu entries

Maybe it’s just a fallback miss, but it won’t originally let you modify the Applications menu. For that, you’ll have to install alacarte and run it from console (or ALT+F2):

yum install alacarte

The entries created with alacarte (0.13.2-3) will miss the category no matter if you specify it on item creation. To place the icons where they’re due, you’ll have to edit the shortcuts, which are placed at ~/.local/share/applications. Just add an entry Categories=Development (example) and wait a couple of seconds so the panel freshens up. If you’re wondering about which categories to place, grep through /usr/share/applications/*.desktop for examples.

Tuning

I was reading some of the powertop suggestions and doing some reading in the meanting, so these seemed to be worth considering:

Disable NMI Watchdog (ref):

echo 0 > /proc/sys/kernel/nmi_watchdog

Set wwan0 down if you’re not going to use it

ifconfig wwan0 down &

Disable Wake-up On LAN:

ethtool -s eth0 wol d &

Enable laptop mode, I don’t know if it’s still relevant nowadays (ref):

echo 5 > /proc/sys/vm/laptop_mode

Some interesting stuff I read on LessWatts:
Scheduler tunables for multi-socket systems (ref

echo 1 > /sys/devices/system/cpu/sched_mc_power_savings
echo 1 > /sys/devices/system/cpu/sched_smt_power_savings

Set vm writeback to 10 secs (lose 10 secs on crash):

echo 1500 > /proc/sys/vm/dirty_writeback_centisecs

Disable bluetooth entirey

hciconfig hci0 down

Disable wireless - if you’r not going to use it… maybe this could be integrated with the physical switch of the Vaio…

ifconfig wlan0 down
modprobe -r iwlagn

Enable Audio HD powersave

echo 10 > /sys/module/snd_hda_intel/parameters/power_save &

I will hardly make any kind of power consumption comparison between Windows and Linux - I won’t be in Windows that long :-) - but, anyway, it makes sense to not leak power on unused components.

That’s all for now.

AddThis Social Bookmark Button

KnowledgeTree jump/GotoCustomNumber Plugin

April 30th, 2011 ntavares Posted in dri, en_US, knowledgetree, projects No Comments »

Ouvir com webReader

If you’re using the Custom Numbering Plugin, which is available in the Professional version of KnowledgeTree, you might find useful to jump directly to the document by looking up the Custom Number of the document, pretty much like you do with the Goto Document ID dashlet, which uses the (internal and unmeaningful) document ID. A practical use of this plugin has been to use it with barcode scanners on physical archives.

It’s ready for 3.7.x and it will soon be available for download. Visit the Projects page for more information.

AddThis Social Bookmark Button

Quick update on KTEmailPush KnowledgeTree Plugin

November 7th, 2010 ntavares Posted in dri, en_US, knowledgetree, projects No Comments »

Ouvir com webReader

Over the last weeks the KnowledgeTree Email Gateway Plugin received some attention:

  • It’s now fully configurable through the administration pages, without the need to edit at config.inc.php;
  • It was also adapted to ease the process of customizing the logic behind destination folder determination — it’s now possible to merge a bit of code that will determine where to put each incoming attachment, based on its parameters (subject, sender, etc.)
  • Fully customized mail notifications using Smarty templates, which minimizes the risk of accidentally mixing up the code.

These are, of course, the most proeminent changes. These changes triggered, however, some feature requests to Knowledge Tree team. Their actually simple fixes which I don’t know why never got in, since everything is in place already:

  • KTS-4678 — To allow custom fields on configuration mechanism;
  • KTS-4679 — To allow configuration settings registration without the need to run SQL;
  • KTS-4680 — To allow custom templating to override the original KT’s.

Here are some screenshots. Here is the new administration section…
ktemailpush1

… the new Task Fetch Mail in the the Task Scheduler (where you can enable/disable, control frequency, etc)….
ktemailpush2

… and the configuration options, as you used to have in the config.php file:
ktemailpush3

Do mail me if you want to see a demo.

AddThis Social Bookmark Button

Estes fins de semana

April 10th, 2010 ntavares Posted in dri, lazer, pt_PT, web No Comments »

Ouvir com webReader

Nota: Este post foi resgatado dos Drafts e é de 30-12-2009…

Este Natal tive tempo de fazer um catchup das notícias (aliás, já devem ter reparado eheh). Esta minha demora em escrever fica pautada por uma presença em Luanda, Angola, e por uns pesadíssimos comprimidos que tive que tomar (e tolerar!! mal ou bem..). Na foto abaixo deixo uma paisagem imensa, algures a meio da viagem, que se estendia para além da curva do horizonte, que foi a primeira sensação dual provocada por África: tão grande e tão… deserto.

luanda-voo

Tive tempo também para um cinema: andava a criticar o facto da oferta não ser nada por aí além, mas fui ver o Avatar, versão em 3D, e…. bem… ainda estou a processar. Neste momento é o meu filme preferido, o que cataloga James Cameron como o melhor realizador, desta vez sem dúvida nenhuma!

Cruzei-me com o Mr. Stanley Jordan a interpretar Stairways to Heaven no pian… perdão, na guitarra! O melhor é mesmo ver :)

E agora umas mais antiguitas, que tinha para aqui guardadas.

Andava farto de ter que lançar 3 ou 4 ferramentas para fazer desenhos para a malta, e dei de caras com estas duas aplicações que talvez venham a simplificar-me/nos a vida: O Gliffy, que já parece integrar com o MediaWiki, e o yUML, que também integra. O caminho há-de ser algures por aí - ou então usar o Google Presentation?

Já uma vez me tinha questionado sobre a complexidade da nossa voz face à simplicidade de um tom/nota acústica, mas nada como isto: estes senhores conseguiram reproduzir voz usando um piano! Bom, e mais qualquer coisinha, é certo…

Noutra frente, e depois de já ter gasto alguns minutos (juro!) a reviver Quake Live, cruzei-me acidentalmente (juro, juro!) com um clássico que merece a atenção, especialmente por ser todo em DHTML/Javscript: o viciante Lemmings!

De volta aos sistemas, andei a experimentar o netconsole. Isto é giro, mas como não deu para usar o logger para escrever para o ring buffer (dmesg), tive que experimentar com um módulo de kernel dummy - e só subindo o nível, com KERN_ERR…!

As férias foram tão grandes que voltei a explorar alguns chapéus coloridos: dei de caras com o fwknop para port knocking, andei a fazer experiências com o ettercap, e li uns artigos giros onde sempre se aprendem mais uns programitas, como no artigo 20 Linux System Monitoring Tools Every SysAdmin Should Know.

AddThis Social Bookmark Button

Academia Wikipédia: está quase!

April 10th, 2010 ntavares Posted in dri, pt_PT, wikipedia No Comments »

Ouvir com webReader

O evento resulta de uma parceria entre a Faculdade de Engenharia da Universidade do Porto e a Associação Wikimédia Portugal, contando com o apoio da EXPONOR e da DRI.

O objectivo é sensibilizar e promover o uso da Wikipédia. O seminário decorrerá, entre as 9h30 e as 18 horas do dia 16 de Abril, na QUALIFICA e terá ligação por videoconferência à 2010 Wikimedia Conference, que decorrerá em Berlim, e onde estarei com a Susana a contribuir com a experiência portuguesa e, simultaneamente, a fazer as entrevistas.

Para além da palestra de Kul Takanao Wadhwa, Head of Business Development da Wikimedia Foundation, haverá espaço para o debate de temas como a qualidade e a fiabilidade da Wikipédia, o uso da Wikipédia nas aulas, a Wikipédia como instrumento de protecção e promoção de línguas minoritárias, a Wikipédia na investigação e ainda informação detalhada sobre edição de conteúdos, licenciamento e ligações a projectos. A sessão está aberta ao público em geral, desde estudantes, professores, investigadores e outros especialistas do meio académico.

A participação na Academia Wikipédia é gratuita, mas com inscrição obrigatória. Poderá fazer a sua inscrição online aqui:
http://academia-wikipedia.org/inscricao.php.


Se és dos que vão à Wikipédia antes de fazer um trabalho, ou enquanto pesquisas profissionalmente, então este evento tem entrada livre, realiza-se a 16 de Abril, na Exponor, e parece ideal para ti!

AddThis Social Bookmark Button

Automatically cleaning up SPAM Wordpress comments

September 6th, 2009 ntavares Posted in dri, en_US, mysql 2 Comments »

Ouvir com webReader

Doing the maintenance of our blogs (Wordpress), I bumped over one that had fallen on an active botnet. It was receiving like 5 or 6 spam comments per minute. It was nearly the only one in such an harassment, so I suspect the botnet loved it for being open on commenting.

Since I've activated reCaptcha I've been monitoring my "spam folder" and I'm really confident on his guesses, so I just wrote a STORED PROCEDURE to clean up these spam comments on a periodic basis, so I can do a sitewide cleanup:

MySQL:
  1. DELIMITER $$
  2.  
  3. DROP PROCEDURE IF EXISTS `our_blog_db`.`REMOVE_OLD_SPAM`$$
  4. CREATE PROCEDURE `our_blog_db`.`REMOVE_OLD_SPAM` ()
  5.     MODIFIES SQL DATA
  6.     COMMENT 'remove comentarios marcados como SPAM'
  7. BEGIN
  8.  
  9. DECLARE done BIT(1) DEFAULT FALSE;
  10. DECLARE commtbl VARCHAR(50);
  11. DECLARE comments_tbls CURSOR FOR SELECT TABLE_NAME
  12.     FROM information_schema.TABLES  
  13.     WHERE TABLE_SCHEMA = 'our_blog_db' AND TABLE_NAME LIKE '%comments';
  14. DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
  15.  
  16.  
  17. OPEN comments_tbls;
  18.  
  19. REPEAT
  20.     FETCH comments_tbls INTO commtbl;
  21.     SET @next_tbl = CONCAT('DELETE FROM our_blog_db.',commtbl,'
  22.         WHERE comment_approved = "spam"
  23.         AND comment_date_gmt < DATE_SUB(UTC_TIMESTAMP(), INTERVAL 15 DAYS)');
  24.     PREPARE get_next_tbl FROM @next_tbl;
  25.     EXECUTE get_next_tbl;
  26.  
  27. UNTIL done END REPEAT;
  28.  
  29. CLOSE comments_tbls;
  30.  
  31.  
  32. END$$
  33.  
  34. DELIMITER ;

It's very easy to stick it into an EVENT, if you have MySQL 5.1 or bigger, and which to do a daily clean up automatically:

MySQL:
  1. CREATE EVENT `EV_REMOVE_OLD_SPAM` ON SCHEDULE EVERY 1 DAY STARTS '2009-08-01 21:00:00' ON COMPLETION NOT PRESERVE ENABLE
  2. COMMENT 'remove comentarios marcados como SPAM' DO
  3. BEGIN
  4.  
  5. SELECT GET_LOCK('remove_spam',5) INTO @remove_spam_lock;
  6.  
  7. IF @remove_spam_lock THEN
  8.     CALL REMOVE_OLD_SPAM();
  9.  
  10. END IF;
  11.  
  12. END

Enjoy!

AddThis Social Bookmark Button

Syntax Highlighting nos blogs da DRI

July 9th, 2009 ntavares Posted in dri, pt_PT No Comments »

Ouvir com webReader

Não é à toa que toda a gente gosta do arco-íris - se uma imagem vale mil palavras, ler código a cores deve valer umas boas 900. Depois de montar as minhas primeiras demonstrações em MySQL, resolvi experimentar um plugin de Syntax Highlighting (sempre tive pavor a qualquer potencial tradução desta expressão).

O plugin escolhido [algures entre o acaso e o ranking do Google] foi o iG:Syntax Hiliter Plugin e, para já, de 0-100, dou-lhe um 70... é muito fácil de instalar, mas em termos de potencial parece-me inferior ao que faz, por exemplo, o SyntaxHighlight GeSHi no MediaWiki.

Não obstante, mesmo assim, teve que levar uma martelada para não deturpar caracteres mais conflituosos com HTML, que insistiam em transformar-se estupidagicamente em HTML entities (desde quando é que algo dentro de |code| deve ser transformado??). Mas bem, vamos ver como corre, e se não levo na cabeça do pessoal de infrastruturas...

Para já, a cobaia foi o último post: MySQL DATETIME vs TIMESTAMP vs INT performance and benchmarking with InnoDB. Claro está, já se avizinha uma martelada no tema... alguém conhece um com distribuição horizontal melhorzinha?

AddThis Social Bookmark Button

De repente…

May 2nd, 2008 ntavares Posted in dri, en_US No Comments »

Ouvir com webReader

...olhei para o lado, e era o único que não tinha blog... então cá vai disto.

O título é uma paródia a uma paródia que resultou da paródia que é o Natal, quando a malta se junta [para a paródia]. Ainda assim, deixo em aberto a possibilidade de fazer consultoria [remunerada] sobre qualquer localização de Portugal. Sim, porque conforme se tem visto nas últimas discussões na DRI sobre geografia de Lisboa, eu [já] tenho sempre razão, o pessoal já discute é por vício... :P

AddThis Social Bookmark Button