DRM Driver Installation on Raspberry Pi

BeadaPanel Versatile Media Display
Post Reply
esky-sh
Posts: 2137
Joined: Sat Dec 20, 2008 4:21 am

DRM Driver Installation on Raspberry Pi

Post by esky-sh » Wed Jul 31, 2024 4:46 am

In Linux world, DRM driver is becoming more and more popular. And BeadaPanel can support DRM driver as well. Take Raspberry Pi as example. In this procedure, we will install BeadaPanel as a secondary monitor, along with Raspberry Pi's main monitor.
Image


Section 1, Install DRM Driver
Pre-requirements
  • A BeadaPanel Media Display
  • A Raspberry Pi Model 3B+(with Bookworm)
Procedures
  1. Connect Micro-USB cable with Raspberry Pi and BeadaPanel
  2. Login to Raspberry Pi main monitor
  3. Open a term window
  4. Compile the driver

    Code: Select all

    git clone -b rpi-6.6.y https://github.com/JT365/beada # download code
    cd beada/src
    make -C /usr/src/linux-headers-`uname -r`/ M=`pwd` modules # compile
    
  5. Install the driver

    Code: Select all

    sudo cp beadaDRM.ko /lib/modules/`uname -r`/kernel/drivers/gpu/drm/tiny/ # install module
    sudo depmod -a # load at bootup

Section 2, Screen Configuration on LXDE Desktop
Raspberry Pi will automatically discover an USB screen as soon as BeadaPanel plugin. There are steps needed for fine tune of screen appearance.
  1. Fine tune in Screen Configuration
    Image

    Image
    New discovered screen is in inactive state by default, so user should active it at first.

    Image
    Note: Manually click shutdown machine once you made changes into Gnome Screen Configuration, otherwise changes may get lost between power cycles.
  2. Fine tune in Appearance Settings
    Image

    Image

    Image


    Section 3, Set BeadaPanel as Primary Monitor in Xorg Environment
    In order to set BeadaPanel as a primary monitor to the Xorg environment, we will have to set BeadaPanel as a primary GPU device in a Xorg config file.
    Proceduces
    1. Open a term window
    2. Change to Xorg config folder

      Code: Select all

      cd /etc/X11/xorg.config.d/
      
    3. Create a new config file for BeadaPanel

      Code: Select all

      sudo nano 10-beada.conf
      
    4. Type the following text into it:

      Code: Select all

      Section "OutputClass"
        Identifier "beada"
        MatchDriver "beada"
        Driver "modesetting"
        Option "PrimaryGPU" "true"
      EndSection
      
    5. Press Control+x, you will get a prompt at the bottom of the screen asking you to "Save modified buffer (Answering No will DESTROY CHANGES)". Press y as we want to save the changes, and then Enter to Save Changes and exit the nano editor.
    6. Reboot the machine
    Section 4, Adjust backlight of BeadaPanel
    Proceduces
    1. Open a term window
    2. Find current BeadaPanel DRM device

      Code: Select all

      pi@raspberrypi:~ $ ls /sys/class/drm/
      card0  card0-HDMI-A-1  card0-Writeback-1  card1  card1-USB-1  renderD128  version
      
    3. Check current BeadaPanel backlight level

      Code: Select all

      pi@raspberrypi:~ $ cat /sys/class/drm/card1-USB-1/backlight/brightness
      77
      
    4. Modify backlight:

      Code: Select all

      pi@raspberrypi:~ $ echo 99 >  /sys/class/drm/card1-USB-1/backlight/brightness
      pi@raspberrypi:~ $ cat /sys/class/drm/card1-USB-1/backlight/brightness
      99
      

Post Reply

Who is online

Users browsing this forum: No registered users and 51 guests