From owner-freebsd-x11@freebsd.org Wed Dec 30 11:40:32 2015 Return-Path: Delivered-To: freebsd-x11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 835F9A56F46 for ; Wed, 30 Dec 2015 11:40:32 +0000 (UTC) (envelope-from greg@unrelenting.technology) Received: from unrelenting.technology (unrelenting.technology [188.166.82.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "unrelenting.technology", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1D401160 for ; Wed, 30 Dec 2015 11:40:31 +0000 (UTC) (envelope-from greg@unrelenting.technology) Received: from unrelenting.technology (localhost [127.0.0.1]) by unrelenting.technology (OpenSMTPD) with ESMTP id 9aca003b for ; Wed, 30 Dec 2015 11:33:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= unrelenting.technology; h=user-agent:content-disposition :content-type:content-type:mime-version:message-id:subject :subject:from:from:date:date:received:received:received; s=main; t=1451475224; bh=qjkKHAjtbYb02C8FkimgERSBmA42vRxq9eUnWHr531Y=; b= Ql4HLWwlEvvVr1jyA7fCintfIX/EDBHxg9LLAARx8cVmXXKS+buFZPtM5Ii3WEdu EjWmJN+CkfmM+7tTgwveZrCRa/Olcpbswmq4mBxCXBIbWnPrR2StIPuQabuzUQgo B5zziRALLVoQknMQYmmU+bO1GIhkJAqPk2wW251nWJQ= Received: from unrelenting.technology ([127.0.0.1]) by unrelenting.technology (unrelenting.technology [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id cyhYmARd8ldU for ; Wed, 30 Dec 2015 11:33:44 +0000 (UTC) Received: by unrelenting.technology (OpenSMTPD) with ESMTPSA id dbcb7739 TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256 verify=NO for ; Wed, 30 Dec 2015 11:33:44 +0000 (UTC) Received: from localhost (markarth.local [local]) by markarth.local (OpenSMTPD) with ESMTPA id 36855e6e for ; Wed, 30 Dec 2015 14:33:40 +0300 (MSK) Date: Wed, 30 Dec 2015 14:33:40 +0300 From: Greg To: freebsd-x11@freebsd.org Subject: Testing i915 update on Haswell (ThinkPad X240) Message-ID: <20151230113340.GA91889@unrelenting.technology> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline OpenPGP: url=https://unrelenting.technology/pub/3B011BAF.asc User-Agent: the one that sucks less X-Hashcash: 1:20:151230:freebsd-x11@freebsd.org::ijwB2lhPfiLU54pF:3aui X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2015 11:40:32 -0000 Hello! So I bought a Haswell ThinkPad, specifically to run FreeBSD. Here's my report on Haswell graphics. When I load `i915kms` (via kldload or kld_list in rc.conf, loading it from the EFI loader == unbootable), it repeats this error for less than a second: error: [drm:pid51453:intel_sbi_read] *ERROR* timeout waiting for SBI to complete read transaction error: [drm:pid51453:intel_sbi_write] *ERROR* timeout waiting for SBI to complete write transaction Then it shows this and works fine: info: [drm] GMBUS [i915 gmbus vga] timed out, falling back to bit banging on pin 2 info: [drm] GMBUS [i915 gmbus dpb] timed out, falling back to bit banging on pin 5 Occasionally, the GPU is hung after boot. Power consumption is high in the console, and startx results in a black screen with working mouse, but nothing else. Switching back to vt, pressing Ctrl-C, and running startx again fixes the problem and everything works fine. (dmesg reports "GPU hung" after killing the first Xorg.) My Xorg.conf section for the GPU: Section "Device" Option "AccelMethod" "sna" Option "TripleBuffer" "true" Option "HotPlug" "true" Option "TearFree" "false" Identifier "Card0" Driver "intel" BusID "PCI:0:2:0" EndSection UXA acceleration results in text corruption on screen and application crashes, IIRC it's an old method & shouldn't be used with Haswell. SNA acceleration works great -- WITHOUT the TearFree option! The TearFree option immediately crashes Xorg. To make it tear-free, I use compton: compton --backend xr_glx_hybrid --vsync opengl-swc Compton's "glx" backend crashes Xorg (or hangs... I don't remember exactly). Compton's "drm" vsync method (and probably other fancy options like glx-no-stencil and paint-on-overlay) makes the whole system hang often. But with "xr_glx_hybrid" and "opengl-swc", everything is stable! Brightness adjustment works via both graphics/intel-backlight and acpi_video (sysctl hw.acpi.video.lcd0.brightness). Brightness Fn keys don't work though. The raise brightness (F6) key does nothing, the lower brightness (F5) key resets brightness to maximum, and shows this in dmesg when drm.debug is on: [drm:KMS:pid12:intel_panel_get_max_backlight] max backlight PWM = 852 [drm:KMS:pid12:intel_panel_actually_set_backlight] set backlight PWM = 841 [drm:pid12:intel_opregion_gse_intr] PWM freq is not supported 3D performance is fine (well, for a mobile GPU), e.g. this WebGL demo https://www.shadertoy.com/view/Ms2SD1 in Firefox is ~40 FPS (in the small window, of course, fullscreen is slower). HDMI output works with a Mini DisplayPort adapter. 1080p video playback on an HDMI TV using `mpv` is smooth. VAAPI video output and hardware accelerated decoding works. With mpv --vo=vaapi --hwdec=vaapi, CPU usage is around 20% for a 1080p H.264 video (vs. 60% with software decoding), the fans stay silent. OpenCL doesn't work. clinfo shows that it does nothing instead of running the computation: > Beignet: self-test failed: (3, 7, 5) + (5, 7, 3) returned (3, 7, 5) Here's my dmesg (and sysctl hw.dri.0.info after GPU hung): https://gist.github.com/myfreeweb/262b20777ccfdb8d5168 Also, I couldn't get suspend/resume to work on the X240. With the UEFI firmware the laptop came with, suspend worked, but it didn't resume (didn't react to the power button at all). After a firmware update, suspending causes a kernel panic. Thanks for your work, graphics team! I'm glad I don't have to use the penguin operating system :-) ~ greg