Can't enable DRI3 in Chuwi Laptop

Kernels & Hardware, configuring network, installing services

Can't enable DRI3 in Chuwi Laptop

Postby kendew » 2018-04-24 20:59

Hi
I've successfully installed Stretch on a Chuwi 12.3 Lapbook I found on sale. In general, I'm very pleased as I anticipated way more problems. In fact, everything seems "out of the box" --- smooth except for the display. The laptop's display is HiDPI, what Apple calls retina. First time for me on Linux and Linux seems to have "iffy" support so for for HiDPI, and I may ask for help concerning this in a separate post. I installed the pantheon DE as this seems to handle HiDPI best.
For this post, my problem concerns tearing in web browsers. What I've done so far to try to correct this is install the firmware-misc-nonfree package which has the broxton driver needed by this Apollo Lake N3450 processor, and I've tried to enable the intel graphics driver and DPI3 with the following configuration file I named 20-intel.conf:

Code: Select all
Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "AccelMethod" "sna"
    Option "DRI"         "true"
    Option "TearFree"    "true"
    Option "DRI"         "3"
EndSection


However, in spite of this, both /var/log/Xorg.0.log and xdpyinfo both report DRI3 is not in use as below:

Relevant parts of Xorg.0.log:

Code: Select all
[    11.470] (II) intel: Driver for Intel(R) HD Graphics
[    11.470] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[    11.470] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[    11.498] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20171023
[    11.498] (II) intel(0): SNA compiled: xserver-xorg-video-intel 2:2.99.917+git20161206-1 (Timo Aaltonen <tjaalton@debian.org>)
[    11.498] (II) intel(0): SNA compiled for use with valgrind
[    11.500] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 500
[    11.500] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2; using a maximum of 4 threads
[    11.500] (II) intel(0): Creating default Display subsection in Screen section
   "Default Screen Section" for depth/fbbpp 24/32
[    11.500] (==) intel(0): Depth 24, (--) framebuffer bpp 32
[    11.500] (==) intel(0): RGB weight 888
[    11.500] (==) intel(0): Default visual is TrueColor
[    11.500] (**) intel(0): Option "AccelMethod" "sna"
[    11.500] (**) intel(0): Option "DRI" "true"
[    11.500] (**) intel(0): Option "TearFree" "true"
[    11.501] (II) intel(0): Output eDP1 has no monitor section
[    11.502] (**) intel(0): Found backlight control interface intel_backlight (type 'raw') for output eDP1
[    11.502] (II) intel(0): Enabled output eDP1
[    11.502] (II) intel(0): Output DP1 has no monitor section
[    11.502] (II) intel(0): Enabled output DP1
[    11.502] (II) intel(0): Output HDMI1 has no monitor section
[    11.502] (II) intel(0): Enabled output HDMI1
[    11.502] (II) intel(0): Output HDMI2 has no monitor section
[    11.502] (II) intel(0): Enabled output HDMI2
[    11.503] (--) intel(0): Using a maximum size of 256x256 for hardware cursors
[    11.503] (II) intel(0): Output VIRTUAL1 has no monitor section
[    11.503] (II) intel(0): Enabled output VIRTUAL1
[    11.503] (--) intel(0): Output eDP1 using initial mode 2736x1824 on pipe 0
[    11.503] (**) intel(0): TearFree enabled
[    11.504] (==) intel(0): Using gamma correction (1.0, 1.0, 1.0)
[    11.504] (++) intel(0): DPI set to (192, 192)
[    11.504] (II) Loading sub module "dri3"
[    11.504] (II) LoadModule: "dri3"
[    11.504] (II) Module "dri3" already built-in
[    11.504] (II) Loading sub module "dri2"
[    11.504] (II) LoadModule: "dri2"
[    11.504] (II) Module "dri2" already built-in
[    11.504] (II) Loading sub module "present"
[    11.504] (II) LoadModule: "present"
[    11.504] (II) Module "present" already built-in
[    11.504] (==) Depth 24 pixmap format is 32 bpp
[    11.507] (II) intel(0): SNA initialized with Broxton (gen9) backend
[    11.507] (==) intel(0): Backing store enabled
[    11.507] (==) intel(0): Silken mouse enabled
[    11.508] (II) intel(0): HW Cursor enabled
[    11.508] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[    11.509] (==) intel(0): DPMS enabled
[    11.509] (==) intel(0): Display hotplug detection enabled
[    11.509] (II) intel(0): [DRI2] Setup complete
[    11.509] (II) intel(0): [DRI2]   DRI driver: i965
[    11.509] (II) intel(0): [DRI2]   VDPAU driver: va_gl
[    11.509] (II) intel(0): direct rendering: DRI2 enabled


And:
Code: Select all
xdpyinfo | grep DRI
    DRI2


...and the tearing remains. I had similar problems with a NUC6CAYH which I posted here and was able to solve the issue nicely, but even with this experience, I'm still stumped.

I'm open to suggestions on how to get DRI3 enabled, and any suggestions how to eliminate this tearing.
Appreciated
Kendew
kendew
 
Posts: 37
Joined: 2014-10-12 19:59

Re: Can't enable DRI3 in Chuwi Laptop

Postby kendew » 2018-04-26 21:58

No replies??? Guess this must be a difficult one? Some new information here:

Code: Select all
$ LIBGL_DEBUG=verbose glxinfo | grep libgl
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/i965_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
libGL: Can't open configuration file /home/kendew/.drirc: No such file or directory.
libGL: Using DRI2 for screen 0
libGL: Can't open configuration file /home/kendew/.drirc: No such file or directory.
    GLX_EXT_import_context, GLX_EXT_libglvnd, GLX_EXT_texture_from_pixmap,
libGL: Can't open configuration file /home/kendew/.drirc: No such file or directory.
libGL: Can't open configuration file /home/kendew/.drirc: No such file or directory.


Wonder if I'm missing something?
Thanks
Kendew
kendew
 
Posts: 37
Joined: 2014-10-12 19:59

Re: Can't enable DRI3 in Chuwi Laptop

Postby bw123 » 2018-04-26 22:10

The intel driver should enable dri3 if it's compatible, also sna is the default, no need to specify it? I don't know about the specific card, but most newer intel graphics are encouraged to try the modesetting driver with glamor.

Why did you list "DRI" twice as "true" and "3" isn't that two different setups? You also mentioned broxton driver from the firmware installation, so does the firmware get loaded or not?

p.s. the .drirc you can get from pkg driconf, not sure how relevant it is, but it has helped me in the past.
User avatar
bw123
 
Posts: 3392
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Can't enable DRI3 in Chuwi Laptop

Postby stevepusser » 2018-04-27 00:06

Yes, we added the shortened 20-intel.conf file addition as an option in the MX Linux tweak tool, without the dri and sna options. Using the "intel" driver seems to be the only way to get rid of the tearing when scrolling for some browsers/Intel GPU combinations, like my Skylake 520.. We just couldn't get rid of it with the modesetting driver, and it can be annoying.

My guess is that it's just some quirk with that particular GPU in the Chuwi. Maybe it doesn't support the Tearfree feature.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Kdenlive 18.08.1, Pale Moon 28.1.0, wine-staging 3.17, qBittorrent 4.1.3, Liquorix kernel 4.18-13, Audacity 2.3.0
User avatar
stevepusser
 
Posts: 9998
Joined: 2009-10-06 05:53

Re: Can't enable DRI3 in Chuwi Laptop

Postby kendew » 2018-04-27 01:39

Thanks for replies. I was beginning to think this topic was of no interest. In fact, if I could get tearing solved this lapbook would be pretty flawless relative to the price -- for anyone on a budget who needs a better than budget laptop.
@bw120, thanks for suggestion. I did install driconf. Now I get

Code: Select all
LIBGL_DEBUG=verbose glxinfo | grep libgl
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/i965_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
libGL: Using DRI2 for screen 0
    GLX_EXT_import_context, GLX_EXT_libglvnd, GLX_EXT_texture_from_pixmap,


without the error messages.

@stevepusser The Chuwi cpu is of a recent Apollo Lake variety. Not sure why it wouldn't support DPI3. Here is cpu and graphic card info:

Code: Select all
LIBGL_DEBUG=verbose glxinfo | grep libgl
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/i965_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
libGL: Using DRI2 for screen 0
    GLX_EXT_import_context, GLX_EXT_libglvnd, GLX_EXT_texture_from_pixmap,


Code: Select all
inxi -G
Graphics:  Card: Intel Device 5a85
           Display Server: X.Org 1.19.2 driver: intel Resolution: 2736x1824@60.01hz
           GLX Renderer: Mesa DRI Intel HD Graphics 500 (Broxton 2x6) GLX Version: 3.0 Mesa 13.0.6


I haven't seen an MX Linux tweak tool in the Stretch repository, but driconf offers many possibilities. I'd very much like to hear suggestions on which of these possibilities would be worth trying out, and also suggestions how to better write a 20-intel.conf.

Thanks
Kendew
kendew
 
Posts: 37
Joined: 2014-10-12 19:59

Re: Can't enable DRI3 in Chuwi Laptop

Postby stevepusser » 2018-04-27 02:08

MX Tweak is a custom application for the Debian-based MX-Linux. Many of its settings depend on xfce or specific settings or themes used by MX, but the intel setting should be pretty universal. We tend to cater to those that like everything in a GUI...
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Kdenlive 18.08.1, Pale Moon 28.1.0, wine-staging 3.17, qBittorrent 4.1.3, Liquorix kernel 4.18-13, Audacity 2.3.0
User avatar
stevepusser
 
Posts: 9998
Joined: 2009-10-06 05:53

Re: Can't enable DRI3 in Chuwi Laptop

Postby kendew » 2018-04-27 20:28

Thank you stevepussar. Am I right in guessing you are a maintainer of the MX repository? In any cases, I added the MX 17 repo following the link in your signature. It has several upgrades that may be useful in troubleshooting this problem I am having such as firmware and intel microcode upgrades. I'm yet to explore the whole repository but apt update informed me that 55 packages I have installed are now upgradable.
What I would like to ask you is how stable do you consider these packages? I have Debian Stretch installed for stability but, since it's my personal computer I am talking about, I also use deb-multimedia and backports. I want a solid system but don't need the stability of a server thousands of people are depending on.
What I want to know is it going to be a problem just keeping on upgrading all packages, or should I assign a pin priority to Stretch and MX and only install from MX as needed? Most of the upgrades concerned libreoffice which I hardly ever use. (Thunderbird, on the other hand, could be useful to upgrade to allow me to install addons not compatible with Stretches quite old version).
If pin priority, how should I label it? Pin: release o=mxrepo ,a=stable ?
Thanks
kendew
 
Posts: 37
Joined: 2014-10-12 19:59

Re: Can't enable DRI3 in Chuwi Laptop

Postby stevepusser » 2018-04-27 20:41

As far as I know, our backports are more likely to be "stable" than even those of stretch-backports, since we actually test them all before sending them up to the repo. Stretch-backports maintainers have failed to do that several times, leading to some embarrassing situations.

That said, I would take it easy and only upgrade what you really are interested in, and one at a time at that, just to be safe. Some packages will pull in a lot of others, though.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Kdenlive 18.08.1, Pale Moon 28.1.0, wine-staging 3.17, qBittorrent 4.1.3, Liquorix kernel 4.18-13, Audacity 2.3.0
User avatar
stevepusser
 
Posts: 9998
Joined: 2009-10-06 05:53

Re: Can't enable DRI3 in Chuwi Laptop

Postby kendew » 2018-04-29 01:11

Well, I decided to just eliminate the 20-intel.conf file (mentioned above) and see how things went with the modesetting driver.

Code: Select all
$ inxi -G
Graphics:  Card: Intel Device 5a85
           Display Server: X.Org 1.19.2 drivers: modesetting (unloaded: fbdev,vesa)
           Resolution: 2736x1824@60.01hz
           GLX Renderer: Mesa DRI Intel HD Graphics 500 (Broxton 2x6) GLX Version: 3.0 Mesa 13.0.6


Modesetting is reported now whereas before it was i915. I'm not sure a decent intel driver was even loaded as I couldn't enable DRI3. Now at least DRI3 seems active:

Code: Select all
xdpyinfo | grep DRI
    DRI2
    DRI3


Code: Select all
LIBGL_DEBUG=verbose glxinfo | grep libgl
libGL: pci id for fd 4: 8086:5a85, driver i965
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/i965_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
libGL: Using DRI3 for screen 0
    GLX_EXT_import_context, GLX_EXT_libglvnd, GLX_EXT_texture_from_pixmap,


Scrolling in a browser window is far from as smooth as I would like it to be, but the kind of tearing I was experiencing that I found unacceptable seems gone. I think what I want to try now is tweaking and fine-tuning to see if I can get smoother scrolling. Any suggestions on how to do this or what to try doing are more than welcome.
I did try installing the MX Tweak tool to see if anything there could help, but apt didn't allow me to install it, complaining about breaking packages. Apt wanted to install a bunch of qt5 dependencies so perhaps they were going to conflict with some other packages already in use on my system??
kendew
 
Posts: 37
Joined: 2014-10-12 19:59


Return to System configuration

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable