ELECTRUM LTC Can’t discover hardware wallet ledger nano s and nano x

I can’t discover my ledger devices with Electrum. Nano s isn’t even found and Nano x could be found but then it gives an error that “device isn’t in a correct state”. What’s the problem?