Monday, November 25, 2013

When X/kdm do not start properly

These problems go into the pile labeled, "duh, I should have tried that first." Inevitably when I make changes to the graphics hardware or complete a new install of gentoo I get to the final stage of starting X and am left with a black screen (the monitor is still receiving a signal, there's just nothing there). Usually I check Xorg.0.log and kdm.log and find that there were no issues. In this case it probably means I forgot to set the opengl renderer.

# eselect opengl set ati

After a reboot the system comes right up into kde.

The second variation is an old school X cursor, but nothing else resembling a gui (black screen), and Xorg.0.log whines about fglrx_dri.so. In this case I needed to switch the order of the graphics cards in my xorg.conf. The below command spits out the graphics adapters, and the first column is the information we want to put into xorg.conf. In this case I already had the correct pci-e device numbers, but I had them in the wrong order. A simple swap of 2:0:0 and 6:0:0 in xorg.conf (NOTE the syntax change when putting these into xorg.conf) and everything was back to functional. (SIDE NOTE: removing a graphics adapter can alter these numbers, in this rig with one card it sits at 05:00.0)

# lspci | grep -i vga
02:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Tahiti XT [Radeon HD 7970]
06:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Tahiti XT [Radeon HD 7970]


xorg.conf lines
Section "Device"
        Identifier  "aticonfig-Device[0]-0"
        Driver      "fglrx"
        BusID       "PCI:6:0:0"
EndSection

Section "Device"
        Identifier  "aticonfig-Device[1]-0"
        Driver      "fglrx"
        BusID       "PCI:2:0:0"
EndSection

Friday, November 22, 2013

To give a bit of background about my Linux usage; I began with Mandrake, Suse, and Redhat back in 2001. By 2004 I decided that if I were ever to become proficient using Linux I needed to use it 24/7. At this point I had been trying Gentoo, so I loaded it on all of my boxes and have bounced around with various spin offs of Gentoo (Vidalinux and Funtoo). These days I have moved back to vanilla Gentoo and generally have a small installation of Ubuntu one each box for installing Gentoo.

I suppose if this blog has a purpose, it is primarily to list problems I've run across and fixed. The hope is that writing these solutions down will help my brain cell remember the solutions the next time around.

Now on to the fun stuff, which was udev automagically renaming ethernet devices. The standard tell comes about during system initialization, and rc screams about not being able to start eth0.

$ ifconfig -a

The above command should show the device labeled as something not eth0 (if you don't see anything promising there at all it could be the kernel does not have the driver you need). Now that we know some sort of network device exists there is hope of fixing it. In this case we need to tell udev to stop being so clever and give us back our preciously boring eth0. The solution I decided upon (there were several, I'll try to find links to the others) was adding a rule to /etc/udev/rules.d.

# ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
# /etc/init.d/udev restart
# /etc/init.d/net.eth0 start