Kernel Mode Setting for some ATI GPUs breaks suspend/resume

Another Fedora post.

I ran into this bug in Fedora 10, and by looking at those bug reports, I was able to work around it. But I had forgotten all about that when I installed Fedora 11. So I'm writing this partly as a note for myself in case the bug still exists in Fedora 12.

The problem is that Fedora incorporates something called Kernel Mode Setting for ATI Radeon GPUs. KMS is a technology that gives the kernel more responsibility for managing the graphics hardware, rather than leaving it in the hands of the X sever. Unfortunately, there is a bug in the Radeon KMS support, at least for the Radeon Mobility X1400 chip in my Thinkpad T60. It will suspend, but the video never comes back during a resume.

The workaround is to disable KMS. This can be done by adding the nomodeset option to the kernel command line in /boot/grub/grub.conf. You'll need to reboot for this to take effect.

KMS is a worthwhile technology, if for no other reason than making the Fedora boot process much prettier. But with suspend working, I rarely have to watch the boot process, so its appearance is not a major concern for me.

(On a distantly related note, I see that the GGI/KGI project is still just about going. That takes me back a few years.)

2 comments

Fedora 11, netbooks, and using ext4 without a journal

Fedora 11 is out. One of the highlights of this release is ext4 support (the successor to ext3 as the mainstream filesystem in the Linux world). But Fedora 11 doesn't just support ext4. It really wants you to use ext4 — in fact, the Live CD won't install to any other filesystem.

(This is because an install from the Fedora Live CD works simply by copying the ext4 filesystem image contained on the Live CD onto the target storage device, and then resizing it. This makes such installs astonishingly fast, faster than any other method I've seen to install a comparably complete Linux system. The downside is a lack of flexibility.)

I don't have too many reservations about using ext4 on my personal systems. But it did raise an issue when I came to upgrade my Acer Aspire One netbook. The model I have uses a 7.5GB SSD as its main storage. Given the price of the whole machine, it's a safe assumption that this SSD is a cheap part, without the same kind of sophisticated wear levelling algorithms that server SSDs have. But ext4 is a journaled filesystem, just like ext3. The journal is a small area of storage which gets written to for each filesystem transaction, so it's conceivable that it could wear out a region of the SSD. For this reason, netbooks that come with Linux pre-installed tend to use the ext2 filesystem, which isn't journaled. And when I had Fedora 10 installed on mine, I switched the filesystem from ext3 to ext2 for that same reason. ext3 uses similar on-disk structures to ext2, so this is a straightforward operation, but some of the new features in ext4 mean this kind of downgrade is not possible.

But there is a solution to this: ext4 has an unjournaled mode. You can remove the journal from an ext4 filesystem with the tune2fs command:

tune2fs -O ^has_journal /dev/sdXX

The only problem is that this feature was introduced fairly recently, and some tools have yet to catch up. In particular, the version of e2fsprogs currently in Fedora 11 won't read the UUIDs from such filesystems. And because the Fedora installer generates an /etc/fstab which identifies filesystems by UUID, if you just run the above command, the system can't find its root filesystem and so doesn't get very far through the boot process.

So what you need to do to disable journaling is boot from the Live CD, mount the system partition and any boot partition and edit /etc/fstab and /boot/grub/grub.conf to replace UUID references with old fashioned /dev/sdXX block device names. Then unmount it, run the tune2fs command above, and you should have a functional system without a journal.

Update: there is a comprehensive list of tips to customize Fedora 11 for SSD-based netbooks here. It explains in more detail how to remove the journal from an ext4 filesystem.

2 comments