CrazyTB's blog

Subscribe to RSS feed

Posts tagged with "linux"

Nvidia crash, followed by glitched screen

, ,

I have a notebook with Nvidia 9500M GS. This videocard has "crashed" a few times already. These "crashes" can be identified as the screen freezing for a few seconds, and a glitched screen after it unfreezes. This glitched screen can be described as lots of small squares (2x2 pixels) appearing randomly over the entire screen. It seems like the video texture buffer for drawing the screen got corrupted. Also, over time those squares tend to fill up the entire screen, but they are cleared after switching to another window or doing something that forces a full redraw of the window (in other words, after sending new fresh data to the video card).

It has happened on 2010-03-09 while I was playing Bob Came in Pieces in Windows. (nvidia-crash-2011-03-09.png)

Later it happened again on 2010-06-10, also inside Windows. (nvidia-crash-2011-06-10.png)

But last month, in 2011-11-14, it happened while I was inside Linux. I wasn't doing anything "heavy". Actually, at that exact moment I was switching around workspaces using Cube plugin from Compiz and I had very few open windows. (nvidia-crash-2011-11-14-001.png, nvidia-crash-2011-11-14-002.png, nvidia-crash-2011-11-14-003.png, nvidia-crash-2011-11-14-004.png)

The following message was sent to the system log right after the videocard crashed:

NVRM: Xid (0000:01:00): 13, 0003 00000000 00008297 00000f04 3f266666 00000040


The solution for these crashes? Rebooting. Actually, maybe it might be required to power off the computer and then turn it on after a few seconds.

I don't know why they happen, or how to avoid them, but at least they happen very rarely.

Nvidia bug when rendering windows smaller than 32x32

, , , ...

This week I updated x11-drivers/nvidia-drivers from 270.41.19 to 275.09.07, and I found a bug. Any window that is smaller than 32x32 is not correctly rendered. Since "tooltips" sometimes are quite small, it's very easy to hit this bug.

Update: It seems that version 285.05.09 works correctly.

Read more...

Comparison between Microchip PIC and Atmel AVR microcontrollers

, , , ...

Earlier this year, I had contact with a PIC microcontroller as part of a college course. I'm documenting here everything I learned, and also making a comparison between PIC and AVR.

Read more...

fontpreviewer - A little tool that was forgotten for almost 4 years

, , ,

Today something very funny happened.

I found a little tool called fontpreviewer. It generates a PNG thumbnail of each TTF font, and also writes a HTML file showing all the thumbnails. It's written in Python and uses pygame. It's very simple to use and very handy.

The fun thing is: I've written that tool, and I didn't remember at all. Even after looking at the source code, it took me a while to believe it was written by me.

Anyway, fontpreviewer is now available on BitBucket, feel free to check it out. Please also read fun_story.txt, where I describe how I "rediscovered" this project, and how long it took until I found who was the author.

How to make rt61pci module work on recent Linux kernels

, , ,

If you remember, I had set up my desktop computer as a Wi-Fi access point. It is working really well since then.

However, I hadn't updated that kernel in a long while... I didn't want to update because I read about rt61pci problems with hostapd after upgrade to 2.6.31, and I didn't have enough time to investigate and solve problems back then. So, I was running linux-2.6.30-gentoo-r5 kernel for over a year.

This month, however, I decided it was time to update. And so I did. And it stopped working.

After updating to linux-2.6.36-gentoo-r5, this happened:
  • hostapd starts, no error messages.
  • My notebook can associate with the AP, no errors.
  • hostapd shows "WPA: pairwise key handshake completed (RSN)". My notebook wlan0 interface is up.
  • However... The DHCP client times out and the notebook doesn't receive an IP.
  • Even if I manually set an IP to the notebook interface, one machine can't ping the other one.

After watching packets in wireshark, I found out the notebook was able to receive packets from the desktop (specifically, it was receiving CUPS broadcast packets). I tried pinging my notebok from my desktop, and the notebook was receiving the ping requests, but the ping responses never reached the desktop.

Then I tried disabling WPA and reconnecting. This time, it everything works and both machines can communicate. Obviously, I've disabled it a minute later. I don't want my Wi-Fi unencrypted.

Okay, I was out of luck. The new kernel only worked without encryption, and the old kernel worked flawlessly. I didn't know what else to do, so I asked for help in rt2x00-users mailing list. And I got very helpful responses! Thanks, Luis Correia and Helmut Schaa!

They suggested me to try a little patch, but it half-worked: Linux client worked fine, while Windows client got very unstable connection. Then, it was concluded the best solution was to disable hardware encryption:

It is a known fact that some older chipsets, like rt61pci have some
problems with encryption and they were never fixed.

So, it is best to disable it alltogether since the difference to use
software encryption isn't noticable on more recent computers.


So... How to disable hardware encryption? Very easy! Just pass nohwcrypt=1 option to the rt61pci linux module. I did that by adding a file /etc/modules.d/rt61pci_nohwcrypt with this line:
options rt61pci nohwcrypt=1

And then ran update-modules command. I bet it would also work if I added it to the /etc/modprobe.d directory. Obviously, after that you should either reboot or unload and reload the module.

But why did it work on previous versions? Because a while ago (maybe up to kernel 2.6.30), the default setting had hardware encryption disabled. Recently (maybe after kernel 2.6.31), it became enabled by default, and thus things stopped working on some chipsets.

So now I'm happy again, with my machines updated and my Wi-Fi back working. smile
May 2013
S M T W T F S
April 2013June 2013
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 31