Blog-like stuff that isn’t in a blog: “celeron55 says”

April 23rd, 2014 by celeron55

This topic on the forum is likely to be in your interests: https://forum.minetest.net/viewtopic.php?f=7&t=9147

I will edit this post to contain a link to the roadmap once I finish an initial version of it.

Trinity-amarok is awesome!

April 14th, 2014 by celeron55

I only now found out about the TDE project and that it is maintaining the 1.4 series of Amarok, and packaging it for everything.

It’s fucking glorious. I love you. The Yauap backend plays even the audio from Matroska video files. It doesn’t start randomly consuming 100% CPU like Clementine does. Even the “Suggested Songs” dynamic playlist works which is the absolute peak of modern music player development. Nothing has that today. Except this.

KDE4 forgot almost everything that was good about KDE3.5. These people didn’t.

Trinity-Amarok 1.4.10

Trinity-Amarok 1.4.10

Linux (Fedora 20) on Dell Precision M6800

December 23rd, 2013 by celeron55

This post describes the issues and some solutions for using Linux on a Dell Precision M6800, the one described in the previous post. This probably largely applies to Precision M4800 too.

TL;DR: Don’t buy it for now if you’re not ready to tweak stuff. Otherwise you may consider. Personally I am quite happy and expect some things to improve in the future.

This exact model has an i7-4800MQ, 16GB of RAM, Nvidia Quadro K3100M and a 512GB SSD.

I have updated the bios to version A05, which was published just a few days ago. It seems likely that Dell will publish further updates too, as the hardware is relatively new.

I’m using Fedora 20. It boots up fine and installs fine, no surprises there. Altough it’s kind of a mess to try to figure out how to layout the two disk drives. I recommend using only the SSD and leaving the HDD for backups or alternate OSes or something. It also booted up with some recent version of Ubuntu, but it had an old kernel so I decided to try something else.

WLAN

This model comes with a Dell Wireless 1550 WiFi+Bluetooth card. It basically doesn’t work on Linux, as it uses the BCM4352 chip; neither with Broadcom’s proprietary driver (it works a bit and then doesn’t), nor any open source drivers (they don’t even try). I inserted a BCM4311 card that I already have in one of the extra slots (the WWAN slot; an ancient Intel card didn’t work in it) and it works with Linux 3.12′s built-in b43 driver… mostly. It has some problems too (dies under heavy load until reboot) but those probably aren’t related to the M6800.

(The proprietary driver claims to support BCM4311 too, but causes some kind of an error in the kernel’s built-in 80211 stuff requiring a reboot… go figure. If someone is interested, I can provide logs.)

The Nvidia Quadro K3100M

When I started writing this post, I didn’t have this working the way I wanted to. However, I decided to retry still once more and now got it working.

So, I now have an apparently working bumblebee + nvidia configuration on a Dell Precision M6800. It’s mostly set up like this; the non-nouveau way: https://fedoraproject.org/wiki/Bumblebee. I manually ran /usr/sbin/bumblebee-nvidia on the command line without Xorg being running. Maybe that affects something, maybe not. Also it needed some library paths to be set up. Maybe.

Also make sure to not have nouveau installed at all; many drivers include their own blacklists and whatever directives in random places and ultimately nothing will work if more than one is installed. I have also heard that nouveau won’t work on a K3100M at all, or at least not with bumblebee.

It looks like the GPU will throttle down heavily when running on battery; leading to a difference of running smoothly at 60fps vs. running clearly not smoothly at maybe 15fps. That’s in Kerbal Space Program that I’m testing this with.

If you fail to install working bbswitch, you get constant 30W idle power consumption, which will lead to fans spinning constantly and battery life being limited to 3 hours.

ACPI

I have put manually into use the kernel parameter acpi_backlight=vendor, which changes the exact namings and details in /sys/class/backlight, and added the following into /etc/X11/xorg.conf.d/10-device.conf:

Section "Device"
	Identifier "Haswell Integrated Graphics"
	Driver "intel"
	Option "Backlight" "intel_backlight"
EndSection

I also experimented with a bunch of custom acpid actions for backlight and volume, and ended up leaving the backlight in there but doing volume control using shortcuts keys in IceWM. Your mileage will vary, and all this is dependent on your desktop environment, display manager and whatever. Most of them try to do much of this by themselves, to various degree of success.

Sound (ALSA)

I added some quite agressive power saving set-up scripts, and it turned out you shouldn’t set up any power-saving for the snd_hda_intel module, as it will disconnect the signal from the headphone jack when being automatically shut down. If it’s connected to a badly grounded audio amplifier and speakers, mains electricity noise and popping noise will be heard. Talk about random issues. 8)

Touchpad

By default the touchpad doesn’t allow clicking or dragging by tapping (either due to itself or due to changes in Xorg). I’m not sure if I like that; I’ll have to experiment. It’s configurable with various tools and Xorg’s configuration though.

Stability?

…Aand there it goes. I was running Kerbal Space Program on an another workspace with optirun while writing this, and suddenly X went completely black (only mouse was visible and moveable) and I had to kill it in a virtual console. So there clearly is some unstability here – dunno if it would have worked better if I hadn’t been switching workspaces, or if SELinux wouldn’t have prevented Xorg from doing something, or… yeah. I’ll amend this when I get to know the stability of things better. I have played a lighter game (not Minetest!) using integrated graphics for many hours already though, and I’ve experienced zero crashes with that. So clearly something does work.

Power Consumption

If everything is correctly configured, the laptop will take about 17W at idle from the battery at a low-ish screen birghtness, and about 44W when running Minetest with integrated graphics, and about 58W when running Minetest using discrete graphics. The performance difference between those when the AC adapter is removed is very small though, and I can’t measure how much the K3100M takes when running on external power. Still, the fans don’t come out that loud with such load. You can compare those numbers to the 99Wh capacity of the battery.

I need to figure out if it’s possible to let the K3100M run faster from the battery. If I run something using optirun, it’s not like I want to save battery in the first place. I can just use the integrated GPU in that case, saving a lot of power.

The HDD

My M6800 came with a 750GB hard disk drive. It’s fairly useless as I can fit everything I need on the 512GB SSD, but the drive is quite loud and doesn’t spin down automatically. Put this into /etc/systemd/system/boot_setup_hdd.service and run systemctl start boot_setup_hdd && systemctl enable boot_setup_hdd:

[Unit]
Description=Setup HDD powersave (By c55)

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/hdparm -B 1 -S 5 -y /dev/sda

[Install]
WantedBy=multi-user.target

This will make the HDD spin down immediately when it is run, and if the HDD is accessed, 25 seconds after not being used anymore.

kernel

Linux localhost.localdomain 3.12.5-302.fc20.x86_64 #1 SMP Tue Dec 17 20:42:32 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

lspci (including my BCM4311 that didn’t come with the M6800):

lspci -nnk
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller [8086:0c04] (rev 06)
	Subsystem: Dell Device [1028:05cd]
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01] (rev 06)
	Kernel driver in use: pcieport
00:02.0 VGA compatible controller [0300]: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller [8086:0416] (rev 06)
	Subsystem: Dell Device [1028:05cd]
	Kernel driver in use: i915
00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
	Subsystem: Dell Device [1028:05cd]
	Kernel driver in use: snd_hda_intel
00:14.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI [8086:8c31] (rev 04)
	Subsystem: Dell Device [1028:05cd]
	Kernel driver in use: xhci_hcd
00:16.0 Communication controller [0780]: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 [8086:8c3a] (rev 04)
	Subsystem: Dell Device [1028:05cd]
	Kernel driver in use: mei_me
00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection I217-LM [8086:153a] (rev 04)
	Subsystem: Dell Device [1028:05cd]
	Kernel driver in use: e1000e
00:1a.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 [8086:8c2d] (rev 04)
	Subsystem: Dell Device [1028:05cd]
	Kernel driver in use: ehci-pci
00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 04)
	Subsystem: Dell Device [1028:05cd]
	Kernel driver in use: snd_hda_intel
00:1c.0 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 [8086:8c10] (rev d4)
	Kernel driver in use: pcieport
00:1c.3 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 [8086:8c16] (rev d4)
	Kernel driver in use: pcieport
00:1c.4 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 [8086:8c18] (rev d4)
	Kernel driver in use: pcieport
00:1c.6 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #7 [8086:8c1c] (rev d4)
	Kernel driver in use: pcieport
00:1c.7 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #8 [8086:8c1e] (rev d4)
	Kernel driver in use: pcieport
00:1d.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 [8086:8c26] (rev 04)
	Subsystem: Dell Device [1028:05cd]
	Kernel driver in use: ehci-pci
00:1f.0 ISA bridge [0601]: Intel Corporation QM87 Express LPC Controller [8086:8c4f] (rev 04)
	Subsystem: Dell Device [1028:05cd]
	Kernel driver in use: lpc_ich
00:1f.2 SATA controller [0106]: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] [8086:8c03] (rev 04)
	Subsystem: Dell Device [1028:05cd]
	Kernel driver in use: ahci
00:1f.3 SMBus [0c05]: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller [8086:8c22] (rev 04)
	Subsystem: Dell Device [1028:05cd]
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK104GLM [Quadro K3100M] [10de:11b6] (rev ff)
07:00.0 Network controller [0280]: Broadcom Corporation BCM4311 802.11a/b/g [14e4:4312] (rev 01)
	Subsystem: Hewlett-Packard Company Broadcom 802.11a/b/g WLAN [103c:1361]
	Kernel driver in use: b43-pci-bridge
10:00.0 SD Host controller [0805]: O2 Micro, Inc. Device [1217:8520] (rev 01)
	Subsystem: Dell Device [1028:05cd]

lsusb:

Bus 002 Device 003: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0c45:64d0 Microdia 
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lsmod:

Module                  Size  Used by
cpufreq_stats          13469  0 
fuse                   82701  3 
nf_conntrack_netbios_ns    12665  0 
nf_conntrack_broadcast    12527  1 nf_conntrack_netbios_ns
ipt_MASQUERADE         12880  1 
ip6t_REJECT            12939  2 
bnep                   19704  2 
xt_conntrack           12760  42 
bluetooth             366020  5 bnep
ebtable_nat            12807  0 
ebtable_broute         12731  0 
bridge                110618  1 ebtable_broute
stp                    12868  1 bridge
llc                    14045  2 stp,bridge
ebtable_filter         12827  0 
ebtables               30758  3 ebtable_broute,ebtable_nat,ebtable_filter
ip6table_nat           13015  1 
nf_conntrack_ipv6      18738  24 
nf_defrag_ipv6         34595  1 nf_conntrack_ipv6
nf_nat_ipv6            13213  1 ip6table_nat
ip6table_mangle        12700  1 
ip6table_security      12710  1 
ip6table_raw           12683  1 
ip6table_filter        12815  1 
ip6_tables             26808  5 ip6table_filter,ip6table_mangle,ip6table_security,ip6table_nat,ip6table_raw
iptable_nat            13011  1 
nf_conntrack_ipv4      14808  20 
nf_defrag_ipv4         12702  1 nf_conntrack_ipv4
nf_nat_ipv4            13199  1 iptable_nat
nf_nat                 20712  5 ipt_MASQUERADE,nf_nat_ipv4,nf_nat_ipv6,ip6table_nat,iptable_nat
nf_conntrack           91283  11 nf_conntrack_netbios_ns,ipt_MASQUERADE,nf_nat,nf_nat_ipv4,nf_nat_ipv6,xt_conntrack,ip6table_nat,nf_conntrack_broadcast,iptable_nat,nf_conntrack_ipv4,nf_conntrack_ipv6
iptable_mangle         12695  1 
iptable_security       12705  1 
iptable_raw            12678  1 
bbswitch               13943  0 
snd_hda_codec_realtek    56591  1 
snd_hda_codec_hdmi     41070  1 
vfat                   17411  1 
fat                    60886  1 vfat
arc4                   12608  2 
b43                   387900  0 
bcma                   45511  1 b43
mac80211              579060  1 b43
cfg80211              478020  2 b43,mac80211
iTCO_wdt               13480  0 
ppdev                  17635  0 
iTCO_vendor_support    13419  1 iTCO_wdt
x86_pkg_temp_thermal    14162  0 
coretemp               13435  0 
dell_wmi               12681  0 
sparse_keymap          13584  1 dell_wmi
kvm_intel             142832  0 
kvm                   430555  1 kvm_intel
crct10dif_pclmul       14289  0 
crc32_pclmul           13113  0 
crc32c_intel           22079  0 
dell_laptop            18168  0 
ghash_clmulni_intel    13259  0 
rfkill                 21979  5 cfg80211,bluetooth,dell_laptop
uvcvideo               80968  0 
snd_hda_intel          48171  7 
dcdbas                 14885  1 dell_laptop
videobuf2_vmalloc      13163  1 uvcvideo
snd_hda_codec         179279  3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
videobuf2_memops       13161  1 videobuf2_vmalloc
videobuf2_core         38899  1 uvcvideo
snd_hwdep              13554  1 snd_hda_codec
videodev              132922  2 uvcvideo,videobuf2_core
snd_seq                60752  0 
joydev                 17332  0 
microcode              44087  0 
i2c_i801               18135  0 
snd_seq_device         14136  1 snd_seq
nouveau               952573  0 
media                  20840  2 uvcvideo,videodev
serio_raw              13413  0 
snd_pcm                98141  3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
sdhci_pci              18927  0 
e1000e                254311  0 
sdhci                  38255  1 sdhci_pci
snd_page_alloc         18268  2 snd_pcm,snd_hda_intel
mxm_wmi                12865  1 nouveau
ssb                    65906  1 b43
ttm                    79787  1 nouveau
snd_timer              28698  2 snd_pcm,snd_seq
mmc_core              116378  3 b43,ssb,sdhci
mei_me                 18421  0 
ptp                    18725  1 e1000e
snd                    75313  23 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_hda_codec,snd_hda_intel,snd_seq_device
lpc_ich                21080  0 
mei                    76906  1 mei_me
shpchp                 37032  0 
soundcore              14491  1 snd
pps_core               19130  1 ptp
mfd_core               13182  1 lpc_ich
parport_pc             28048  0 
parport                40425  2 ppdev,parport_pc
i915                  701832  12 
i2c_algo_bit           13257  2 i915,nouveau
drm_kms_helper         50287  2 i915,nouveau
drm                   283349  5 ttm,i915,drm_kms_helper,nouveau
i2c_core               38302  7 drm,i915,i2c_i801,drm_kms_helper,i2c_algo_bit,nouveau,videodev
wmi                    18804  3 dell_wmi,mxm_wmi,nouveau
video                  19104  2 i915,nouveau

What did I end up with? Dell Precision M6800.

December 23rd, 2013 by celeron55

Continued from the previous post.

After looking through all the options, I bought a Dell Precision M6800.

This exact model has an i7-4800MQ, 16GB of RAM, Nvidia Quadro K3100M and a 512GB SSD.

Based on reviews, this has almost all the things I care about – so let’s go through the list I introduced previously (green texts are what I mentioned about the Toughbook CF-51):

  • This thing is stable enough. It runs Linux for months straight without major crashes. Everything works. You simply don’t get that with most hardware.

As far as I can tell after a few day’s use, this is mostly covered. More on that later in this post.

  • It’s got a 15-inch 4:3 display, which is tall enough to be comfortable to actually use, unlike the 16:9 abominations of today.

The display in these 17.3″ things is equally tall as in the one in 15″ 4:3 laptops.

  • Due to the form factor, the screen is further away from the keyboard than in today’s models, making the eyes and the back not hurt when looking at it. There is enough space for your hands to comfortably lay on in front of the keyboard.

The side profile for that part is almost identical to the CF-51. There is a slight issue though – the front edge of the keyboard is somewhat too sharp and messes up with your wrists. I need to stop being in certain positions that I used to, or maybe use something to raise the backside of the laptop up a bit.

  • The keyboard has this superior layout where the home, pageup/down and end keys are at the rightmost edge. The keyboard also feels great and the arrow keys are properly arranged.

You can’t get those for any 17 inch models these days. This has a numpad, which is useless and moves the keyboard to a suboptimal position, and the home/end keys aren’t very conveniently positioned. The feel is good though and the arrow keys are proper.

  • It’s shell around the keyboard is made of plastic, making it not heat up your hands, and outside is cast magnesium – shattering floors and other inferior objects on which you drop it.

As far as I can tell, this is largely constructed of multiple layers of some kind of rather heavily cast plastic. It’s probably less sturdy than the CF-51, but it’s hard to tell how much. It does feel very solid.

  • The touchpad’s surface doesn’t stick to your finger, it’s precise and by default requires much less finger movement than today’s large ones; its size makes it hard to accidentally touch and it’s dedicated buttons have the exact right pressure requirement.

The touchpad is good or very good, but suboptimally positioned due to the numpad. Fuck numpads. My initial impression is that it’s better than the CF-51′s.

  • The quality of the speakers in this thing is unheard of these days. You can actually listen to music using them without having to cringe to the sound quality at all. It sounds bright and clear. The frequency range is as wide as you can ever hope. The speakers are large enough to not fit anywhere in a smaller chassis.

The speakers of the M6800 sound a bit different than the CF-51′s. They seem to have a bit more frequency range and have a different kind of middle tone rendition. Definitely good; I can’t really expect more.

  • This thing doesn’t run it’s fans at all when halfway idle. 0 RPM. You can’t fucking beat that. And that is what I require.

Due to the plastic chassis, the M6800 can’t dissipate heat through the case. It deals with the issue by being idle most of the time, and periodically spinning the fans for a while to cool the heat sinks. I don’t have other options than to deal with this, as all modern laptops use the same approach. As a plus side, the laptop doesn’t feel hot from any part.

  • This thing is built to last. Yeah, it weighs 3kg but there’s a reason for it and I’m fine with that. It was also expensive because of that but I’m fine with that too.

Roughly the same idea with the Dell.

  • It has enough performance to be quite usable even today. That’s 6 years from launch in real use.

This is plenty fast today, so I expect it to be plenty fast for years, and then to be fast enough for the years following that.

  • I have two batteries of unknown age for it, still lasting multiple hours each. They are made by Panasonic from the ground up and you can’t beat that.

The battery life of this thing depends heavily on the usage. It seems to be able to idle for like 6 hours, but it drops quickly to lower than 2 hours if you engage the K3100M and give some actual work to the CPU.

  • It has plenty of connectivity: old-school serial, ps/2, VGA, USB 2, FireWire, gigabit ethernet, Wi-Fi, Cardbus and an SD card reader. I won’t need anything more than this for years to come.

A somewhat modernized variant of that list can be found in the M6800.

The CF-51′s display panel has a low DPI and a very low contrast (except if you’re lucky and get a 1600×1200 IPS in which case the screen is better than anything you can find, albeit somewhat dim).

The M6800′s panel is… well, very good. It’s colors are a bit unbalanced and need tuning away from the blue side, but other than that, it performs better than my desktop display, Dell U2412M (which has an eIPS panel). I especially love the deep black. Being just a high-end TN panel, vertical viewing angles aren’t much better than those of a regular TN panel though.

The Feel

Do you know the feel when you use eg. an expensive musical instrument? Or a large milling machine or stuff like that? It just sits there, almost like being glued to the position with some magic, working and waiting for you to give your input using it’s finely made controls. This laptop feels quite like that and I like it.

By the way, I decided to install and use Fedora 20. It has been relatively interesting. This is clearly a mature distro, but has it’s own tricks and surprises when coming from a debian background. As a desktop environment, I use IceWM and no display manager. I tried Gnome, then KDE, then MATE. None worked and they messed up ACPI stuff and the touchpad and whatever. I don’t recommend any of those, and neither GDM nor KDM nor LightDM. Same goes for any distro of course.

Issues!

I will next post about issues. There are many of them and most of them are because of Linux driver support. I will do some additional testing for it, as it is probably applicable to many of Dell’s new high-end models.

2013-12-23: Linux (Fedora 20) on Dell Precision M6800

Data Locality for Game Programmers

December 9th, 2013 by celeron55

I stumbled upon this funny and accurate write-up about CPU cache and data locality: http://gameprogrammingpatterns.com/data-locality.html

I’m sure reading it will make every programmer better in some way. Even if you’re not a programmer, the first part is interesting.