These days I had to install a Gentoo on a Compaq 6820s laptop that comes with a ATI Mobility Radeon X1350 (chipset RV515).
Although I followed all the guidelines from the following resources:
- http://wiki.gentoo.org/wiki/Radeon
- http://www.gentoo.org/doc/en/xorg-config.xml
- http://en.gentoo-wiki.com/wiki/Radeon
I have encountered an unexpected error while loading the Linux ATI Radeon KMS that was related to the Kernel Mode Setting (when KMS was disabled I've got no error but no KMS too).
My steps:
First I configured the Linux kernel to embed the radeon driver within the kernel:
and thus the system freeze at boot time, exactly when the kernel tried to initialize the ATI GPU.
A bit later I have changed the kernel configuration so that the "ATI Radeon" has to be built as a kernel module. I have also blacklisted the radeon module to make sure it won't get loaded, so I would load the module manually after the kernel would boot successfully. So I have booted the kernel with the KMS set "off" by default:
grub> kernel /KERNEL root=ROOT radeon.modeset=0
then, after everything loaded successfully I was trying to load the radeon module with the modeset option set "on":
modprobe radeon modeset=1
when the system completely froze (no CPU activity or I/O responsiveness whatsoever).
Later, I un-blacklisted the radeon module in order to get it loaded automatically. The kernel have been loaded successfully and everything was just fine, except the fact that I had no KMS whatsoever (of course, I booted the system with radeon.modeset=0).
What I've done later was really tricky and that fixed my problem. I've unloaded the radeon module from memory and loaded back with modeset=1:
modprobe -r radeon modprobe radeon modeset=1
If you do this while you're on X then I'm pretty sure your screen will turn into black. What I did to avoid that was to logoff from X session, kill the SLIM login manager then to stop the XDM service. After that I unloaded/loaded back the radeon module (as shown above) and then started XDM (which in turn started automatically the login manager) so that I got an wonderful X session with a full support of framebuffer that improved both the screen resolution and the user experience.
Now the thing is: "how to automate this" so that I won't do that every time I boot the system?
You could try to create a simple BASH script that, in principle, would do the trick shown above then would do what your /etc/inittab would normally is doing in the last step (like loading the login/window manager).
In my case I just hack the /etc/X11/startDM.sh script that would normally load the X session (whatever it is: xfce4, gnome, lxde, ...,etc). So just before that script (startDM.sh) executes the default desktop environment I've inserted that "modprobe" thing.
Now, every time I boot the system, just when the xdm service is started, the system switchs automatically to a framebuffer-enabled graphic, resulting in a higher resolution graphic and a better user experience.
Now, if you think that this article was interesting don't forget to rate it. It shows me that you care and thus I will continue write about these things.
Eugen Mihailescu
Latest posts by Eugen Mihailescu (see all)
- Dual monitor setup in Xfce - January 9, 2019
- Gentoo AMD Ryzen stabilizator - April 29, 2018
- Symfony Compile Error Failed opening required Proxies - January 22, 2018
how do i do this on crunchbang (i am new to linux)? what loads x-session on crunhbang?
crunchbang is a Debian based distro. You could find pertinent answers on Debian forum groups.
Anyway, to load x-session on Linux one may run the following command: startx
thanks for the reply, I am looking for the "startDM.sh" alternative in Cruchbang/Debian to make the same changes as you have done in startDM.sh. Could you please point me in the right direction. thanks.
Just check your /etc/inittab to see which is the script that is run automatically by the INIT process that in turn launches your default display manager (i.e. XDM, SLIM, GDM, KDM, LXDM or whatever comes with your distro). In my case, the last line of /etc/inittab is something like this:
x:a:once:/etc/X11/startDM.sh
so I decided to inject those "modprobe" commands into startDM.sh.
You might follow a similar approach, just determine your display manager starting script then inject those "modprobe" commands at the beginning or alike. If your distro does not work like this then try to create a simple daemon script(http://wiki.debian.org/Daemon) that automatically starts at boot-time and which runs those modprobe commands.
many thanks for your comments. I really appreciate. But being a linux noob, I may need more time to fix this. It looks like my linux distro (Crunchbang) does not have a script at /etc/inittab directing me to process which starts GDM (my default display manager). I will keep looking and I am sure I will find it. As for a daemon script, I would need a similar example without which I am likely to mess up. But I am positive that I need to borrow from your clever idea. Cheers and thanks again from the help.
Hi Jay,
You may find a sample daemon at /etc/init.d/skeleton. This is a comprehensive definition of a daemon, well documented. Just make a copy of it (such as /etc/init.d/my-daemon) and change there everything to fit your needs. Read more at http://www.debian.org/doc/debian-policy/ch-opersys.html, especially starting with 9.3. Don't worry, you will manage to fix it.