Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
static /dev with nvme
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Sat Aug 05, 2023 12:31 pm    Post subject: static /dev with nvme Reply with quote

I have a laptop with an nvme ssd(not this one).
I plan to do an old-fashioned gentoo on it.

However, I see no nvme entries it /usr/src/linux/Documentation/admin-guide/devices.txt.
Does this mean that nvme cannot be done statically(at least without cheating and looking an /proc/devices)?
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4160
Location: Bavaria

PostPosted: Sat Aug 05, 2023 12:49 pm    Post subject: Reply with quote

It is at the end of devices.txt without explicit naming of nvme:
Code:
# ll /dev/nv*
crw------- 1 root root 247, 0  4. Aug 12:32 /dev/nvme0
brw-rw---- 1 root disk 259, 0  4. Aug 12:32 /dev/nvme0n1
brw-rw---- 1 root disk 259, 1  4. Aug 12:32 /dev/nvme0n1p1
brw-rw---- 1 root disk 259, 2  4. Aug 12:32 /dev/nvme0n1p2
brw-rw---- 1 root disk 259, 3  4. Aug 12:32 /dev/nvme0n1p3

(look at major and minor number)
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Sat Aug 05, 2023 1:06 pm    Post subject: Reply with quote

You are right. I just searched for nvme.
Code:
 234-254        char    RESERVED FOR DYNAMIC ASSIGNMENT
                Character devices that request a dynamic allocation of major number will
                take numbers starting from 254 and downward.


Code:
 259 block      Block Extended Major
                  Used dynamically to hold additional partition minor
                  numbers and allow large numbers of partitions per device

Just as I worried.
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Sat Aug 05, 2023 2:07 pm    Post subject: Reply with quote

stefan11111,

I do it. My NVMe major device number has not changed in two years.
Thinking back 10 years to when I reverted to a static /dev, its changed exactly once.

If you use an initrd, you can discover the new numbers in the shell.
if not, it a bit harder.

It happens with a kernel change, so choosing the old kernel in the boot menu gets you booted.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Sat Aug 05, 2023 9:44 pm    Post subject: Reply with quote

Finished compiling my system.
The kernel can't find my nvme drive.

lsmod:
https://bpa.st/GCEQ

lspci -nnk
https://bpa.st/QIXA

Kernel .config(broken into 4 parts)
https://bpa.st/ECUQ
https://bpa.st/ORXQ
https://bpa.st/426A
https://bpa.st/KE2A
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4160
Location: Bavaria

PostPosted: Sun Aug 06, 2023 9:15 am    Post subject: Reply with quote

Your lsmod and lspci is from a system you have booted (and not from your kernel config). Here I see what is missing in your kernel config: Intel's Volume manager device:
Code:
# CONFIG_VMD is not set

0000:00:0e.0 RAID bus controller [0104]: Intel Corporation Volume Management Device NVMe RAID Controller [8086:9a0b]
   Subsystem: Acer Incorporated [ALI] Volume Management Device NVMe RAID Controller [1025:1539]
   Kernel driver in use: vmd
   Kernel modules: vmd

See also: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_Configuring_Kernel_Version_6.1#Part_3_-_Must_Haves
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Sun Aug 06, 2023 9:34 am    Post subject: Reply with quote

Thanks
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Sun Aug 06, 2023 11:15 am    Post subject: Reply with quote

I am also not able to use the laptop's keyboard. I can use an usb keyboard though.
I also don't see the wifi card or the usb tethering interface in ifconfig.
All these were working on the livecd.
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Sun Aug 06, 2023 11:30 am    Post subject: Reply with quote

stefan11111,

Code:
0000:00:14.3 Network controller [0280]: Intel Corporation Tiger Lake PCH CNVi WiFi [8086:43f0] (rev 11)
   Subsystem: Rivet Networks Tiger Lake PCH CNVi WiFi [1a56:1652]
   Kernel driver in use: iwlwifi
   Kernel modules: iwlwifi


make iwlwifi a kernel module as it needs firmware.
It will also need the rest of the wifi stack.

The keyboard may be an I2C device, so you need
Code:
0000:00:15.0 Serial bus controller [0c80]: Intel Corporation Tiger Lake-H Serial IO I2C Controller #0 [8086:43e8] (rev 11)
   Subsystem: Acer Incorporated [ALI] Tiger Lake-H Serial IO I2C Controller [1025:1539]
   Kernel driver in use: intel-lpss
   Kernel modules: intel_lpss_pci
0000:00:15.1 Serial bus controller [0c80]: Intel Corporation Tiger Lake-H Serial IO I2C Controller #1 [8086:43e9] (rev 11)
   Subsystem: Acer Incorporated [ALI] Device [1025:1539]
   Kernel driver in use: intel-lpss
   Kernel modules: intel_lpss_pci


That's not enough on its own either. Pastebin dmesg where it works.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Sun Aug 06, 2023 12:41 pm    Post subject: Reply with quote

dmesg
https://bpa.st/NLVQ
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Sun Aug 06, 2023 5:15 pm    Post subject: Reply with quote

stefan11111,

Code:
[    0.327187] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0

That's PS/2 internally, so should just work ... unless you don't have PS/2 support in your kernel.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Sun Aug 06, 2023 6:47 pm    Post subject: Reply with quote

NeddySeagoon wrote:
stefan11111,

Code:
[    0.327187] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0

That's PS/2 internally, so should just work ... unless you don't have PS/2 support in your kernel.

Who has support for PS/2 just laying around in the kernel?
Enabled it now and keyboard works.
The touchpad doesn't work(tested with xorg and cat /dev/input/mice).
Sound doesn't work, though speaker-test and alsamixer detect the sound card. Sound works in the livecd.
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21639

PostPosted: Sun Aug 06, 2023 6:56 pm    Post subject: Reply with quote

I have it enabled, because laptops have an odd history of using PS/2 internally, even when the system is sealed so well that you could never coldplug (much less hotplug) any PS/2 devices.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Sun Aug 06, 2023 8:18 pm    Post subject: Reply with quote

stefan11111,

I do. The hardware is all the chipsets still because it costs more to take it out than it save on silicon die area.
There have not been any physical PS/2 connectors on system for a long time, but odd things still use the protocol, keyboards, mice, touch pads/screens.
My X560 chipset sill has floppy, IDE and ISA interfaces internally. The ISA may well be used for sensors.

Your touchpad does not appear in the dmseg you shared earlier.

The kernel has a menu for vendor specific laptop extensions. I don't know if there is an Acer option but if so, you probably need it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Mon Aug 07, 2023 12:01 pm    Post subject: Reply with quote

I got usb tethering to work by following the wiki.
I can live with no touchpad.
That leaves sound.
The soundcard shows up and I can change the volume in alsamixer.
However, no sound comes out.
Sound works fine in the livecd.
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Mon Aug 07, 2023 12:11 pm    Post subject: Reply with quote

stefan11111,

You have two sound cards

Code:
[   21.508109] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input12
[   21.508452] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input13
[   21.508812] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input14
[   21.508901] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input15
[   21.522703] nvme nvme0: pci function 10000:e1:00.0
[   21.522714] pcieport 10000:e0:01.1: can't derive routing for PCI INT A
[   21.522716] nvme 10000:e1:00.0: PCI INT A: not connected
[   21.538788] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC295: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[   21.538791] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   21.538792] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[   21.538793] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
[   21.538794] snd_hda_codec_realtek hdaudioC0D0:    inputs:
[   21.538795] snd_hda_codec_realtek hdaudioC0D0:      Mic=0x12


Your analogue sound card, Card 0, Device 0 is the default. Is that what you want?

With a static /dev, the /dev/snd/* device minor numbers may not agree with what
Code:
ls /sys/dev/char/ -l
has to say about major device 116.
You need to fix /dev/snd/* to make them agree.

To make the video card sound work, you will need to use dynamic minor device numbers for sound.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
stefan11111
l33t
l33t


Joined: 29 Jan 2023
Posts: 922
Location: Romania

PostPosted: Mon Aug 07, 2023 7:52 pm    Post subject: Reply with quote

NeddySeagoon wrote:
stefan11111,

You have two sound cards

Code:
[   21.508109] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input12
[   21.508452] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input13
[   21.508812] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input14
[   21.508901] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input15
[   21.522703] nvme nvme0: pci function 10000:e1:00.0
[   21.522714] pcieport 10000:e0:01.1: can't derive routing for PCI INT A
[   21.522716] nvme 10000:e1:00.0: PCI INT A: not connected
[   21.538788] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC295: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[   21.538791] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   21.538792] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[   21.538793] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
[   21.538794] snd_hda_codec_realtek hdaudioC0D0:    inputs:
[   21.538795] snd_hda_codec_realtek hdaudioC0D0:      Mic=0x12


Your analogue sound card, Card 0, Device 0 is the default. Is that what you want?

Yes.
NeddySeagoon wrote:

With a static /dev, the /dev/snd/* device minor numbers may not agree with what
Code:
ls /sys/dev/char/ -l
has to say about major device 116.
You need to fix /dev/snd/* to make them agree.

I did MAKEDEV audio to create those /dev/snd nodes and fixed permissions.
The sound card shows up in aplay -l and alsamixer, but no sound comes out.
I tried to test it with udev, enabling devtmpfs, everything was the same.
If I plug in my usb headset, it works fine after I set /etc/asound.conf.
NeddySeagoon wrote:

To make the video card sound work, you will need to use dynamic minor device numbers for sound.

No need for that.
_________________
My overlay: https://github.com/stefan11111/stefan_overlay
INSTALL_MASK="/etc/systemd /lib/systemd /usr/lib/systemd /usr/lib/modules-load.d *udev* /usr/lib/tmpfiles.d *tmpfiles* /var/lib/dbus /usr/bin/gdbus /lib/udev"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum