Xorg FreeBSD – Using Native 1366 x 768 Resolution in Lenovo Ideapad

freebsdxorg

I have a Lenovo Ideapad 100S 14'' IBR-14'' Intel Celeron CPU N3060 @ 1.60GHz, 32GB SSD, 4GB RAM, based in the Broadwell chipset, running FreeBSD 12.0.

I have been trying to configure xorg to use the native upper resolution of 1366×768 without success.

I installed two display drivers:

sudo pkg install xf86-video-intel xf86-video-scfb

The Intel i950 display driver is giving an error and aborting with several combinations of configurations, that I have got using xrandr.

The scfb/syscons display driver is only working in 640×480, and ignoring any directives about size; was not able also to use the vesa display driver without much success (vesa deprecated, or the wrong combination with vt drivers, did not bother to check).

(I tried to configure in the Device section of the x.org config file both the "intel" and the "scfb" driver).

As in /usr/local/etc/X11/xorg.conf.d/xorg.conf

Section "Device"
    Driver      "scfb"
    #Driver      "intel"
EndSection

The Intel errors are very similar to this thread – Installing Debian on Kaby Lake machine: difficulties with X.org actually.

What to do?

Output of xandr xrandr

Best Answer

Ironically, in FreeBSD the answer is pretty much similar to the thread pointed in the question.

You also need to remove (paradoxically) the X.org Intel video driver the X server can use the kernel’s mode-setting features without a separate video driver

Whilst it is referring to Linux, the same seems to be happening with FreeBSD.

So what it was done:

sudo pkg delete xf86-video-intel

Also in /boot/loader.rc.local:

mode 2

See Determining EFI text modes supported by notebook

(In the Lenovo is the EFI text mode for the higher resolution, 170 cols x 40 rows - 1366x768 )

The actual /usr/local/etc/X11/xorg.conf.d/xorg.conf being used is, where the "scfb" display driver is configured:

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
    ModulePath   "/usr/local/lib/xorg/modules"
    FontPath     "/usr/local/share/fonts/misc/"
    FontPath     "/usr/local/share/fonts/TTF/"
    FontPath     "/usr/local/share/fonts/OTF/"
    FontPath     "/usr/local/share/fonts/Type1/"
    FontPath     "/usr/local/share/fonts/100dpi/"
    FontPath     "/usr/local/share/fonts/75dpi/"
EndSection

Section "Module"
    Load  "glx"
EndSection

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "kbd"
EndSection

Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
    Option      "Protocol" "auto"
    Option      "Device" "/dev/sysmouse"
    Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
    Identifier   "Monitor0"
    VendorName   "Monitor Vendor"
    ModelName    "Monitor Model"
EndSection

Section "Device"
    Identifier  "Card0"
    Driver      "scfb"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    SubSection "Display"
        Viewport   0 0
        Depth     1
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     4
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     8
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     15
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection

After these changes, and rebooting, xorg started in the 1366x768 resolution.

From the FreeBSD wiki

If an accelerated graphics driver is not available for your FreeBSD system, an alternative is to use the scfb driver. At the time of writing, this is a common option for laptops with Broadwell or Skylake chipsets from Intel with integrated graphics, until the intel DRM driver is updated to include support. Whilst the scfb driver does not provide accelerated graphics, and is missing some features like brightness adjustment and support for external displays, it works fine on built-in laptop displays for simple desktop use and even playing videos.

The system must be using the new vt(4) (aka Newcons) console for the scfb driver to work. This is the default if the system was booted with UEFI, but not if it was booted using (legacy) BIOS mode. Some laptops must be booted using UEFI mode for the scfb driver to work.

Disclaimer: this is the easiest solution. Apparently there patches out there for making the Intel driver work, however it involves compiling source code.

Related Question