Switch between DRM drivers without rebooting

I am trying to understand DRM drivers. One problem is, I had to reboot the system every time changes are made to DRM drivers.

The reason:
fbcon uses framebuffer drivers. DRM implements the framebuffer driver through drm_fb_helper. So I couldn’t unload the DRM drivers directly.

With google’s help I was able to find a simple solution to this problem.
1) Stop Xserver
2) unbind the console
3) rmmod DRM drivers
4) insert new DRM drivers
5) start the X server again.

Here is the script that does what I have described above,

stop lightdm

echo 0 > /sys/class/vtconsole/vtcon1/bind
rmmod nouveau
rmmod ttm
rmmod drm_kms_helper
rmmod drm

modprobe nouveau
modprobe ttm
modprobe drm_kms_helper
modprobe drm

start lightdm

Note: I am using nVidia graphics card. Please change the script according to the graphics card you are using. Also change lightdm to the login screen you are using.

Thanks to http://askubuntu.com/questions/16998/switch-between-nvidia-current-and-nouveau-without-a-reboot!


About Ravi Teja G

I am a linux aspirant from India looking forward to a happy and bright future.
This entry was posted in console, DRM, fbcon, X and tagged , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s