[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Hardware detection



On 08/01/16 11:15, Stefan Lippers-Hollmann wrote:
> Hi
> 
> On 2016-01-07, Stephan Foley wrote:
>> Hello, I am working on a Fluxbox Debian Pure Blend:
>>
>> https://wiki.debian.org/FluxBox/Blend
>>
>> Currently, I am going to use discover, mdetect and read-edid for
>> hardware discovery but found in the repos hwinfo which is used by
>> Debian Edu and was wondering if this is a better tool. Description
>> follows:
> [...]
> 
> As someone working on Debian derived live systems since the earlier
> kernel 2.4 days, I wonder why you think to need any of those on a 
> modern linux system at all?
>
One example: For the work I'm doing in Devuan for our desktop-base I
want to detect the display resolution & aspect ratio regardless of X so
we can install the best background theme images for grub, desktop
backgrounds for xfce and the display manager's login screen.  I've found
that this information is available via sysfs so no biggie really.


> linux >= 2.6, udev and kmod do a great job to probe all 
> auto-discoverable devices on their own. The things they miss either 
> can't be detected automatically or at least not in a safe way. Neither
> of which are typically found on systems supported by Debian systems
> whose primary purpose is running/ showcasing/ using a window manager.
> The i586/ i686 cutoff mostly prevents you from having to discover 
> ISA devices or even weirder legacy system buses - and on embedded 
> architectures with SDIO, similar non-discoverable buses and board 
> specific boot procedures, you have bigger problems (e.g. getting FOSS 
> display driver support) than anything discover/ mdetect/ hwinfo can 
> help you with.
> 
> Regarding read-edid, why?! X.org does a pretty good job detecting your
> screen....

You can use capture the display configuration by looking /sys/class/drm/
for card*-<port-type>-<port-number>/ and check the status file and
enabled file to find the currently connected and enabled displays.  Then
you can grep the modes file for those display's resolutions.  (For extra
info on the display, you can parse the edid file with parse-edid from
the readedid package as well)  As far as I can tell the displays
Native|best resolution in the modes file is always the first line.




-- 
Daniel Reurich
Centurion Computer Technology (2005) Ltd.
021 797 722

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: