Olivier Blin: Debugging udev ATTRS/ATTR
When multiple display modules matching the same device are loaded at startup by udev coldplug, we can get in a situation where X doesn't start (#32030). This can happen when different versions of nvidia modules (nvidia, , nvidia96xx, nvidia71xx) are installed, which is the case on our live CDs.
To prevent all these modules from being loaded by udev, we can explicitely exclude devices from the display PCI class, like we do for storage controllers:
# modprobe pci devices on cold plug except for: # PCI_BASE_CLASS_STORAGE 0x01 ACTION=="add", SUBSYSTEM=="pci", ENV{STARTUP}=="1", SYSFS{modalias}=="?*", \ ATTRS{class}!="0x01*", \ RUN+="/sbin/modprobe %s{modalias}"But adding another match to exclude the display class (PCI_BASE_CLASS_DISPLAY is 0x03 in /usr/include/pci/header.h) did not always work: ATTRS{class}!="0x03*" fails on PCI-Express devices.
That's because the ATTRS{class}!="value" rule walks every parent devices to check that each of them has a class different from "value", while one could think it would match if only one of them has a different value. Thus, when the tested device has a parent device, like with PCI Express devices, the negative ATTRS check is likely to fail.
So, the solution is to use ATTR{class}!="value", which checks only the current device, without walking the parent tree.
To debug this, I built udev with DEBUG=true, and added a ENV{FOO}=BAR operation in the rule I tested, to know quickly if it mached (in the output of udevmonitor --env).
# udevd --daemon --debug-trace --verbose &>udevd-debug.log # udevcontrol log_priority=debug # udevcontrol env STARTUP=1 # udevmonitor --envThen, testing the rule of my video adapter device is just a matter of writting in the uevent file in sysfs:
$ lspci | grep VGA 01:00.0 VGA compatible controller: ATI Technologies Inc Unknown device 94c3 # echo 1 > /sys/devices/pci0000:00/0000:01:00.0/ueventClaudio Matsuoka: Mesa quiz: spot the bug (with patch)
Following the development of the investigations on the recently reported Mesa problem triggered by Neverball and Metisse, Ademar reports that “the workaround is not effective with at least ATI 9250 video cards, where we now have a crash at a different place”. We set up a system with an ATI Radeon 9250, and, indeed, it still crashes:
Mesa: Mesa 7.0.1 DEBUG build Oct 1 2007 18:52:02 Mesa warning: couldn't open libtxc_dxtn.so, software DXTn compression/ decompression unavailable Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1218062640 (LWP 17221)] _generic_read_RGBA_span_RGB565_MMX () at x86/read_rgba_span_x86.S:590 590 pushl MASK_565_HA segfault in a push instruction sounds very odd. Read on to see what the differential diagnosis session with Boto and Salem lead us into. And unlike the previous patch, this one resulted in a real fix for a real problem:
Don’t read the patch if you want to find the bug yourself based on the scenario description below.
Permalink | No comments | Filed under bitbrushing, patch, code, en
Vincent Danen: Using FileZilla on Linux
Vincent Danen: Using FileZilla on Linux
Claudio Matsuoka: Neverball: a workaround for Mesa crash
Ademar complained about certain programs such as Neverball and Metisse causing a crash in the X.org GLX code in systems with some Intel and ATI cards, specifically in a call to quadfunc_unfilled_rgba() when glPopMatrix() flushes vertices. After a quick inspection it was clear that the cause was a null pointer dereference in Mesa 7.0.1, so If you’re experiencing a similar problem you may want to try this trivial workaround:
Further information and possibly a better fix available at the original bug report.
Permalink | 2 comments | Filed under shotgundebug, patch, en
Fabrice Facorat: My Daily : what's up doc ?
[EN] 2007-09-18 -> 2007-10-01 :
- Ok, back to life. I've finally managed to recover from my crash disk.
- Write articles for Linux Identity Kit 2008.0. Manage to write articles about : System configuration ( drakconf, draknetcenter + drakroam, security with draksec, tools auth delegation with consolehelper, installing & customizing Compiz Fusion ), File sharing ( NFS, SMB ), virtualization ( VirtualBox, KVM + virt-manager ). Now need to finish articles about the installation and eventually about kde4.
- Reports several bugs concerning virtualization support
- Manage to make drakvirt somewhat work, but blocked by lack of SquashFS support in xen kernel which prevent Mandriva installer to be launched
- Correct another user having put incorrect encryption key in drakroam which leads to non workable wpa_supplicant ( cf bug #33182 & #33620 )
- Find how to assigned an unique ID for each call in asterisk call logs thanks to accountcode entry
- Begin to code remote call with asterisk using Asterisk Manager
Reinout van Schouwen: I’ve been told I look older than I am
Adam Williamson: surreal
I find it a wonderfully surreal experience to spend a morning bug fixing and then sit down on my deck here in Vancouver to read my old college gazette. When I was at college, and on the couple of times since that I’ve been back, it feels perfectly natural to have dinner with people who have more letters after their name than you could fit on a full page of the Times, and to toast the Queen - with absolutely no irony, and a distinct sense that it would be Noticed if one didn’t - at the start of each meal. When you’re several thousand miles away, reading paragraphs such as:
“With the abolition of the office of Lord Chancellor, the role of Visitor has returned to the Crown. However, in anticipation of this change, the Society has been, and continues to be, engaged in a major exercise to revise and update our Statutes, including new arrangements for the appointment of the Visitor. The approach we have adopted provides for layered Statutes, Ordinances and Regulations with the Statutes subject to revision only by recourse to the Privy Council, whilst Ordinances and Regulations might be altered more easily by differently weighted votes of our own College Meeting. There is still much work to be done on the detail before our Governing Body agrees to propose the new Statutes to the University for eventual approval by the Privy Council.”
feels wonderfully bizarre.
I suppose to some (particularly, I expect, Americans) this level of association between a university and the government of the realm seems strange and rather worrying, but I quite like it. I just like the feel of a system that evolved in an utterly different time and which has been preserved by weight of momentum more than anything else. In a strange way, the fact that it is clearly an utterly inappropriate system that would never be designed in the present day makes everyone involved in it act rather impeccably. I suspect there’s rather less *actual* conflict of interest, patronage and so on going on between Oxbridge and the U.K. government than there is between the Ivy League universities and the U.S. government, though it *does* happen.
Eskild Hustvedt: The joys of Netshop.no
I turned in my laptop for repairs this January (under a month after the last repair). The screen was broken. Then they informed me that the motherboard was also borked, due to moisture, so I’d have to pay for the repairing of that. Okay, that’s fair enough I guess. So I told them to go ahead and repair. Months passed, until I finally got ahold of them again in April. They then told me that there had been some kind of mistake somewhere and that they would get right to repairing it and that they would do it for free because of the excessive wait. Fair deal, though I’m getting grumpy waiting for my laptop so long, but NOW it must soon be here, as they’re on it again.
Not so, now they tell me that the spare motherboard they had in stock for the laptop was also broken, so they needed to order new ones. More waiting. Yay. Then suddenly it was vacation, so I couldn’t get ahold of them. Waiting for supplies from Denmark. Right. Well, I need a motherboard for it to work. So I wait.
Now it’s September and I have yet to see any laptop, the technician doesn’t reply to my queries, and the people in phone support are about as much help as talking to my wall. I need that laptop.
So what can I do? I can contact the idiots and probably demand that they send the laptop to me now. But what good will that do, I’ll have a laptop without a working motherboard. So that’s the same as right now, really. Complain? Right, that’s what I’m doing, they don’t seem to care much. So I’m at a loss. Just want my laptop back.
For the record the laptop is a Zepto Znote 6515WD. I believe that’s just a rebranded Compal laptop, though I have no idea which model.
Frederik Himpe: What's new in Mandriva 2008.0
In less than two weeks time, six months after the great Mandriva 2007.1 Spring release, Mandriva 2008.0 will be ready and published. Currently, Release Candidate 2 is out, it's your last chance to test it and make sure everything is working before the final release!
There were great ideas at the start of the development phase, and in in those six months that have passed, Mandriva has always been one of the most active projects on CIA.vc. This gives much hope for lots of improvements, so let's take a look at what can be expected from Mandriva 2008.0.
Update 2 October 2007: The following translations of this article are now available, with thanks to the translators:
- Hebrew (Dotan Kamber).
- Brazilian Portugese (Sérgio Rafael Lemke)
Ga door met lezen van "What's new in Mandriva 2008.0"
Vincent Danen: Getting things done with mutt
Olivier Blin: Auto-mounting LUKS devices
For a few releases, auto-mount of LUKS devices has been broken in Mandriva (bugs #27259 and #30115), because we had the following udev rule as default:
KERNEL=="dm-[0-9]*", OPTIONS="ignore_device"This rule existed because lvm2 setup got broken when udev tried to run vol_id on dm devices (see Let udev play with snapshots thread on linux-lvm ML). This has been fixed ages ago (in lvm2-2.02.13) with the following change: When adding snapshot leave cow LV mapped device active after zeroing (commit).
So, the "ignore dm devices" workaround has been removed from our udev rules, and LUKS devices should now be auto-mounted by default on modern desktops \o/ (GNOME users, enjoy)
Olivier Blin: Avivo driver and r610
This week-end, I decided to buy a new PCI-E video card, with a passive cooling solution, since the default ATI fan of my ASUS EAX550 was really noisy. So, it took my rollers to go rue Montgallet and find a silent one. The first shop tried to sell me the exact same card as silent, but of course, I didn't "bought" it :-p
Most shops only had passive cooling cards from Nvidia, but I preferred to get an ATI one, since they're usually better supported by free-software drivers. Finally, I bought a cheap (55 euros) MSI RX2400PRO card, with a big heat sink, but also with 256MB of memory and a lot of HDTV features that I'll probably never use...
Though, at first boot, harddrake automatically configured the card to use the fbdev driver, which was not a good sign regarding support in free-software drivers /o\
X didn't start with the free radeon driver, and it even failed with ATI's proprietary fglrx driver (8.39.4). Adam's post on cooker reminded me about the avivo driver. It supports r5xx chipsets only, while mine is a r610 HD 2400 chipset (device ID 0x94c3). According to the avivo developpers, it should be possible to make this driver support r6xx cards (daniels post).
This post also mentions how to further debug the driver, using these tools:
- avivotool
- xresprobe (hacked by airlied)
- valgrind (hacked version), (it has to be patched to build with glibc-2.6, for example with a rediffed version of the gentoo patch)
An article on Phoronix (AMD Radeon HD 2000 Series & Linux) showed that it won't be that easy to get r6xx support in avivo. Following the same track, I patched the avivo driver to list my chipset device ID, but I got the same error message when starting X:
xf86MapVidMem: Could not mmap framebuffer (0xb0000000,0x0) (Invalid argument)So, I hopped in the #dri-devel channel to bug the driver developpers (mainly Jerome Glisse). The initial advice was that the radeon memory size register was not at the same offset in the BIOS anymore. Eek. And that I could grep for the memory size in a BIOS dump. Eek.
Actually, I just had to use the radeondump tool (radeondump HOWTO), and search for my memory size in the registers. It appeared to be in kB, so I grepped 0x00040000 (256*1024, since the card has 256MB) in the dump. It gave a few hits, and 0x168 was apparently the correct offset.
(II) avivo(0): No connector table in BIOS (EE) avivo(0): No valid modes.Trying ./avivotool/avivotool romtables shows the same No connector table in BIOS error message (after fixing avivotool check for mmap() return code). Even if the BIOS header reads ATOM, it seems that the format is different from other r4xx/r5xx chipsets. So, a new video BIOS format, fun in prospect!
I saved the BIOS rom in a file to make debugging easier:
$ lspci | grep VGA 01:00.0 VGA compatible controller: ATI Technologies Inc Unknown device 94c3 # cp /sys/bus/pci/devices/0000:01:00.0/rom r610.rom # ./avivotool/avivotool romtables r610.romBesides the source code of avivotool, I used some other Radeon BIOS dumps (r420, r520, r530, r580) as examples to guess the BIOS format, and notably to find where the connector table is hidden in my BIOS. The HowVideoCardsWork article from Xorg wiki was quite handy to get basic information about CRTC and connectors, since I'm a total n00b here.
I had to do some hex maths, so I used bc as hexadecimal calculator (tips about base modes) (more tips about hexadecimal). Maybe I could have used emacs-calc, or pixel's hexedit, but anyway I ended writting a lot of debug code to show hex numbers in the format I wanted to guess connectors offset. But so far, I have not found any relevant pattern :-/
Yesterday, I knew nothing about all this stuff, and here I am, parsing hex numbers (and again following warly's steps :-p)... I can't believe me, I should really take a break. Someday.
Vincent Panel: KDE 4.0 Beta 1 is available for Mandriva 2007.1
Warning : Beta1 isn’t as stable as you might expect and beta2 will probably give a better overview of KDE4. So you’d better install it on a test/virtual machine. (Thanks to Daniel Beck)
Yes !
- urpmi.addmedia kde4 <KDE_MIRROR>/pub/kde/unstable/3.92.0/Mandriva/2007.1/i586/media/4.0
- Update Mandriva Linux your favorite way
- You’re done
I can’t test it because I first need to clean my drive and get a lot of free space But If I manage to install it, be sure it’s gonna be on this blog !
(For you information, KDE 4.0 Beta 1 = KDE 3.92.0)
Vincent Panel: KDE 4.0 Beta 1 is available for Mandriva 2007.1
Yes !
- urpmi.addmedia kde4 <KDE_MIRROR>/pub/kde/unstable/3.92.0/Mandriva/2007.1/i586/media/4.0
- Update Mandriva Linux your favorite way
- You’re done
I can’t test it because I first need to clean my drive and get a lot of free space But If I manage to install it, be sure it’s gonna be on this blog !
(For you information, KDE 4.0 Beta 1 = KDE 3.92.0)
Vincent Panel: Utiliser le kernel 2.6.22 avec Mandriva 2007.1 - partie 1
Je viens juste d’installer le kernel-2.6.22.3mdv-1-1mdv2008.0 (provenant de cooker) sur mon fidèle system tournant sous Mandriva 2007.1.
Pour l’installer, il m’a fallut utilise l’option –nodeps et utiliser rpm (utiliser urpmi et –allow-nodeps aurait pu me conduire au même résultat) à cause d’un conflit avec drakxtools-backend < 10.4.140. Le conflit est dû au Centre de contrôle Mandriva qui ne peut pas probablement pas gérer quelquechose (l’ide modulaire ?), mais je ne veux pas utiliser le CCM pour gérer le noyau de toute façon.
Je voulais utiliser le module coretemp inclus dans le 2.6.22 et, bon, il marche mais en fait, je n’y vois pas grand intérêt pour le moment.
J’espère aussi que le 2.6.22 résout le problème d’ordonnanceur que j’ai avec virtualbox et mon noyau -tmb précédent, mais je ne l’ai pas encore testé.
Maintenant la partie difficile : le sans-fil. Je sais que le nom de module pour ma carte est iwl3945 (ce modules utilises maintenant la nouvelle couche sans-fil du noyau et ne requiert plus le démon ipw3945d) et 2007.1 ne détecte pas (et ne connaît même pas) ce module. Alors retour à la vieille méthode pour configurer le réseau sans-fil : plus d’interface graphique J’ai d’abord dû installer un autre RPM cooker : iwlwifi-3945-ucode-2.14.4-1mdv2008.0 contenant le microcode pour la carte sans-fil qui est chargé par le module lorsqu’il est chargé lui-même. Le pilote s’est chargé sans problèmes mais je me suis retrouvé avec 2 interfaces : eth2 et wlan0_rename… udev est responsable de cela, mais la dernière fois que j’ai touché à la configuration réseau d’udev, je me suis retrouvé avec un système complètement inutilisable, alors je regarderais ceci quand j’en saurais plus sur udev et ses scripts.
Donc cette dernière difficulté m’a ramené à mon vieux noyau -tmb (enfin pas si vieux que ça : 2.6.21 ) car j’ai besoin d’une connexion sans-fil à la maison et au travail. Je ferais un nouveau billet quand ma carte sans-fil aura été configurée correctement !
Vincent Panel: Using kernel 2.6.22 with Mandriva 2007.1 - part 1
I’ve just installed kernel-2.6.22.3mdv-1-1mdv2008.0 (coming from cooker) on my faithful system running Mandriva 2007.1.
To install it, I had to use the –nodeps switch and install it with rpm (using urpmi and –allow-nodeps may have lead to the same result) because of a conflict with drakxtools-backend < 10.4.140. The conflict is probably here due to MCC not handling something (modular ide ?), but I won’t use MCC to handle the kernel anyway.
I wanted to try the coretemp module included with 2.6.22 and well, it works but actually isn’t very useful to me at the moment.
I also hope 2.6.22 will solve the scheduler problem I have with virtualbox and my previous -tmb kernel, but I haven’t tested it yet.
Now comes the difficult part : wireless. I know the module name for my card is now iwl3945 (this module now uses the new wireless kernel stack and doesn’t require the ipw3945d daemon anymore) and 2007.1 doesn’t detect nor know anything about this module. So back to the old way of configuring the wireless network : no more GUI I first had to install another cooker RPM : iwlwifi-3945-ucode-2.14.4-1mdv2008.0 containing the microcode for the wireless card which gets loaded by the module when it gets loaded itself. The driver loaded successfully but I ended up with two interfaces : eth2 and wlan0_rename… udev is responsible for this but the last time I modified udev network configuration I ended up with a completely unusable system, so I’ll have a look when I know more about udev and its scripts.
So this last difficulty brought me back to my old -tmb kernel (well, not so old : 2.6.21) because I need a wireless connection at home and at work. I’ll make a new post once my wireless network card has been configured successfully !
Frederic Lepied: ÉquitÉcho
Mon amie Pascale vient de lancer un site d'information sur le commerce équitable en Ile de France: http://equitecho.org/. Vous y trouverez:
- des dossiers,
- le recencement des différents acteurs,
- le calendrier des évènements à venir.
Mandriva Team: Newsletter, interview with pcpa
The latest Mandriva Community Newsletter has been posted - you can read it over on the Mandriva Club. You’ll also find an interview with our new X.org developer, Paulo Cesar Pereira de Andrade (pcpa).
Claudio Matsuoka: A tale of an esoteric bug
As a software maintainer, sometimes you receive very peculiar bug reports ranging from laughable to completely bizarre, yet reproducible. Some of them are so strange they deserve a bit of post-mortem pondering and reflection, like this one. But first, it’s important to remember that the user reports what he sees, a manifestation of the bug — and that can be very different from the real causes of the problem. Ready to go? The next paragraph shows the original bug report, and then you’ll see what the investigations led us into.
Linux fails with a kernel panic on systems with a Celeron processor and 256MB of RAM when an Ext3 filesystem is created on a large partition and you set the number of blocks reserved to the superuser to 0 (mke2fs -j -m0). The problem doesn’t happen if you use a different processor, or in systems with 1GB of RAM.
Permalink | No comments | Filed under wtf, linux, en