Skip navigation.

Posts tagged with "gentoo"

First contact with ATmega8 microcontroller - part 3

, , , ...

Now, I'm going to leave the hardware parts alone and start working with the software. At the end of this part, we will have our firmware ready to be written (programmed) into the microcontroller.

Read more...

First contact with ATmega8 microcontroller - part 1

, , ,

Last week I bought an ATmega8 microcontroller. I plan to use it to build an arcade USB Joystick, but first I need to understand how it works and how to use it.

This and the following posts are an attempt to document my first contact with this microcontroller and to describe all needed hardware and software so you can start using a microcontroller too.

Read more...

Playing Flash videos in Opera under Gentoo Linux

, , ,

This post is actually an adaptation of a bug report I submitted to Opera Software, based on my own experience and on what I learnt from Gentoo Bug 127200 (netscape-flash misbehaves in Opera). I think this information is too valuable to be hidden at internal Opera Software bug tracker and at Gentoo bugzilla.

The issue: Flash videos are not played.

I can try YouTube, Google Videos or any other site. It does not work.

My system:

  • Gentoo Linux x86
  • Opera 9.x
  • Flash Player plugin 9.0.x.x

Why this happens:

Depending on where the libflashplayer.so is installed (or, if more than one is installed, which one is "default"), then the video won't be played.

The gory details about why this happens are described at Gentoo bug 127200 (netscape-flash misbehaves in Opera).

In summary, from what I could understand:
  • If libflashplayer.so detects "netscape" in its own pathname, then videos won't be played (at least not in Opera). I guess it enters in some crazy compatibility mode with Netscape browser (R.I.P.)
  • Gentoo installs libflashplayer.so at /opt/netscape/plugins/, and installs a symlink at /usr/lib/nsbrowser/plugins/.
  • Gentoo Opera ebuild makes a symlink /opt/opera/lib/opera/plugins/libflashplayer.so -> /opt/netscape/plugins/libflashplayer.so.
  • Gentoo Opera ebuild sets "/opt/netscape/plugins=2" at /opt/opera/share/opera/ini/pluginpath.ini, but I guess this file might be ignored.
  • Some Opera users (like me) might have opera6.ini selecting /opt/netscape/plugins/libflashplayer.so as Flash Player plugin. For these users, flash videos won't be played.
  • New Opera users (with a brand-new empty profile directory) will get the correct paths since the first time, and Flash videos will work for them.
This combination of factors might be too specific, but happens. I guess other people on world might have the same issue, and these people are very unlikely to find out its cause nor how to fix it. They will just think: "flash videos don't work inside Opera" (like I did think for many months, maybe a year or more).

The solutions:

The solution consists in telling Opera to not use /opt/netscape/plugins/libflashplayer.so. This can be done in three ways:

Solution 1: Preferences -> Advanced -> Downloads ->
application/x-shockwave-flash swf -> Edit... -> Select the correct plugin at
"Use plug-in" drop-down (if more than one is displayed, select any one that does not contain "netscape" in path). Repeat this for application/futuresplash spl file
type. There is no need to restart Opera after this change.

Solution 2: Manually edit ~/.opera/opera6.ini while Opera is closed and change the paths.

Solution 3: Add "/opt/netscape/plugins=2" to ~/.opera/pluginpath.ini.

Suggestion to Opera Software:

Opera Software can workaround this. The Opera launcher script should check if the /opt/netscape/plugins/libflashplayer.so path (or the /netscape.*libflashplayer.so/ regex) is present in ~/.opera/opera6.ini. If it is present, then warn the user that this is known to not work (a simple message printed to terminal will be helpful enough).

Suggestion to Macromedia/Adobe:

I think Flash technology is great, is powerful, is easy and fun to use.

But I think Flash sucks. Flash player is limited to Windows platform plus some few buggy and slow (or slower than windows) implementations on other platforms. The Flash format should be open, and anyone should be able to write a compatible flash player without need for reverse engineering. This would also allow anyone to fix bugs like this one.

Adobe site also sucks.

Suggestion to webmasters:

Avoid using Flash without a really good reason. Don't make Flash-based sites, they are slow and sometimes buggy. Don't use Flash for things that can be done without it (menus, for example). Don't use transparent Flash objects over other objects, because many times this is not supported by browser.

I was thinking about writing above paragraph in bold font with a big font size, but even that way it won't reach the right people. If you are still in doubt, also see Web Pages That Suck.

Am I saying any Flash is bad? No. Flash videos are the latest "revolution" in web pages, as well as AJAX. Flash player allowed us to watch videos without downloading hundreds of codecs and plugins (RealPlayer plugin, Quicktime plugin, codecs, more codecs, yet another video plugin...). This is great, but don't abuse (or misuse) Flash.

Updates/trackbacks(section added on 2007-12-30)

Supposedly, this blog should automatically detect and list trackbacks, linkbacks and things like that. Well, in case it does not work well, I will post here or in comments whatever I find.

2007-12-30 It was a happy surprise to find a YouTube video showing the user applying this solution and linking back to this post. I'm glad to find it is being useful for other people. YouTube works in Opera (Linux). Honest. (looks like the video was published on 2007-09-16, but I found it only today, 2007-12-30)

nVidia (driver) strikes back (again)

, , ,

This is not the first time I post here a problem related to nVidia binary driver on my system. Neither this is the second time. Neither the third... Well, I could even rename my blog to "Crazy nVidia bugs".

Recently, nvidia-drivers-100.14.09 has been marked stable in Gentoo. I looked at that and thought to myself: "Wtf? What is this weird version number? Hum, maybe a whole new development branch? Maybe a code rewrite? I don't like the way it looks, I predict it might be buggy."

Unfortunately, it is buggy.

The new bug is: when exiting X and returning to text-mode console, sometimes the screen goes black. When this happens, I can't see what's written on console, but I still can use it (I could hear some beeps when pressing some keys, and I managed to startx again). I tried to ssh into this machine, and I found nothing strange, no process was eating lots of CPU (like what happens with that X.Org-freezing bug, described in many previouos posts here).

I've added a bug report at Gentoo Bugzilla. It is bug #186596.

I've also sent some e-mails to nVidia Linux bug report address. I got a very quick response telling me that 100.14.09 version is no longer supported, and asking me to test 100.14.11. I did, and the bug is present in both versions.

If you wanna keep track of this issue, watch bug #186596. But, for now, I'm masking 100.14.09 and 100.14.11 versions and I'm going to use 1.0.9639 version.

NVIDIA = No VIDeo for vIA

, , , ...

If you read this blog, you might remember how many times I tried to make nvidia driver work with X.org, without freezing it. The solution was disable AGP support and wait until X.org 7 was released, since I read somewhere that nVidia sent some patches to it.

7 months since my previous try, now I have modular X.org 7.0 and Gentoo "told me" to update my nvidia drivers. It is a good time to try again.

Versions: Modular X.org 7.0.0, nvidia-drivers-1.0.8762-r1, vanilla-kernel-2.6.17.6
Hardware: Pentium III 800MHz, Asus CUV4X motherboard (with Via chipset), GeForce FX 5500 videocard

I edited my xorg.conf file and commented the following line:
#Option      "NvAGP"        "0"
This way, the AGP setting was "automatic". After I started X, module via_agp has been loaded, and /proc/driver/nvidia/agp/status told me the AGP was enabled as 4X (my video card supports 8X, but my mobo only supports 4X).

For some time, everything was fine. I noticed no speed-up by having AGP enabled. If there was some speed-up, it was minimal.

Then, suddenly, X froze. Exactly the same symptoms as before: keyboard dooes not work, nothing work, but mouse cursor still moves on screen. Although I could't check that, people say the system is still up and running, and, when opening an ssh session, we can see that X process is taking almost 100% of CPU.

Well, no ssh for me, no way to check or kill X process. So I did Alt+SysRq+K (see footnote), which killed X and returned me to a plain text console (I don't use framebuffer, bootsplash or similar). Fortunately, the console was a pure and working text console. I remember some other times I was forced to do that, the monitor display was still graphic and displaying completely garbled pixels, even though the console was "working" (I could type commands, but could not see what was printed).

Looking at dmesg output, I can see some very familiar lines:
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 4x mode
NVRM: Xid (0001:00): 6, PE0000 1ffc 00000000 0000f74c 0000ffff 00000000
SysRq : SAK
That NVRM: Xid... line was always present everytime X froze (maybe with other values). Looking at this blog archive, you might find that line on other posts.

Conclusion: X.org 7 did not fix this issue (as I thought it would). In fact, I don't even know from where this issue is: agpgart module, via_agp module, nvidia module, X.org or even Via hardware.

Solution: Put Option "NvAGP" "0" line at your xorg.conf, near Driver "nvidia" line. If you run cat /proc/driver/nvidia/agp/status, it will print Status: Disabled, because AGP support will be disabled. This causes no noticeable slowdowns, and everything else will still be working fine, including 3D OpenGL programs and games. And, at least, X won't be crashing and you will have a stable system again.

Oh, one last advice: I've tested if that (wrong) behavior described at nVidia versus fonts! has been changed, and I found it is still the same behavior. So, all information on that old post is still valid.

Footnote about SAK/SysRq: Alt+SysRq+K (SysRq is the same key of Print Screen) combination is trapped by kernel and does mean Secure Access Key (SAK). It will kill all programs on the current virtual console. To enable that, you might want to recompile your kernel with Magic SysRq key, or modify your keyboard mapping. Read more at /usr/src/linux/Documentation/sysrq.txt and /usr/src/linux/Documentation/SAK.txt.

edit: A friend told me he had the same problem. He has AMD Semprom 2200+ on Abit VA-10 motherboard (Via chipset) and GeForce 4 MX 440 64 MB.
January 2010
S M T W T F S
December 2009February 2010
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30