Szerteszana²

grin agymenései
Taggalés linux

Intel Skylake/i915 video driver vs. linux

2016-06-30 17:29 írta grin

Recently I have obtained a board with a recent intel internal video "card" which is supposedly more powerful than my 6+ years old NVidia. So let's give it a try, shall we?

This is an intel i7, and the graphis is ASUSTeK Computer Inc. HD Graphics 530 or Sky Lake Integrated Graphics (rev 06) or i915 in linux driverspeak. The system is Debian/sid, semi-upgraded.

There are two xorg ways to do it: the "old" way is to use the intel driver and the new is to use the modesetting driver in the kernel. This is a fairly recent kernel (4.4.14), should work out of the box. The mainboard is an Asus B150-PRO with a fancy uEFI BIOS.

As a fallback I leave the old nvidia in the machine, but I won't use it right now.

What could possibly go wrong?


Well, first the i915 wasn't even visible in lspci! It turned out that the BIOS have to be told to share the cards (which probably meant being able to use multiple cards or whatever), so at least the device is visible.

"At least", yeah, since no matter what combination I have chosen for the HDMI and DVI monitors they only worked on the NVidia external card. Another BIOS setting is which force the machine from "Auto" onto the internal card at boot, so at least I see the BIOS and the booting.

Nice little step to see the boot, so I removed the "nomodeset" from the kernel cmdline. The result was a beautiful vertical colorful screen freeze. Immediately after the kernel init'ed the screen.

From there I have slowly progressing, reboot after reboot, by first removing the nvidia specific glx and gl libs (could be theoretically used together by using the switching package but I couldn't bother), changing BIOS not to use S6 sleeping state for the card (it's rumoured to freeze there), plugging both monitors into the internal card, and after that I have got one working monitor using software DRI (direct rendering), which is the working and slow-as-hell 3D version of the semi-working stuff.

The major obstacle was DRI2, since it just didn't work, it was using VMware software renderer:

[  2622.559] (II) glamor: OpenGL accelerated X.org driver based.
[  2622.579] (II) glamor: EGL version 1.4 (DRI2):
[  2622.579] EGL_MESA_drm_image required.
[  2622.579] (EE) modeset(0): glamor initialization failed
If you try to google for "EGL_MESA_drm_image" you get a lot of -- nothing. Don't bother, the problem is that all the related libraries, and their related libraries, and theirs and so on should be upgraded to the latest version. After that the DRI2 worked.

Still: there is no second monitor. xrandr says it's disconnected. No it isn't, but still. I can force it by raping it:

xrandr --output HDMI-2 --mode 1920x1200 --left-of HDMI-1
no, actually that won't work since 1920x1200 modeline isn't there, no edid for disconnected stuff. So I can borrow the smaller monitor's resolution as
xrandr --output HDMI-2 --mode 1280x1024 --left-of HDMI-1
which works in a kind of retro way. Still, it's not good, the monitor is "disconnected" and the system rejects to handle it.

The solution was kernel cmdline hacking:

video=HDMI-A-2:e video=HDMI-A-1:e
which is enabling the device forcefully. HorribleHack™. Works, as from then on both monitors is detected by the system at boot and we have nicely mirrored console, then detected by modesetting driver then, finally, used by xorg. From then on xrandr (or technically xfce4-display-settings) is able to put them where they should be in the dual-monitor setup.

The card isn't nuclear reactor but faster than the NVidia GT220, so until it gets upgraded it should suffice.

Túl sok itt az ember

2012-07-23 11:44:56 írta grin
Röviden írok ide is, mert a kérdés igazából egy fa**bookon körbepostolt kép alapján indult el, és arra írtam egy választ, de mivel azt nem látja senki... hát itt van nyilvánosba'.
Az egész Tökéletlen néptelen Nyugati Pújáról készült képpel indult, amit boldog-boldogtalan körbenyomott a neten álmélkodva.
Erről azt írtam, az ikszedik példány után:

Többen megosztották ezt a gyönyörűen mágikus képet, és mivel nem akarom többször leírni, repostolom.
Hogyan lehet ilyet csinálni?

Többféleképp. Ez a kép, amennyire látom, 10 darab hosszú expozíciós képből készült, kézi masszírozással. Ez egy fáradságos dolog.


A fotós megoldás az ND filter amikor extrém hosszú expozíciót csinálhatsz úgy, hogy nem ég ki a szenzor szeme.

Az általam ismert megoldás pedig egy aránylag egyszerű, automatikus megoldás: készít az ember SOK képet ugyanarról a helyszínről úgy, hogy a fényviszonyok nagyrészt állandóak legyenek (ha nem, akkor kicsit válogatni kell), illetve hogy minden mozgó (tranziens) objektum legalább 2-3 képen ne legyen ug
yanott. 20-30 normál expozíciós kép elég lehet, de nagy tömegnél akár több száz kép is kellhet (pl. a Taj Mahalról így lehetett készíteni, neten láttam de most nem találom), hogy legalább 2-3 képen látszódon a megtartani kívánt rész.
Ezután jön a mágia. GIMP alatt a plugin neve Astronomy/Merge Layers, ami megpróbálja a kézi masszírozást automatizálni. A végeredmény mágikus (főként ha sikerül a megfelelő paramétereket eltalálni): a képen megmaradnak a statikus részek, és eltűnnek a tranziensek (népszerű nevén az emberek és turisták).
[Van hasonló plugin fotosopp alá is, de az azoknak akik nem tudnak mit kezdeni a pénzükkel. ;)]
De hogy megmutassam (magamnak is), gyorsan csináltam egy tesztet.
ronam01.jpg
Megkértem gyermekeimet, hogy – ellentétben nyugodt, jól nevelt, csendes természetüktől – legyenek szívesek ordítva rohangálni a kertben, öszevissza. Miközben ezzel voltak elfoglalva, készítettem 8 teljesen közönséges képet (normál 1/250 expozíció meg a hozzá tartozó mosolygós blende), mindegyiken legalább egy kis szörnyegyerekkel.
Ezután fogtam a GIMP-et (ami értelemszerűen a legmegfelelőbb open source eszköz a célra, aki meg ezt sem érti annak azt mondom hogy ingyenes), betöltöttem a képeket, majd a fent hivatkozott Merge Layers plugint elindítottam úgy, hogy semmiféle beállításhoz nem nyúltam.
Az eredmény elkészítése majdnem 25 másodperc volt (16 mpx képekkel).
A végeredményen pedig látható, illetve nem látható egy darab gyermek sem. Munkaigénye közelít a zéróhoz.
gyerekek_a_kertben.jpg


Persze azért van benne kis füllentés.
Az ilyen képekhez, főleg ha nagy a tömeg, sok kép kell, ami idő, és eközben lehet, hogy változnak a fényviszonyok. Ha felhős az ég, akkor az árnyékok mozognak, és a nap is megy 30-60 percen túl. Ezt kompenzálni kell, akár képenként.
A másik gond, hogy a gép nem mozdulhat el, semennyit sem. Ha egy picit is elmozdul (mint ez amit csináltam, ami szimplán egy asztalra volt letéve és kézzel nyomogatva exponáltam) akkor egyes részek homályosak lesznek vagy pixelesednek (ez a pontos szűrőfajtától függ, amit a Merge használ). Ez is nehéz eset, pláne ha valaki akár több órán át exponálgat, mert pl. a parkoló autók nem akarnak odébb menni.
A harmadik gond nyilván az, ami nem akar elmenni az istennek se', pl. hetek óta ott parkoló autó, koldus, döglött egér stb. Ezeket bizony „gimpelni” kell (na jó, fotosoppolni, mert ez már köznév), vagyis kézzel retusálni, hogy a kép szép legyen. Ez már tényleg attól függ, hogy milyen magasra szeretné valaki helyezni a lécet.

És zárszóként: ez a filterezés egyszerű, látványos. De az igazán szép képek készítéséhez tövábbra is művészi véna, éles szem, fotótudás és több millió forintos felszerelés szükséges. :-)


(Volt még egy megjegyzés a drága ND filterek helyett: lyukkamera. Igen. Az egésznek a lényege az extrém hosszú expozíció anélkül, hogy a végeredmény egy fehér [vagy negatívban fekete] kép lenne.)

modprobe: module tapes not found

2012-04-25 12:27:36 írta grin
If you upgrade a long-running Debian/Linux to kernel 3.x.x and your system doesn't boot, because you boot from an mdraid (like raid1) device, and you see the error

modprobe: module tapes not found
modprobe: module discs not found
modprobe: module cdroms not found


and you end up in (initramfs), then do that:

  1. Do Not Panic!
  2. cd /etc/modprobe.d/
  3. rm devfsd.conf    (we do not use devfs anymore, really)
  4. modprobe raid1   (or whatever you need, raid5 raid10 or any dm / md devices)
  5. mdadm --assemble --scan   (and hope you did configure your mdadm.conf right the last time :-))
  6. CTRL-D

And after start do the same on the system and recreate the initrd....



Installing Debian/Linux on Thinkpad Edge E320 Core i5

2012-03-24 20:14:52 írta grin
Got the new family member. Okay, eventually it was unavoidable that after being computer and network engineer for 20 years I going to buy a laptop. :-P So far I survived with desktop machines (and you know they accumulate pretty nicely), mobile phones (obviously Android, but they're way too small for real work) but now I realised it cannot go on anymore. I've been on the way for days and often I had to fix things and it's just not possibe using that phone...
I've been fighting this for 2 years now. The old Thinkpad T40 I inherited completely died, first the video ram got funnies, then the fan then the cpu went to see the Great Manitou. The next problem was to find something cheap without being sucky-sucky. I realised that if I want to have the best possible solution it'll take about forever. So okay, let's see what is NOW available around. This one is probably old enough to be cheap (as far as I see it's not listed in the current model line anymore) but good enough to be useable. Originally it's been a Toshiba but Lenovo got a more powerful cpu and better features.

Finally I picked a Lenovo Thinkpad Edge E320 129888G, Core i5-2450M @ 2.4GHz, 4G RAM, 320GB (290GiB) hdd and an Intel integrated and an ATI Whistler video card with a Radeon 6600M chipset. It possess a b/g/n wifi (Intel), an SM card reader (RTS5116 from RealTek), DSub and HDMI for ext video and an E-Sata for, well, just because. And 2 usb and the gig ethernet from Atheros closes the line. Not that bad, overall, for 3-6 hours of battery power. I mean, for approx $730 or €545.

Okay, that wasn't what I wanted to talk you about. I wanted to talk about:

Installing Linux on E320

It sucks. No, really, it does suck pretty hard. I mean, I'm doing this shit for 25+ years now and still took me the better half of the day, and a bit of the next. With the help of experience, google and lots of patience. And it's not Linux who's to blame, mind you.

Okay, so this came preloaded with some windows trash, v0.7 or something, for the fun without any install media. Which means that if it gets screwed up then you're probably on your own. Brilliant. Oh, I mean, no problem, windows never gets broken.

So this machine starts up nicely apart from the microsoft trash on it. I remembered that ages ago I've used Partition Magic to shrink it, but it seems it doesn't really exist anymore. But google told me that this kind of windoze can actually do it by itself. Really, it has the disk utility built-in which can actually - amond other things - shrink the partition. And worked pretty well, for a windows program.

So I have shrunk it to ~48 Gigs and the rest to be used. The disk contain 3(!!) partitions, one for thinkpad stuff and other is for some windows driver crap or whatnot, but fortunately one left to be used for logical partitions. (Don't get me started on EFI, that comes soon.)

So there's the partition, let's install it. I have a DVD install but I have no DVD in the machine, but fortunately I have an external USB drive. So lets boot!

Um, it doesn't. Starts windows (and every time either you wait for the crap to finish or have to poweroff it since there ain't to reset buttons on mobile stuff), everytime.

Okay, let's change the BIOS settings. I mean... I ... wtf? No bios prompt at boot. "Press ENTER to abort booting." Very funny fsckers, it goes faster into the bloody windows again.

Let's see DEL...no. F1? No. Ctrl-whatever? F12? Looks weird but no. Okay, the net told me F2, but F12 could be good for it either. So F2, enter the BIOS, and activate that bloody "show enter bios prompt" setting, and move over to boot order.

Boot order looks fine: first usb stick, then cd, then whatever, last hdd. Still, doesn't really care about it, starts hdd everytime.

Here came a longer gap when I have tried to look up what UEFI and EFI is, why and why not, what and whatnot, since this beast supports EFI boot. If you wonder you can look it up in Wikipedia.

No luck. Latest Debian DVD is supposed to boot on EFI as well as USB stick images, but no. I can set EFI only, no. I have tried Legacy Only and no. It may have been related to the fact that the machine boots faster than the DVD can identify the media. So I have disabled the hdd from boot and this way it was a bit faster to figure it out, without the need to see windows anymore.

Well, some combination of EFI and legacy boot, with efi first if I remember correctly, plus using the F12 boot which was able to delay the booting I was able to start the DVD. (After the mess I figured that newest USB images, which contain everything including the MBR can boot as well, but no way if I try to use my own MBR.)

The install went well, from an older Debian x64, installed grub, and I was kind of realised it won't be that simple.

And it wasn't. Grub didn't boot at all, no operating system. The fscking lame BIOS is made for windoze and if some windoze shit isn't there it thinks there isn't an OS around. No matter MBR signature is ok, the partition table is ok... something is required which isn't just there.

Another bunch of hours passed with several moves of trying to get an EFI boot, no luck, or to try to figure out some combination of partition table which works, without much success. In the meantime I was able to find an USB stick state which was able to boot, containing a new (v1.97) GRUB and the partition table created by grub-mkrescue. So I figured upgrading Debian to latest (sid) may help, because it contains the new GRUB plus it may support EFI, too.

Upgrading obviously requires a working ethernet or wifi, and obviously... none of them were detected. For the record, here are the internals:

00:00.0 Host bridge [0600]: Intel Corporation 2nd Generation Core Processor Family DRAM Controller [8086:0104] (rev 09)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port [8086:0101] (rev 09)
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0126] (rev 09)
00:16.0 Communication controller [0780]: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 [8086:1c3a] (rev 04)
00:1a.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 [8086:1c2d] (rev 04)
00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 04)
00:1c.0 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 [8086:1c10] (rev b4)
00:1c.1 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 [8086:1c12] (rev b4)
00:1c.2 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 [8086:1c14] (rev b4)
00:1c.5 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 6 [8086:1c1a] (rev b4)
00:1d.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 [8086:1c26] (rev 04)
00:1f.0 ISA bridge [0601]: Intel Corporation HM65 Express Chipset Family LPC Controller [8086:1c49] (rev 04)
00:1f.2 SATA controller [0106]: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller [8086:1c03] (rev 04)
00:1f.3 SMBus [0c05]: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller [8086:1c22] (rev 04)
01:00.0 VGA compatible controller [0300]: ATI Technologies Inc Whistler [AMD Radeon HD 6600M Series] [1002:6741]
03:00.0 Network controller [0280]: Intel Corporation Centrino Wireless-N 1000 [8086:0084]
04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5116 PCI Express Card Reader [10ec:5209] (rev 01)
04:00.1 SD Host controller [0805]: Realtek Semiconductor Co., Ltd. RTS5116 PCI Express Card Reader [10ec:5209] (rev 01)
09:00.0 Ethernet controller [0200]: Atheros Communications Inc. AR8151 v2.0 Gigabit Ethernet [1969:1083] (rev c0)
So, we have a Centrino Wireless-N 1000, which requires iwlwifi driver and more importantly its firmware images which isn't quite free, so it goes onto the USB stick, into its root specifically. The installer requires to look for missing formware images on external drives, finds the usb and uses it nicely. Still, wifi setup isn't trivial in the installer (especially when using WPA2).

The ethernet... well it's an atheros 8151, using the atl1c driver, which is part of debian, and doesn't even require any external firmware... except it just doesn't get detected.

A nice summary can be read on the Debian wiki which tells the secret:
echo "1969 1083" > /sys/bus/pci/drivers/atl1c/new_id
And after that udev finds the card nicely. A small problem is that when you have to try to reboot many times (to fix the aforementioned boot issues as well as others) this has to typed every time. Bummer, no mouse on console while installing.

Well yes, the upgrade worked, but still no boot. Dammit.

Another round of fiddling started, which resulted a working combination of BIOS (efi then legacy), and MBR (GRUB's code but windoze partition was set as boot media!) and a few twists with encrypted swap (which changed UUID in the meantime and update-initramfs completely screwed up figuring it, so /etc/crypttab had to be edited then initrd had to be completely removed and re-created), and after all I ended up with a working multibooting Debian.

As a closing act I wondered whether windoze 0.7 survived, as people mentioned for windoze 6? xp? whatever? that it dies when MBR changes and require a reinstall media to fix, which I obviously didn't possess (this was the reason for the honorable mention in the first paragraph). Lenovo rescue was beyond rescue: bad media, fix me with the DVD, but what DVD nobody could tell. To my greatest surprise years didn't passed vainly on windoze as this extreme professional version choked on MBR change (but of course, what else to do anyway), but offered to fix itself and lo! it just did. So I have a windoze partition as well as a game console or for those programs which exist only there.

It wasn't that hard. ;-)

Right now Everything Works™, even the SD card reader. I have tested with dual monitors and it works nicely. I didn't test eSata but everything else looks fine. Battery time is 3hrs with active use or close to infinity when suspended, real life lies between these two, my guess would be around 4-5 hours. Charger is pretty quick: fully charges around 1 hour.

So far I'm happy.

A csoda, Csoda, CSODA!

2009-11-17 13:39:53 írta grin

Legyek hát én az egyik (első?), aki világgá kürtöli a hírt, melyre könnybe lábadt szemem, és annyira elérzékenyültem, hogy pelust kellett cserélnem, és egyáltalán, ismét megrednült a világ reménytelenségébe oltott hitem.

Az Adobe majdnem két év múlva kijavította a linuxos flash lejátszójában azt a hibát, amitől nem lehetett ékezetes betűket írni. A hiba bennfentesek körében csak a szerény FP-40 néven futott, ami azt jelenti, hogy a hiba sorszáma 40-es volt (most 3181-nél tartunk).

Jó, most nézel, hogy mi van? De ha tudnád, hogy a flash az az izé, amikor a weblap izeg-mozog, de legfőképp amikor egy weblap okosságokat, mindenféle trükköt és hasonlót próbál csinálni, na az általában - mostanában - flash. És ez a tetű csodaprogram tartalmazott egy olyan hibát, hogy Linux alatt nem lehetett semmilyen ékezetet normálisan beírni. Krixkrax jelent meg. Több, mint egy éve. Emiatt sok olyan weblap, ami flasht használt, és azt akarta, hogy magyarul (vagy bármilyen nyelven ami nem angol) begépelj valamit, az használhatatlan volt, vagy lehetett angolul használni, mert ott nincsenek ékezetek.

Ez nem bosszantó hiba volt, hanem irritáló, dühítő, szájhabzó. Gyakorlatilag magyar flash weblapok, amikbe beírni lehetett, használhatatlanok voltak. A Flash nem open source, így a hibát csak az Adobe tudta volna javítani. És most, MOST MOST tarará... a béta verzióban működnek az ékezetek.

Itt: labs.adobe.com/downloads/flashplayer10.html

Még csak béna, izé, béta, de működni látszik. Ááááá nem is hiszem el. Zsepi!!

Taggalés linux

Szerteszana²

grin agymenései